align-mask uses a direct or dispersed image of a slitmask to improve on the (1) scale (2) rotation (3) x,y offset values given in an existing dewar offset file, and, for a dispersed image, to improve on the disperser misalignment value given in an observation definition file. Output is a new dewar offset file, and a modified observation definition file. align-mask predicts the locations of slit images in a ccd frame, searches near each predicted location for the expected slit image, and calculates offsets for each. From the set of offsets, the program solves for the focal plane scale, rotation angle, x,y offsets, and disperser misalignment which will minimize the median errors. align-mask can be used with any image, however if the initial offsets are large, a preliminary pass through adjust-mask may be needed to enable align-mask to reliably match predicted with actual slit positions.
USAGE |
|
||||||||||||||||||||||
INPUT |
|
||||||||||||||||||||||
OUTPUT |
|
||||||||||||||||||||||
PARAMETERS |
|
When first invoked, align-mask calculates the predicted positions of
all slit images, then searches near these positions for the images. Only slit
images stronger that threshold x background are included (a useful value of threshold
is a few tenths, if your frame
has not had bias subtracted- which you normally should do). If you are using a
dispersed (rather than direct) image, align- mask searches for the images of
each spectral line listed in lamfile
.
If you expect the initial alignment to be pretty good, start with parameters searchbox
= 10 and magfactor
= 100. A plot of the position
errors for all apertures found is first presented, and might look something
like ths(for atypically large offsets)
68 matches found. sigma = 1.95 pixels. Continue?
If it does, answer “y”, and the fitting process will begin. However, if the initial plot looks like this:
then the dewar offset file is very far wrong. In this case, answer “n”, and use adjust-mask to make preliminary corrections, then return to align-mask for final adjustments.
align-mask can be run in two modes. In auto mode, three iterations of the fit to all parameters are made and you will be presented with the final result, to accept or reject. If accepted, align-mask will create a new dewar offset file, which is given the name of the image that was used, and update the observation definition file with the name of the new dewar offset file and- if you are working with a dispersed image and you requested a fit to disperser misalignment- the updated value for disperse misalignment.
If you are not running in auto mode, you will be presented with each step of the fit, and can chose to apply or reject the corrections. Very small corrections are probably meaningless, but there is no harm in accepting them. At any point in the process, you can quit by typing “q”.
Notes
naver
should normally be set to 1, except for unusual cases of very noisy data.