STScI Logo

dispfity stsdas.hst_calib.fos.y_calib



dispfity -- Compute FOS wavelength dispersion coefficients.


dispfity table dcout


This routine computes the FOS wavelength dispersion coefficients using the sample positions for the spectral lines found by the linefind task. For each grating mode the dispersion relation is described as follows:

     w = c0 + (c1 * x) + (c2 * x**2) + (c3 * x**3)


     w - is the wavelength,
     x - is the sample position, 
     c0, c1, c2, and c3 - are the fitted coefficients.

For the prism modes the dispersion relation is described by the following two equations:

     w = c0 + (c1 / xx) + (c2 / xx**2) + (c3 / xx**3) + (c4 / xx**4)

     xx = x - xzero
     xzero - is a fitted coefficient.

A weighted least squares fit of the wavelengths as a function of the found sample positions in the input table is performed. For the prism mode, the non-linear least squares fit (i.e., the Levenberg-Marquardt Method) is used. Starting "guesses" for the fitted coefficients are taken from an input dispersion coefficient table, specified by the dcin parameter.

Lines where the approximate and found position differ by more than the value of maxdev are not used in the fit. Lines having a peak count less then the value of minint are also not used.

The least squares fit is repeated a maximum of ntry times. Residuals are computed as the difference between the found and the fitted positions. Lines having a residual greater than nsig times the RMS of the residuals are not used in subsequent fits.


table = "linefind" [file name]
Input table containing the found locations; this table is generated by the linefind task. This table also contains a column WEIGHT, which is used to weight the lines in the fit.
dcout = "dispfit" [file name]
Name of the output table that will contain the dispersion coefficients. This table will have the following columns:

	DETECTOR	char*5
	APER_ID		char*3
	APER_POS	char*6
	FGWA_ID		char*3
	POLAR_ID	char
	PASS_DIR	integer
	COEFF_0		double
	COEFF_1		double
	COEFF_2		double
	COEFF_3		double
	COEFF_4		double
	XZERO		double
	NLINES		integer
	NGOOD		integer
	RMSFIT		double
(dcin = fos$prismdc") [file name]
File name of the previous dispersion coefficient table. This parameter is required only for the prism modes; dcin provides initial guesses for the non-linear least squares fit. It will be necessary to obtain this file from the HST archive.
(maxdev=2.0) [real]
Maximum deviation---in sample or diode units---of the found line location from the approximate location. Lines having deviations larger than maxdev are not used in the fit.
(minint=0.0) [real]
Minimum peak intensity, or counts in the line, for inclusion in the fit.
(order=3) [integer]
Order of the polynomial fit for the grating modes. This parameter is ignored for the prism modes.
(nsig=2.5) [real]
Rejection limit. Lines having residual values greater than nsig times the RMS residual are deleted from subseqent fit attempts.
(ntry=3) [integer]
Maximum number of times to try the fit; bad data is rejected after each try.
(niter = 20) [integer]
Number of iterations in the non-linear least squares fit. This parameter is used only for the prism mode.


1. Perform a fit for the table stabh40, writing the output to dtab.

  fo> dispfity stabh40 dtab

2. Perform the fit again using a 3rd order polynomial. Reject lines having peak counts below 30.

  fo> dispfity stabh40 dtab order=3 minint=30.0



Howard Bushouse, STSDAS


For assistance using this or any other tasks, please contact or call the help desk at 410-338-1082.


linefind, waveoffset, fitoffsety

Source Code · Search Form · STSDAS