xrtpccorr -- Correct on-ground the bias subtraction for data taken in Photon Counting mode
xrtpccorr [parameter = < value >]
The bias in the Photon Counting mode is subtracted on-board using the
bias map taken during each spacecraft slew.
This task, 'xrtpccorr', allows to estimate the on-ground correction on the
bias value within an observation and to apply bias adjustments if needed.
The bias can be estimated on-ground using the DN value of the corner
pixels of grade 0 events, stored in the 3x3 arrays of the PHAS column in the event file.
For single-pixel events, or some other good grade configurations, the
corner pixels are below the split threshold and therefore they should
represent a measure of the residual bias.
The input file for this task is the unfiltered event file with the bad
pixels flagged and the event grade assigned
(after the 'xrtflagpix', 'xrtpcgrade' and 'xrthotpix' processing).
The residual bias calculation accounts for grade, spatial and time dependence.
By default the task uses only the events with grade 0 and excludes the bad pixels.
The parameters 'grademin', 'grademax' and 'badpix' allow to change these defaults.
The spatial dependence is accounted by dividing the CCD window in subimages and
calculating the bias in each subimage. The size of the subimages is input via the
parameter 'subimgsize'. The task requires to input the source position in sky coordinates.
This position is converted in detector coordinates for each time interval having a
stable attitude. The first subimage is centered on the source position and the
remaining surrounds the source subimage. The bias calculated in each subimage
is applied only to the events belonging to that subimage.
Alternatively a single bias value can be calculated using the entire CCD
window and applied to all pixels. The parameter 'subimage' allows to
switch between single or multiple bias values.
The time dependence is accounted by setting the number of events to be used in
the residual bias calculation. The number of events is set with the parameter
'nevents'. Note that events from two different orbits are not mixed, therefore
if there are not sufficient events to have exact 'nevents' per interval, the last
interval within an orbit includes also all the residual events.
If the central subimage, within one time interval, contains more than
'nevents' but an external subimage has less events than requested, the
value obtained for the central image is used for the whole CCD.
If in all subimages the number of events is less than 'nevents',
the entire CCD is used for the residual bias estimation.
If the parameter 'lessevents' is set to yes, the procedure described above
is not followed, the task use instead the events found within each image,
even if they are less than 'nevents'.
The user can choose the method for the calculation: the arithmetic mean of the
corner pixel values or their median value (parameter 'biasmode' set to 'mean' or
'median', respectively). The value obtained, representing the residual bias,
is then subtracted to each DN value of the 3x3 array of the events (stored in the PHAS
column). The bias adjustment
is not applied to the events coming from the CCD corner sources.
Note that this task is run by 'xrtpcbias', it should not be used individually
(see 'xrtpcbias' help file for details).
- 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 (To use only for test purposes). If <0 the parameters 'srcra', 'srcdec', 'ranom', 'decnom' and 'attfile' are used.
- (srcdety=-1) [integer]
- Source detector coordinate y (To use only for test purposes). If <0 the parameters 'srcra', 'srcdec', 'ranom', 'decnom' and 'attfile' are used.
- srcra [real]
- Source RA position (degrees). If <0 srcra value is read from input file.
- srcdec [real]
- Source DEC position (degrees). If <-90 srcdec value is read from input file.
- (ranom=-1) [real]
- Nominal Right Ascension (degrees). If <0 ranom value is read from input file.
- (decnom=-91) [real]
- Nominal Declination (degrees). If <-90 decnom value is read from input file.
- If set to no, the aberration correction is not applied to the data.
- If set to no, the attitude parameters correspond to the closest time value to the start time of
- (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 residual bias calculation
- (lessevents=no) [boolean]
- If set to yes, in residual bias 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.
- (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).