adjust-map

adjust-map uses a comparison arc image to make small corrections to the mapping created by map-spectra.

USAGE
adjust-map  -m mapfile  -f framename[s]   [-d interval]
INPUT
mapfile.map is the name of an existing map file
framename[s] is one or two sets of image files with images of a comparison arc
interval: diagnostic parameter; every 1/interval fit is plotted
OUTPUT
framename.map is a new mapfile
PARAMETERS
linelist
file with list of comparison lines to use
search_height
half-height (in pixels) of region searched for line
search_width
half-width (in pixels) of region searched for line
slit_width
width of slit (in pixels)
ord_disp
order of fit to adjustment along wavelength axis
ord_sag
order of fit to adjustment along slit length axis
siglimit rejection limit for line offsets, in units of std deviation
edge size of region at ends of slit to exclude in dispersion direction adjustment (in pixels)
iterations number of interations of fit to line offsets



Details:

Using an existing spectral map, adjust-map searches in the region of each spectral line to calculate an offset. All offsets for one spectrum are fit to a  polynomial  which is used to correct the polynomial solutions in the spectral map. If the parameter iterations is greater than 1, points which deviate from the fit by more than siglimit times the standard deviation  are excluded from the next iteration.
The order of the fits must be no greater than the order of the original map: which is 7 for ord_disp and 5 for ord_sag. Take care if using high order fits: unless you have very many comparison lines you may make things worse rather than better. Also, the parameters search_height and search_width should be set with care. If set too large, the line search may find the incorrect line- either a neighboring comparison line in the same spectrum, or a line in an adjacent spectrum. If the initial map errors are comparable to the spacing between comparison lines and/or spectra, begin with a value of the search parameters which is sufficiently small so that no misidentifications will occur, and iterate the solution several times until it converges. Considerable care should also be devoted to selected a good set of comparison lines. Lines near to other, brighter lines are particularly to be avoided. If, as occaisionally happens, the ends of the slit are badly cut, edge may be set to a non-zero value to exclude the slit ends in the adjustments in the wavelength direction.
The quality of the fits may be tested by setting the diagnostic parameter  to a value other than zero, in which case each nth fit is plotted. Green points are those which were used on the final iteration; red points were excluded. Inspection of these plots will help the user set the optimal order for the fits, and also look for any troublesome comparison lines. In diagnostic mode no output files are written.

If the order of the adjustment to either fit is set to a negative number, no correction of that fit is made.

It is often useful to interpolate between two comparison arc exposures which, for example, bracket an object spectrum. If two framenames are provided, the map adjustment is the mean of that of the two frames. The output mapfile name is a composite of the two framenames; e.g.  from ccd0029 and ccd0030, a mapfile ccd0029-30.map is produced.

Suggested fit order is 5 to 7 for ord_disp, 1 for ord_sag, but the order for ord_disp may need to be lowered if there are insufficient comparison lines.

Important note:  It is strongly recommended that bias-subtracted frames be used with adjust-map. Slit positions of weak lines in frames without bias subtraction may be less accuate.

Back to programs