Back to Programs

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

mapfile.ps is a plot of the fits to each spectrum

mapfile.rms is the RMS of the fits to each spectrum

PARAMETERS

linelist

file with list of comparison lines to use [with optional weights]

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

slit order of dispersion error fit

ord_sag

slit order of y position error fit

ord_tilt

slit order of tilt position error fit

h_ord_disp

hole order of dispersion error fit

h_ord_sag

hole order of y position error fit

fit_tilt

fit slit tilt?

siglimit

rejection limit for line offsets in the dispersion, in units of std deviation

s_siglimit

rejection limit for line offsets in the y-distortion, in units of std deviation

t_siglimit

rejection limit for line offsets in the tilt, in units of std deviation

c_siglimit

rejection limit for line offsets in the curvature, in units of std deviation

edge

size of region at ends of slit to exclude in dispersion direction adjustment (in pixels)

iterations

number of iterations of fit to line offsets

outlier-wt

underweight outlying point?

nclump

number of points in clumps for underweighting

histogram

use histogram to reject lines outside search region?

 

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, the order of the fits is reduced by 1 on the first iteration, and 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 and ord__tilt. Suggested fit order is 3 to 4 for ord_disp, 1 to 3 for ord_sag,  and 1 or 2 for ord_tilt, but the order for ord_disp may need to be lowered if there are insufficient comparison lines. Take care if using high order fits: unless you have very many comparison lines you may make things worse rather than better. If the order of the adjustment to any fit is set to a negative number, no correction of that fit is made.

 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 selecting a good set of comparison lines. Lines near to other, brighter lines are particularly to be avoided. If, as occasionally 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 not run in diagnostic mode, plots of the fits to all spectra are output into a file named mapfile.ps

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.

 

Two options are available to improve the quality of the fits:

  1. In the line list file, if a second number follows the wavelength, it is used as a weight for the line in the fitting process. Lines without a weight are assigned weights of unity.
  2. If outlier-wt is set to ‘y’, a nearest neighbor algorithm is used to identify outlying points, which might be due to misidentified lines (usually caused by interference with a neighboring spectrum). Points which are far from the n_clump nearest neighbors are weighted inversely by the square of their distance from their neighbors.

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 accurate.

 

Back to Programs