"I use the extra plotting of the UCAC2 stars to aid in my asteroid observing. Over time that u2.dat file has grown to over 8MB in size now. I know I can toggle it on/off, but what I would like to do is edit out what I don't need any longer. The u2.dat file has over 40,000 lines in it and it also appears there are some duplications in that big file. I imagine that is also adding to slower operation in displaying the screen.
Is there a safe way to edit/delete only the data not needed? I suppose I could just delete that file, start over and d/l only the needed area but I would like to be able to keep parts of the existing file."
Well, there's all sorts of ways of doing things. The following might seem a bit messy, but considering that you're going to continue observing asteroids, this problem will keep cropping up, so give this route a thought.
If you scan read through this
http://www.projectpluto.com/extras.htm#xz80q
you'll see mention of a file called sorter.exe and how to download it. There's even an example of use, so read on that bit too. You can sort any fixed line length ascii file safely on any column with this utility Bill wrote.
Now, backup your u2.dat file in case all goes wrong, and also back up gsc22.tdf, they're both in the Guide directory.
I'm assuming gsc22.tdf hasn't been renamed or moved recently since cmc14 etc support came to Guide 8.
Now, in a DOS box, with sorter.exe and a copy of u2.dat all in the same directory somewhere, anywhere, and the dos box changed to that directory, type this at the command line
sorter u2.dat u_old.dat 11
or similar destination filename of your choice, this sorts on column 11 which is the same as sorting on RA for u2.dat.
Place u_old.dat in the Guide directory.
The next thing is using gsc22.tdf. Open that in a text editor, notepad is fine. Scroll down till you see an entry that starts u2.dat, cut and paste from that line (inclusive) down to and including the _first_ instance of a line saying just 'end'.
Paste that into a new file and save as u_old.tdf in the Guide directory.
Now edit it a little, the first line
file u2.dat
now needs to say
file u_old.dat
or whatever naming scheme you use (if this is going to happen once a year or so, a running number might be a thought).
You also have to go down the tdf until you see the line
epoch 2000
start a new line after that one and enter this
sort 1
Sorted files in Guide plot very quickly with this option.
Actually, nonsorted files in Guide plot pretty quickly nowadays too, so there is always the possibility that it isn't your u2.dat file that's causing the slow down, but something else that's cropped up over time. One way to test is before doing any of the above simply rename u2.dat to u2.dak, it won't be used then as it won't be found, and Guide will plot in a u2.dat free world, and if it's still slow, it weren't u2.dat at fault. Remember to rename u2.dak to u2.dat to get it back.
Anyway, back to the plot, with a tdf just for this new, sorted file, which is expecting a sorted file, this file will now plot very quickly. Sorted files are not looked at beyond the first appropriate and last appropriate RA for a field (or something like that), you see, seeking to start RA is fast and once end RA is reached, it stops. Unsorted files have to be searched in their entirety just in case something crops up for that field, so the bigger they get the trickier.
And that's it. You have, of course, got to delete the original u2.dat file (that's why you backed it up, in case of error) else it will plot both sets of data and still be slow.
But with the new sorted file and its own dedicated little tdf you should have things as fast as they can be.
Meanwhile, next time you download ucac2 data a new u2.dat file will be created (you may have to stop and restart guide for guide to "see" this file after a delete), and as you didn't change the original tdf details, it will work as it always has, but u2.dat will now be a fresh small one.
This too will grow in time. You can either make lots of these over time, or as u2.dat gets bigger again, you can append it, in a text editor or via cut and paste or whichever way, to u_old.dat, then delete it and start afresh. However, u_old.dat will need resorting with sorter.exe everytime you do that.
It looks and sounds a bit of a messy method, but as you will be perpetually updating data it's no different from when you take notes or sort out your observing for the night. Every now and again continually updated data has to have a bit of manual housekeeping done to it, no matter how clever the software.
Cheers
John