| twodpolyfit | stsdas.hst_calib.hsp | twodpolyfit |
twodpolyfit -- Fit a polynomial function of temperature and epoch.
twodpolyfit intable outtable scheme threshold order1 order2 yname yerrname x1name x2name base_temp base_time nattrib attrib1 attrib2 attrib3 attrib4 attrib5
This task will fit any quantity (for example, dark count), as polynomial functions of temperature and epoch. This routine is usually used to obtain the 16 polynomial coefficients that the Routine Science Data Processing (RSDP) system needs to calibrate the dark signal, pre-amp noise, current to voltage converter (CVC) offset, and other quantities. This task fits the 2-dimensional polynomial function in both dimensions at the same time by using the singular value decomposition (SVD) method. Although the current pipeline only requires third order polynomials in each dimension, this task is a more generalized and flexible tool which can fit polynomials up to 6 orders in each dimension, allowing the user-definable column names in the input table to be used for other purposes.
Input data are single precision, but double precision calculations are performed. Epoch is in double precision throughout. Any number of input data points can be used.
(yname) Measured quantity to be fitted with a polynomial function, e.g., dark counts (real). The actual column name is passed from the 'yname' parameter. (yerrname) Standard deviations of the measured quantity (real). The actual column name is passed from the 'yerrname' parameter. (x1name) Independent variable of the first dimension, usually the temperature (real). The actual column name is passed from the 'x1name' parameter. (x2name) Independent variable of the second dimension, usually the epoch (double). The actual column name is passed from the 'x2name' parameter. 'TYPE' Data type of the observation (char*7). (attribi) Attributes to be copied directly from the input table to the output table. The actual column names and data types are passed from the parameters 'attrib1' through 'attrib5'.
'BASE_VALUE' Base value of the calibration coefficients (real).
'A00', 'A01', etc.
Calibration polynomial coefficients (real).
'SIGMA00', 'SIGMA01', etc.
Uncertainties of 'A00', 'A01', etc. (real).
'C(10,00)', 'C(20,00)', etc.
Covariances between 'A10', 'A00', and 'A20', 'A00',
etc. (real).
'CHISQ' Chi-square of the polynomial fit (real).
'PROBABILITY' The chi-square probability of the fit (real).
'BASE_TEMP' Reference temperature (real).
'TEMPMIN' Lower limit of temperature (real).
'TEMPMAX' Upper limit of temperature (real).
'BASE_TIME' Reference epoch (double).
'EPOCHMIN' Lower limit of epoch (double).
'EPOCHMAX' Upper limit of epoch (double).
'ORDER1' Order of the polynomial fit in the first
dimension (int).
'ORDER2' Order of the polynomial fit in the second
dimension (int).
'NPOINTS' Number of valid input data points (int).
'TYPE' Data type of the observation (ch*7).
(attribi) Attributes to be copied from the input table to
the output table as passed from the 'attrib1'
through 'attrib5' parameters.
DET_NUM Detector ID (int). APER_NAME Aperture name (char*10). VOLTAGE High voltage setting (real). VGAIND Gain setting (real). THRESH Discriminator threshold setting (real).
1. Fit third order polynomials of temperature and time to the quantity "DOBJ" of the input table xtwodpolyfit$input1 and write the results in the table ytwodpolyfit$output1. The standard deviation of "DOBJ" is in the column "DOBJ_ERR", temperature is in "DET_TEMP", and time is in "EPOCH". The reference temperature is 0 and the reference epoch is 0. Copy detector ID's and aperture names from the input table to the output table.
hs> twodpolyfit intable="xtwodpolyfit$input1"
outtable="ytwodpolyfit$output1" scheme="fixed"
order1=3 order2=3 yname="DOBJ" yerrname="DOBJ_ERR"
x1name="DET_TEMP" x2name="EPOCH" base_temp=0
base_time=0 nattrib=2 attrib1="DET_NUM"
attrib2="APER_NAME"