John Thorstensen, Dartmouth College
2004 December
It is sometimes desirable to center a direct image accurately. The MDM telescopes point reasonably well, but not to arcsecond precision, so accurate centering requires lots of overhead -- taking a test shot, displaying it, consulting your finding chart, figuring out how far to move the telescope (and it always seems like you have less than a 50-50 chance of getting the sign right), and so on. This tedious process wastes telescope time.
This document describes a script which makes the process faster, easier, and more accurate in almost all cases. It requires a one-time investment of a few minutes on your part to set up the first time (this can be done in the afternoon), and there are cases where it will fail, but it generally works well and saves a lot of bother.
It works like this. Basically, you set on your object, take a quick unguided test shot (like 10 seconds) and run the script, which turns around and immediately tells you exactly where to move the telescope. The script works by finding the stars in the image, matching them to the USNO A2.0 star catalog, deriving a "plate model", and figuring out the telescope RA and dec readings which will put your object right where you want it in the image.
I intend to install this on the fast Linux boxes Agung and Hill, and eventually on Chichon and Kilauea when they are replaced by fast machines (anticipated in the summer of 2005).
Setting It Up.
sf 2 2 512 512 512 512 32
fp junk.
auto 0 y y y n
et 10
and
sf 1 1 0 0 2048 2048 32
obj 120
auto 1 y y y n
fp ccd.
Once you've made these files,
typing the command source tofind in CCDCOM will then
invoke the 'set format' command sf to make the
chip read a small
format, binned 2x2, turn off the pre-exposure clearing of the chip,
set up to name the data files things like
junk.123.fits, and set the exposure time to 10 seconds.
Typing source tosci restores the full
chip format, sets the naming convention to things like ccd.124.fits,
restores the pre-exposure chip clearing, and sets the exposure time
to be longer.
Using the file prefix "junk" (the fp line) makes it easy
to erase the setup images later.
One gotcha here: The running file number automatically updates after
each exposure, including "junk" exposures. If you want your science
images to have an unbroken
numbering sequence you'll need to reset the running number by hand
using the fn command in CCDCOM.
mkdir centerdir
cd centerdir
xaim 256
yaim 256
pointlist targets_apr05
imagedir /data/pinatubo/visitor/smith/direct/
The format is fairly obvious -- it's keyword/value pairs. xaim
and yaim will in most circumstances be the middle of the
finder frame (assuming that corresponds to the location you want to
put your objects in the science
images). pointlist is the name of an mdm-style pointing
file. This is optional but saves a lot of tedious and error-prone
typing later. MDM-style pointing files have lines of the form
targetname_no_blanks rah mm ss decd mm ss equinox
e.g.
4U2129+47 21 29 36.2 47 04 08 1950
These are the format used to feed coordinates by name to xtcs,
so hopefully you'll have one ready. Note that the coordinates in this
file will be used to tweak up the telescope pointing, so they need to be
accurate. Finally, imagedir
is the directory you're using to take data. Note that the pinatubo disks are
cross-mounted on chichon, the example shows how the image data get
accessed.
Using It.
With the setup out of the way, the program should be easy to use.
(If on the other hand the solution fails, or looks fishy, your
best bet is to forget about it and set however you like.
Don't waste time trying to save time.)
As noted earlier, if the program doesn't find the star field,
your best bet is to grab your
finding chart and center up the old-fashioned way.
Time's a-wastin', and you don't want to fiddle with technicalities
while the sky wheels overhead -- the idea is to save time,
not waste time.
You can expect the program to fail occasionally; it doesn't necessarily
mean the procedure is broken. (If it never works, it probably is
broken -- tell me about it and I can probably fix it in a
couple of minutes the next day if I'm around.)
Some locations in the sky will always be problematic.
At high latitude some fields are too sparse, and in
very crowded fields the matching algorithm sometimes fails.
The USNO A2.0 is useless wherever the Sky Survey is burned
out (e.g., in bright galaxies, some globular fields, in the
brightest parts of the Milky Way, and so on). Proper motions
since the 1950s are occasionally an issue. But over nearly the
whole sky the procedure should work fine.
If you get a high failure rate, you could try increasing the
size of the finder field a bit, or increaing the exposure time
slightly. In practice, a 5-arcmin square finder field and a
10-sec exposure in the I-band on the 2.4m almost always
gets enough stars to match.
Fine points, blah blah blah ...
The reason for including a broad "warning zone" instead of just cutting
off at a few arcmin is that it may be useful to have the capacity to
set very roughly, take a test shot, and then do a fine set. This could
be especially useful at the 1.3 m, where fine-setting can take
some doing. You could set within a half-degree or so in the dome
and tweak up reasonably well from inside the control room using the
test-shot procedure.
centermdm.py junk.123 mytarget
where junk.123 is (obviously) the picture you just took, and
mytarget is the name of the target in the pointing list.
centermdm.py junk.123 18:22:22.8 -13:14:15
The coordinates must be J2000, and must be in this "colon-ized" format.
They should also be accurate, since the telescope will end up pointing
straight at them.
cenermdm.py junk.124 mytarget 512 512
to reflect the new finder-field center.
If you're running stand-alone, run it by typing
./wcs_script1
... if not, it's about to run on its own.
Just ignore this.
junk.123.radec.match.wcs - a set of XY vs RA/dec matches.
junk.123.audit - a little summary of the solution, with
the filename, catalog used, number of
stars matched, RMS, and date
junk.123.cat - a list of stars detected by SExtractor,
the first line is the seeing in pixels.
match_diagn.tmp - as the name implies, more diagnostic
info, including the rotation, scale,
and parity of the fit
test.cat - Raw output from SExtractor, all the
detected images
wcs_script1 - an executable script which would in
principle load world coords into
your junk image header, in case you
wanted to do such a thing.
Some of this may be interesting, but in general it's all expendable.
In fact you should wipe out your whole centering directory at the end
of your run, it's basically only of interest when you're setting.