fdist stlocal.testfgs fdist

NAME · USAGE · DESCRIPTION · PARAMETERS · EXAMPLES · BUGS · SEE_ALSO

## NAME

fdist -- Add or remove mirror distortion from a data table.

## USAGE

fdist intable dist_mode

## DESCRIPTION

Fdist begins by reading the polynomial coefficient and subaperture tables into static arrays, thereby increasing the filter's execution speed by reducing the number of table queries. Missing tables or errors in reading these tables will terminate the fdist filter.

The tables are scanned for a row containing Pickle coordinates, i.e., FRAME=P. The X and Y position is then read. During the transformation routine, the FGS, DIST, and FILTER columns are also read--an error in any of these columns will cause the row to be skipped. As always, the input position and covariances are set to INDEF before the transformation begins so that an incomplete filter operation will be flagged.

Distortion caused by the asphere (and later the pickoff) mirrors is removed if the current value of DIST is Y and the filter is in remove mode. Conversely, if DIST is N and the filter is in add mode, distortion caused by these mirrors is added to the data. These are the only two cases in which an operation is performed. A Y in the DIST column means that data are affected by distortion; a value of N means that data are unaffected by distortion.

Distortion is either added or removed using an iterative algorithm that converges when the difference between iterations is less than the tolerance (10^-16). The initial guess is the input position (x,y) while the new guess (x',y') is derived from the following equation:

To remove distortion:
x' = x + P(x',y',fgs,filter) + F(fgs,filter) + S(x,y,fgs,filter)
y' = y + P(x',y',fgs,filter) + F(fgs,filter) + S(x,y,fgs,filter)

x' = x - P(x,y,fgs,filter) - F(fgs,filter) - S(x',y',fgs,filter)
y' = y - P(x,y,fgs,filter) - F(fgs,filter) - S(x',y',fgs,filter)

where:  P() = a function to evaluate a 5th order polynomial
F() = a function to return filter wheel correction in radians
S() = a function to return the subaperture tilt correction

These functions are subject to change as new information on distortion is obtained. Expected changes include addition of pickoff mirror corrections as well as the internals of the subaperture routine

'Fdist' uses the following columns for both input and output:
COLUMN
------
X
Y
X_X
Y_Y
X_Y
FRAME
Q1, Q2, Q3, Q4
DIST

## PARAMETERS

intable [file name template]
This is either an individual data table or a list of tables that are to be operated upon. All tables are operated on in-place.
dist_mode = "remove" [string, allowed values: remove | add ]
Remove distortion from the data, or add distortion to the data? The current value of the DIST column is checked; a value of N means that no distortion is present in the data--corrections have been applied; a value of Y means that distortion is present in the data--no corrections have been applied.
(outtable) [file name template]
Not yet implemented; currently all files are operated on in-place.
(new_table = no) [boolean]
Create a new output table so as not to overwrite the current table? Not yet implemented.
(verbose = yes) [boolean]
Print the transformed coordinates on the terminal screen?
(x_filter) [string]
Name of the STSDAS data table containing filter wheel coefficient information in the X dimension. The table contains columns FGS-1, FGS-2 and FGS-3. Row numbers correspond to the following filters (in order): RED, YLW, CLR, ND, and APS.
(y_filter) [string]
Name of the STSDAS data table containing filter wheel coefficient information in the Y dimension. The table contains columns FGS-1, FGS-2 and FGS-3. Row numbers correspond to the following filters (in order): RED, YLW, CLR, ND, and APS.
(coeff_x1) [string]
Name of the STSDAS data table containing polynomial coefficients in the X dimension for FGS 1. The size of this table is six rows by six columns representing the asphere coefficients. Columns are named A, B, C, D, E, and F. This table should initially be obtained by a call query to CDBS.
(coeff_x2) [string]
Name of the STSDAS data table containing polynomial coefficients in the X dimension for FGS 2. The size of this table is six rows by six columns representing the asphere coefficients. Columns are named A through F. This table should initially be obtained by a call query to CDBS.
(coeff_x3) [string]
Name of the STSDAS data table containing polynomial coefficients in the X dimension for FGS 3. The size of this table is six rows by six columns representing the asphere coefficients. Columns are named A through F. This table should initially be obtained by a call query to CDBS.
(coeff_y1) [string]
Name of the STSDAS data table containing polynomial coefficients in the Y dimension for FGS 1. The size of this table is six rows by six columns representing the asphere coefficients. Columns are named A through F. This table should initially be obtained by a call query to CDBS.
(coeff_y2) [string]
Name of the STSDAS data table containing polynomial coefficients in the Y dimension for FGS 2. The size of this table is six rows by six columns representing the asphere coefficients. Columns are named A through F. This table should initially be obtained by a call query to CDBS.
(coeff_y3) [string]
Name of the STSDAS data table containing polynomial coefficients in the Y dimension for FGS 3. The size of this table is six rows by six columns representing the asphere coefficients. Columns are named A through F. This table should initially be obtained by a call query to CDBS.
(subap_x1) [string]
Name of the STSDAS data table containing subaperture tilt corrections in the X dimension for FGS 1. The size of this table is 25 rows by 8 columns representing a linear (?) map of the tilt corrections at each point. Columns are named A, B, C, D, E, F, G, and H. This table should initially be obtained by a query to CDBS.
(subap_x2) [string]
Name of the STSDAS data table containing subaperture tilt corrections in the X dimension for FGS 2. The size of this table is 25 rows by 8 columns representing a linear (?) map of the tilt corrections at each point. Columns are named A through H. This table should initially be obtained by a query to CDBS.
(subap_x3) [string]
Name of the STSDAS data table containing subaperture tilt corrections in the X dimension for FGS 3. The size of this table is 25 rows by 8 columns representing a linear (?) map of the tilt corrections at each point. Columns are named A through H. This table should initially be obtained by a query to CDBS.
(subap_y1) [string]
Name of the STSDAS data table containing subaperture tilt corrections in the Y dimension for FGS 1. The size of this table is 25 rows by 8 columns representing a linear (?) map of the tilt corrections at each point. Columns are named A through H. This table should initially be obtained by a query to CDBS.
(subap_y2) [string]
Name of the STSDAS data table containing subaperture tilt corrections in the Y dimension for FGS 2. The size of this table is 25 rows by 8 columns representing a linear (?) map of the tilt corrections at each point. Columns are named A through H. This table should initially be obtained by a query to CDBS.
(subap_y3) [string]
Name of the STSDAS data table containing subaperture tilt corrections in the Y dimension for FGS 3. The size of this table is 25 rows by 8 columns, representing a linear (?) map of the tilt corrections at each point. Columns are named A through H. This table should initially be obtained by a query to CDBS.
(pick_x1) [string]
(pick_x2) [string]
(pick_x3) [string]
(pick_y1) [string]
(pick_y2) [string]
(pick_y3) [string]

## EXAMPLES

1. Add distortion to a data set.

2. Remove distortion from a data set.

cl> fdist intable remove

3. Process all tables with the suffix .tab.

cl> fdist *.tab

## BUGS

Package Help · Search Form · STSDAS

Maintained by the Science Software Group at STScI
This file last updated on 15 Sep 2011