NAME

xrtwtcorr -- Correct on-ground the bias subtraction for data taken in Windowed Timing mode

USAGE

xrtwtcorr [parameter = < value >]

DESCRIPTION

For Windowed Timing mode the bias is subtracted on-board. The bias value subtracted on-board to each column is telemetered (Bias Row in the trailer file). With the new version of the on-board software (v. 8.9) the last twenty pixels of each frame are stored in the housekeeping header file.
The ground software estimates the bias by calculating the median value of the last twenty pixels telemetered. If the bias value obtained differs from the one subtracted on-board more than a quantity set by the user through the parameter 'biasdiff', the bias correction is adjusted.

Two different methods are available for the bias adjustment and can be chosen through the parameter 'biasmode':

- SP: the bias difference is calculated between the on-ground estimated bias and the bias value of the related Bias Row subtracted on-board to each column.

- M20P: the bias difference is calculated between the on-ground estimated bias and the median of the last 20 pixels of the related Bias Row.

For both methods it is possible to set the number of consecutive frames used for the on-ground bias calculation via the parameter 'nframe'.

The on-ground bias adjustment is not applicable if the target source is located close to the right hand size of the WT window since it may contaminate the charge values of the last twenty pixels telemetered. As a rule, the 'xrtwtcorr' task should not be used if the source is located at a detector X coordinate DETX>350.

PARAMETERS

infile [file name]
Name of the input event FITS.

hdfile [file name]
Name of the input Housekeeping header Packets FITS file. This file contains the pixels used to calculate the bias on-ground.

outfile [file name]
The output file name. The value 'NONE' will cause the input file to be overwritten.

thrfile [file name]
Name of the input file containing the bias threshold value as a function of the CCD substrate voltage. If the parameter is set to CALDB, the file is read from the calibration database. If the parameter is set to NONE, the bias threshold value must be input via the parameter 'biasth'.

trfile [file name]
Name of the input Trailer header Packets FITS file. This file contains the Bias Row used on board

(colfile = CALDB) [filename]
Name of input WT offset file. If set to CALDB, use the file in the Calibration Database. This file contains for a given waveform the values of the 1st pixel used in the CCD for the WT mode (WM1STCOL), the number of columns (WMCOLNUM), and the offset required to align the PC coordinates system to the WT.

(nevents = 20) [integer]
Minimum number of Windowed Timing events included in the last twenty pixels.

(nframe = 20) [integer]
Number of consecutive frames included in the on-ground bias median calculation.

(biasdiff = 2) [integer]
Threshold value for bias adjustment (DN).

(biasmode = M20P) [string]
Method to calculate module bias difference ([SP|M20P]). In SP mode the bias difference is calculated between the on-ground computed bias median and the bias value subtracted on-board to each column; in M20P mode the bias difference is calculated between the on-ground computed bias median and the last 20 pixels median of the related Bias Row.

(biasth = 200) [integer]
Threshold value for the DN of the pixels used to calculate the bias median of the last twenty pixels. This parameter is used only if 'thrfile' is set to NONE.

(npixels = 20) [integer]
Minimum number of pixels used to calculate the bias median of the last twenty pixels.

(clobber = no) [boolean]
If set to yes, overwrite the output file.

(history = yes) [boolean]
If set to yes, write parameter values and other information in HISTORY blocks.

(chatter = 2) [integer]
Chatter Level (min=0, max=5).

EXAMPLES

  1. Calculates bias for the input file sw00030352007xwtw2po_uf.evt and adjust the bias subtraction if the difference between the bias subtracted on-board and the one calculated on-ground is larger than 2 DN. To calculate the bias on-ground 30 consecutive frames are used. The bias is adjusted with the 'M20P' method. The output file is named sw00030352007xwtw2po_uf_corr.evt.

    > xrtwtcorr infile=sw00030352007xwtw2po_uf.evt 
    hdfile=sw00030352007xhdtc.hk trfile=sw00030352007xtr.hk 
    biasdiff=2 nframe=30 biasmode=M20P thrfile=CALDB
    outfile=sw00030352007xwtw2po_uf_corr.evt
    

BUGS

SEE ALSO

LAST MODIFIED

July 2007