STScI Logo

flex stsdas.hst_calib.hsp


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

NAME

flex -- Analyze the deflection offset as a polynomial function of temperatures due to temperature differences caused by optical bench flexure (i.e., "banana" mode correction).

USAGE

flex intable outtable c1 c2

DESCRIPTION

Deflection corrections are calculated by the application processor (AP) using the following equations:


       T = c1 * T1 + c2 * T2
       dx = a0 + a1 * T + a2 * T^2 + a3 * T^3
       dy = b0 + b1 * T + b2 * T^2 + b3 * T^3

where T1 and T2 are two temperatures from HSP telemetry and are specified in the parameter file; dx and dy are measured deflection offsets in the X and Y directions, respectively; c1 and c2 are free parameters that can be specified in the parameter file, they represent the relative importance between T1 and T2; the a and b values (e.g., a1) are the coefficients that this task is trying to calculate. All input data must be obtained from the same aperture. The order of the fitting polynomial can be any number between 1 and 9. The maximum number of input data points is 2,000. Input data are in single precision but are double precision during the polynomial regression calculation.

PARAMETERS

intable [file name]
Name of the input table; the input table contains the following columns:

(dxname)        X axis deflection offset; the actual column name is
		passed from the 'dxname' parameter (real).
(dyname)        Y axis deflection offset; the actual column name is
		passed from the 'dyname' parameter (real).
(dxerrname)     Standard deviation of the X axis deflection offset;
		the actual column name is passed from the 
		'dxerrname' parameter (real).
(dyerrname)     Standard deviation of the Y axis deflection offset;
		the actual column name is passed from the
		'dyerrname' parameter (real).
(T1name)        Temperature T1; the actual column name is passed
		from the 't1name' parameter (real).
(T2name)        Temperature T2; the actual column name is passed
		from the 't2name' parameter (real).
(x0name)        Nominal X deflection; the column name is passed 
		from the 'x0name' parameter (real).
(y0name)        Nominal Y deflection; the column name is passed
		from the 'y0name' parameter (real).
'EPOCH'         Epoch of observation (double).
'APERTOBJ'      Object aperture (ch*10).
outtable [file name]
Name of the output table created by flex. This table contains the following columns:

'C1, C2'        Temperature parameters (real).
'A0', 'A1', 'A2', 'A3', ...
'B0', 'B1', 'B2', 'B3', ...
                Coefficients of the fitting polynomial (real).
'CHISQA'        Chi-squared of A coeficients (real).
'CHISQB'        Chi-squared of B coeficients (real).
'WEIGHT'        Weighting flag of the Y-quantity (real).
'T1MIN'         Lower limit of T1 (real).
'T1MAX'		Upper limit of T1 (real).
'T2MIN'		Lower limit of T2 (real).
'T2MAX'		Upper limit of T2 (real).
(x0name)        Nominal X deflection (real).  The value of the
		'x0name' parameter will be used for the column name.
(y0name)        Nominal Y deflection (real).  The value of the
		'y0name' parameter will be used for the column name.
'EPOCHMIN'      Minimum value of epoch (double).
'EPOCHMAX'      Maximum value of epoch (double).
'ORDER'         Order of the fitting polynomial (int).
'NPOINTS'       Number of input data points (int).
'APER_NAME'     Name of the aperture used in this calibration
                (char*10).
'T1NAME'        Column name of T1 in the input table (char*16).
'T2NAME'        Column name of T2 in the input table (char*16).
order = [integer, min = 1, max = 9]
Maximum degree of the fitting polynomial.
weight = -2. [real]
Weighting flag of the Y-quantity. The weight of each data point is proportional to the standard deviation with this flag as its exponent. For example, if weight = 0, equal weights is applied.
dxname [string]
Column name of the X-axis deflection offset in the input table.
dyname [string]
Column name of the Y-axis deflection offset in the input table.
dxerrname [string]
Column name of the X axis deflection offset's standard deviation in the input table.
dyerrname [string]
Column name of the Y axis deflection offset's standard deviation in the input table.
T1name [string]
Column name of the T1 temperature in the input table.
T2name [string]
Column name of the T2 temperature in the input table.
x0name [string]
Column name of the nominal X-axis deflection in the input table.
y0name [string]
Column name of the nominal Y-axis deflection in the input table.

EXAMPLES

1. Fit a 3rd order polynimial to flexure measurements in the table xflex$input1. The deflection offsets are in columns DX and DY, and their standard deviations in DXERR and DYERR. Temperature T1 is DET_TEMP, and T2 is DEA_TEMP, nominal deflections are in X0 and Y0. The temperature parameters are c1 = 1, and c2 = 0.5. Put the results in the output table yflex$output. The weight of each data point is inversely proportional to its standard deviation square.

hs> flex intable="xflex$input1" outtable="yflex$output"
        c1=1 c2=0.5 T1name="DET_TEMP" T2name="DEA_TEMP"
        order=3 weight=-2 dxname="DX" dyname="DY"
        dxerrname="DXERR" dyerrname="DYERR" x0name="X0"
        y0name="Y0"

BUGS

REFERENCES

SEE ALSO


Source Code · Package Help · Search Form · STSDAS