HELP · SEE_ALSO

## NAME

incidence -- Calibrate incidence angle.

## USAGE

`incidence intable tabstat outtable`

## DESCRIPTION

This task computes the Goddard High Resolution Spectrograph (GHRS)
wavelength incidence angle
correction using a least squares fit to the wavelength offsets
as a linear function of carrousel position, spectral order,
and photocathode sample position. The fit is performed on an
input table previously generated by the `woffsets` task.

The values `c0`, `c1`, `c2`, and `c3` are computed by the least squares fit in
the following equation.

deltaw*order = c0 + (c1 * carpos) + (c2 * order) + (c3 * sample) where: deltaw - wavelength offset, order - spectral order, carpos - carrousel position, and sample - photocathode sample position.

If the input table does not have multiple values for carrousel position, spectral order, or sample position, then the corresponding coefficient is set to zero and is not fit.

The output calibration table produced by `incidence` is used by the
Routine Science Data Processing (RSDP) system. RSDP uses the
formulation of wavelength offset as:

a + b * sample deltaw = ---------------- order

where "a" and "b" are tabular coefficients of carrousel position and spectral order. The coefficients "a" and "b" are given in the output table for the minimum and maximum carrousel position calibration. A table entry is written for each order calibrated.

## PARAMETERS

- intable [file name]
- Name of the table that contains the wavelength offsets
tabulated as a function or carrousel position, order, and sample
position. This table is generated by the
`woffsets`task and must contain at least the following columns:'CARPOS' - Carrousel position (integer). 'ORDER' - Spectral order number ("1" for first order gratings) (integer). 'SAMPLE' - Photocathode sample positions (double). 'DELTAW' - Wavelength offsets (double).

- tabstat = "read" [string, allowed values: read | append]
- Input table status. This parameter specifies whether the input table is
to be used only as input to the task (i.e., "read" only), or results of the
least squares fit are to be saved in the input table. If "append"
is specified, the two following
columns will be added to the input table giving the results
of the fit:
'DELTAW_FIT' - Fitted values of the wavelength offsets (double). 'RESIDUALS' - Observed minus the fitted offsets (double).

- outtable = "incidence" [file name]
- Name of the output table containing the wavelength incidence corrections.
This is the table used by RSDP and it has coefficients
tabulated as a function of carrousel position and spectral order. The output
table has the following columns:
'GRATING' - Grating mode (as specified in the input table header keywords) (char*5). 'CARPOS' - Carrousel position (integer). 'SPORDER' - Spectral order number (integer). 'A' - Constant coefficient (double). 'B' - Linear coefficient (double).

- (m= 0) [integer, min=0, max=60]
- The first spectral order number for which the calibration is
valid. If
`m1 = 0`, this task will use the entire range of order numbers from the input table.

- (m= 0) [integer, min=0, max=60]
- The last spectral order number for which the calibration is
valid. If
`m2 = 0`, this task will use the entire range of order numbers from the input table.

- (carpos= 0) [integer, min=0, max=65536]
- The minimum carrousel position for which the calibration is valid.
If
`carpos1 = 0`, the entire range of carrousel positions from the input table will be used.

- (carpos= 0) [integer, min=0, max=65536]
- The maximum carrousel position for which the calibration is valid.
If
`carpos2 = 0`, the entire range of carrousel positions will be used.

## EXAMPLES

1. Generate the RSDP table `offsets` using wavelengths offsets in the
input table `waveoff`. Update the input table with the results of
the `fit`.

hr> incidence waveoff append offsets

## BUGS

## REFERNCES

## HELP

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