| apershift | stsdas.hst_calib.hrs.z_calib | apershift |
apershift -- Shift wavelengths of an object that is not centered in the aperture.
apershift input table1 table2 table3 output
This routine computes and applies a wavelength offset that results when an object is not properly centered in the target aperture. The position of the object and the positions (in deflection units) of the spectral calibration lamps (SC1 and SC2) are read from the aperture location table, i.e., from the file passed to the table1 parameter. This table is generated by the tamode task. From table1, the offset(s) between the target and spectral calibration lamp(s) are computed. The nominal or true offset(s) from the second table are subtracted from the computed offsets to give the object's offset from the aperture center. If the locations of both spectral calibration lamps are available in table1 the average result for the two lamps is used.
Using the offset of the target from the aperture center, DX, (i.e., the X-direction) a wavelength shift is computed for each data point in the input wavelength image, input, by the relation;
DELTAW = (off_0 + (off_1*carpos) + (off_2*M) + (off_3*S)) * DX / M
where OFF_0, OFF_1, OFF_2, and OFF_3 are coefficients stored in the third input table, table3. M and CARPOS are the spectral order and carrousel position, respectively, and are obtained from input header keywords. S is the photocathode sample position and is computed from the header keywords SAMPLE (which gives the sample position of the first point in the wavelength image), and DELTAS (which gives the increment between points).
'APERTURE' - Aperture ("ssa", "lsa", "sc1", or "sc2") (char*3).
'X_CENTER' - Center of the aperture (double).
The aperture location table must have one row in which APERTURE is equal to either "lsa" or "ssa" (this is the target aperture). It must also have a row with APERTURE equal to either "sc1" or "sc2" (this is the calibration lamp). A table header parameter, GRATING, gives the target acquisition element, ("MIRROR-N1", "MIRROR-N2", "MIRROR-A1", or "MIRROR-A2").
'GRATING' - Target acquisition mode (either "MIRROR-A1", "MIRROR-A2",
"MIRROR-N1" or "MIRROR-N2") (char*9).
'APERTURE' - Target aperture, (either "lsa" or "ssa") (char*3).
'DX_SC1' - Separation of the target aperture from SC1 (double).
'DX_SC2' - separation of the target aperture from SC2 (double).
At least one of the table rows must have the same grating and aperture combination as table1.
'GRATING' - Grating mode (either "G140", "G160M", "G200M", "G270M",
"G140L", "ECH-A", or "ECH-B") (char*5).
'OFF_0', 'OFF_1', 'OFF_2', and 'OFF_3' - Offset coefficients
(double).
At least one of row in table3 should match the grating mode for the input wavelength image, input.
1. Shift the wavelengths for the wavelength image stored in the file wavein, using the aperture positions computed by tamode and stored in table. Use calibration reference tables apoff (containing the nominal aperture offsets) and wscoef (containing the wavelength shift coefficients). Store the results in the output file waveout.
hr> apershift wavein table apoff wscoef waveout
For assistance using this or any other tasks, please contact help@stsci.edu or call the help desk at 410-338-1082.