Hectospec Data
Pipeline
|
The object of this note is to show you how to take an image and produce coordinates you can use for Hectospec observing. These examples use data from the 4-Shooter CCD camera on the FLWO 48-inch (1.2 meter) telescope on Mt. Hopkins. Each 4-Shooter FITS file has 4 image frames. The particular file used here is called 0103.M67I.fits.
First look to see if a world coordinate system (WCS) exists. In our example, there was a WCS as shown by the following keywords in the header:
CD1_1 x degrees/pixel CD2_2 y degrees/pixel CTYPE1 = RA-projection CTYPE2 = DEC-projection CRVAL_1 degrees in ra CRVAL_2 degrees in dec CRPIX1 x coordinate reference pixel CRPIX2 y coordinate reference pixel
Produce a file with 3 columns: image x position, image y position, and a relative magnitude. To do so run Doug Mink's shell script, imsex. This script uses Emanual Bertin's SExtractor, the basic purpose of which is to detect and classify sources from an image.
imsex -m -n 1000 0103.M67I.fits
where
The script
imsex
splits the 4 frames into 4 fits images AND produces a file (with
.sex suffix) of x, y, and relative magnitude for each frame. Using
our example, you would expect to see output:
You can now compare your star positions with one of the
catalogs. Your choices are the
Doug Mink has written macros to deal with the 4 images
in the 4-Shooter data. The one for the USNO-A2.0 catalog is called
ufit. To run it on four images generated above, type:
The macro contains the following lines:
where
This produces a FITS output file for each of the 4 images.,
bfit, gfit, g2fit, and tfit produce similar
files with bw, gw, g2w, and tw added instead of uw.
Now, you are ready to match your new coordinates against a catalog and
to eliminate from your list objects that have large residuals. To
do so you run
immatch.
Once again there is a macro for the 4-Shooter data, called
umatch
which contains the following lines:
where
so, the command is:
and an example of output is:
You will want to look at the separation given at the end
of each amatch file; if it is less than 0.25", everything is fine; if not,
try to understand why -- do you perhaps have too few stars in your solution,
for example.
You may also wish to look at the image plotted against
catalog circles as you did above, so here you could run:
Now you are ready to produce a file with right ascension,
declination, and magnitude
for the stars in your field (up to the maximum you set previously).
The program to be run is called
xy2sky and once
again, Doug Mink
has written a macro, uphot, for the specific case of 4-Shooter data.
The macro consists of the lines:
where
It is invoked by typing (in our example)
This will produce four tab-separated table files with the
.cat suffix. These files contain for each identified star:
These files (4 here) can be combined to create a list
that can be used by John Roll's program fitfibs to position the
fibers.
-m extracts stars for all images in a multi-extension file
-n number of stars to extract
0103.M67I.IM1.fits 0103.M67I.IM1.sex
0103.M67I.IM2.fits 0103.M67I.IM2.sex
0103.M67I.IM3.fits 0103.M67I.IM3.sex
0103.M67I.IM4.fits 0103.M67I.IM4.sex
USNO-B1.0 and A2.0 catalogs, the GSC II catalog, the
2MASS Point Source Catalog, and the GSC and updated GSC-ACT HST Guide Star Catalogs
We've chosen the USNO-A2.0; simply substitute
u/ub1 (USNO-B1.0), g/gsc (HST GSC), g2/gsc2 (GSC II),
or t/tmc (2MASS PSC) for the trailing or leading u/ua2 in the
following commands.
The command:
saoua2 0103.M67I.IM3.fits
will bring up
SAOimage with circles drawn around
the USNO-A2.0 catalog positions on frame 3 of the FITS image. You can
also compare against the GSCII using saogsc2, the GSC-ACT
using saogsca, and the 2MASSPSC using saotmc.
If your stars are in the center of these circles, congratulations, your
header WCS coordinates are very good. More typically, the placement
of stars and circles won't coincide, and you will want to create
a better WCS for your image. To do so, run the program
imwcs.
ufit 0103.M67I
imwua2 -wved $1.IM1.sex -q i2t -h 300 -n 8 -y 2.0 -p 0.67 -x -100 1100 -o $1.IM1uw.fits $1.IM1.fits
imwua2 -wved $1.IM2.sex -q i2t -h 300 -n 8 -y 2.0 -p 0.67 -x 1100 1100 -o $1.IM2uw.fits $1.IM2.fits
imwua2 -wved $1.IM3.sex -q i2t -h 300 -n 8 -y 2.0 -p 0.67 -x 1100 -100 -o $1.IM3uw.fits $1.IM3.fits
imwua2 -wved $1.IM4.sex -q i2t -h 300 -n 8 -y 2.0 -p 0.67 -x -100 -100 -o $1.IM4uw.fits $1.IM4.fits
-w writes new header
-v verbose
-e erases the old WCS projection on the newly created file
-d uses the .sex output instead of searching for stars in the image
-q i2 iterate 2 times
-q t tolerance in pixels for match
-h maximum number of stars to find
-n number of parameters to fit
-y multiply image dimensions by this number (used if there is no well defined center)
-p plate scale in arcseconds/ per pixel
-x pixel coordinates
-o output
0103.M67I.IM1uw.fits 0103.M67I.IM3uw.fits
0103.M67I.IM2uw.fits 0103.M67I.IM4uw.fits
immgscu -t 2 -d $1.IM1.sex -h 300 $1.IM1uw.fits > $1.IM1uw.umatch
immgscu -t 2 -d $1.IM2.sex -h 300 $1.IM2uw.fits > $1.IM2uw.umatch
immgscu -t 2 -d $1.1M3.sex -h 300 $1.IM3uw.fits > $1.IM3uw.umatch
immgscu -t 2 -d $1.IM4.sex -h 300 $1.IM4uw.fits > $1.IM4uw.umatch
-t offset tolerance in pixels
-d input catalog with (starbase?) format
-h maximum number of reference stars
amatch 0103.M67I
0103.M67I.IM3uw.match
saoua2 0104.M67I.IM3uw.fits
or, to compare with 2MASS Point Sources,
saotmc 0104.M67I.IM3uw.fits
xy2sky -tc $1.IM1uw.umatch $1.IM1uw.fits @$1.IM1.sex > $1.IM1.cat
xy2sky -tc $1.IM2uw.umatch $1.IM2uw.fits @$1.IM2.sex > $1.IM2.cat
xy2sky -tc $1.IM3uw.umatch $1.IM3uw.fits @$1.IM3.sex > $1.IM3.cat
xy2sky -tc $1.IM4uw.umatch $1.IM4uw.fits @$1.IM4.sex > $1.IM4.cat
-t Tab-separated table (Starbase) output
-c file Read polynomial magnitude mapping from this file
@file Read x, y, and instrumental magnitude from this file
uphot 0103.M67I
ra dec magnitude image x image y