NAME

xrtpcbias -- Adjust the bias subtraction for Photon Counting mode data

USAGE

xrtpcbias [parameter = < value >]

DESCRIPTION

This script,'xrtpcbias', runs the necessary tasks to have the unfiltered event file corrected for the bias. First it processes the events with the tasks 'xrtflagpix', 'xrtpcgrade' and 'xrthotpix' setting the event threshold and the split threshold to values higher than the usual ones. This is to select a sample of events suitable for the residual bias estimation.
If the parameter 'thrfile' is set to CALDB, the event and split threshold values stored in the calibration database file are used. By setting 'thrfile' to NONE, the task allows the user to set these thresholds using the parameters 'evtthr' and 'splitthr'.

Second the script runs the task 'xrtpccorr' to estimate the residual bias and applies a correction to the PHAS column (see the 'xrtpccorr' help file for details).

The output unfiltered event file from this task is ready to follow the normal processing. The tasks 'xrtflagpix', 'xrtpcgrade' and 'xrthotpix' must be re-run with their default values after 'xrtpcbias'.

If the input file is already processed by 'xrtpcbias', the original PHAS column values are used as input for the new bias adjustment.

By setting the parameter 'biascorr' to 'no', the 'xrtpcbias' task only erases the effects of a previous on-ground bias adjustment restoring the original PHAS column values in the input event files.

PARAMETERS

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

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

attfile [file name]
Name of the input Attitude FITS file.

(srcdetx=-1) [integer]
Source detector coordinate x. If <0 the parameters 'srcra', 'srcdec', 'ranom', 'decnom' and 'attfile' are used.

(srcdety=-1) [integer]
Source detector coordinate y. If <0 the parameters 'srcra', 'srcdec', 'ranom', 'decnom' and 'attfile' are used.

srcra [string]
Source RA position (degrees or hh mm ss.s). If <0 srcra value is read from input file.

srcdec [string]
Source DEC position (degrees or hh mm ss.s). If <-90 srcdec value is read from input file.

(ranom=-1) [string]
Nominal Right Ascension (degrees or hh mm ss.s). If <0 ranom value is read from input file.

(decnom=-91) [string]
Nominal Declination (degrees or hh mm ss.s). If <-90 decnom value is read from input file.

(aberration=no)[boolen]
If set to no, the aberration correction is not applied to the data.

(attinterpol=no)[boolen]
If set to no, the attitude parameters correspond to the closest time value to the start time of each orbit.

(teldef = CALDB) [file name]
Name of the input TELDEF file. Type CALDB to use the file in the Calibration Database.

mkffile [file name]
Name of the input filter file.

(subimage=yes) [boolean]
If set to yes, subimage method is used.

(subimgsize= 100) [integer]
Size in pixel for the subimages.

(nevents = 25) [integer]
Minimum number of events included in the PHAS calculation

(lessevents=no) [boolean]
If set to yes, in PHAS calculation use events found within each image even if less than 'nevents'.

biasmethod [string]
Metod to calculate bias correction (enumlist=[MEAN|MEDIAN]).

(badpix=yes) [boolean]
If set to yes, exclude bad pixels in bias correction calculation.

(grademin = 0) [integer]
Minimum grade value in grades selection of events used in bias correction calculation.

(grademax = 0) [integer]
Maximum grade value in grades selection of events used in bias correction calculation.

hdfile [file name]
Name of the input Housekeeping header Packets FITS file.

thrfile [file name]
Name of the input file containing event and split threshold values for bias calculation 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 event and split threshold values must be input via the parameters 'evtthr' and 'splitthr'.

(evtthr = 120) [integer]
PHAS[1] threshold (min=0, max=4095) for the central pixel of a 3x3 neighborhood. Events below the threshold will be flagged. This parameter is used only if 'thrfile' is set to NONE.

(splitthr = 120) [integer]
The split threshold level. If set to a negative value, use the on-board split threshold values read from the input hdfile 'SplitThr' column. This parameter is used only if 'thrfile' is set to NONE.

(biascorr=yes) [boolean]
If set to yes the bias correction is applied.

(resetcol=yes) [boolean]
If set to yes, 'PHA' 'PI' 'GRADE' and 'PixAbove' column values are set to -1.

(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.  > 
    

BUGS

SEE ALSO

LAST MODIFIED

May 2008