NAME
xrtlccorr -- Generates a rate correction file and a corrected light curve for an input
XRT Photon Counting or Windowed Timing mode light curve.
USAGE
xrtlccorr lcfile regionfile outfile corrfile attfile outinstrfile infile
hdfile [parameter = < value > ...]
DESCRIPTION
'xrtlccorr' generates for point-like sources a rate correction file and a corrected light curve (if requested) that account for telescope
vignetting and Point Spread Function (PSF) corrections due to the geometry of the light curve extraction region.
Photon losses due to bad pixels/columns falling within the extraction region are also taken into account.
The XRT Photon Counting (PC) and Windowed Timing (WT) operational modes are supported.
The information on the geometry of the extraction region is read from the extension 'REG00101'
of the input light curve (provided in input through the parameter 'lcfile') as generated from the XSELECT package.
Alternatively (if 'lcfile=NONE'), the extraction region can be directly given in input
through the parameter 'regionfile'. In this latter case, only the rate correction file is generated.
The supported extraction region shapes are: CIRCLE, ANNULUS, BOX, CIRCLE-CIRCLE and BOX-BOX. For WT mode, when
using rotated boxes, the BOX rotation angle must be set to the value of the spacecraft position
angle (roll) in degrees.
A RAW instrument map, accounting for CCD defects and telescope vignetting,
is generated (parameter 'createinstrmap=yes') by the task using information from the input
files 'attfile', 'infile' and 'hdfile'. The instrument map is composed by several extensions corresponding to
distinct time intervals and its dimension is choosen to cover the
extraction region. Each extension of the instrument map is relative to a number of CCD frames that
can be set through the parameter 'wtnframe' or 'pcnframe'. If 'wtframe=0' or 'pcnframe=0' a distinct extension
is generated when the attitude flag changes from 'settled' to 'slew' or if two subsequent
frames are separated by more than 100 seconds.
Alternatively, by setting the parameter 'createinstrmap' to 'no', the RAW instrument map generated by the task
'xrtexpomap' can be provided in input through the parameter 'instrfile'.
For each extension of the RAW instrument map, the SKY coordinates extraction region is
transformed in RAW coordinates using information from the input attitude file. Next,
a PSF correction factor is calculated for a point-like source taking into account the
different geometry for the different operational mode of the telescope (WT or PC).
The PSF correction factor is calculated as the ratio between the total fluence of the source and the
fluence within the extraction region.
This ratio is calculated by summing the PSF fraction contained in each pixel of the extraction region
(in RAW coordinates) weighted by the corresponding value in the instrument map to account for telescope vignetting
and CCD bad pixels. The PSF correction factors are calculated for the energy choosen by the user
through the parameter 'energy'.
Finally, the time dependent rate correction factors are stored in the output FITS file ('corrfile'). If an input
light curve is provided (parameter 'lcfile' not 'NONE'), the task generates also an output FITS light curve
('outfile') with 'RATE' and 'ERROR' columns corrected for the factors described above.
Note that the 'xrtlccorr' task assumes the center of the extraction region to be coincident with
the source position if the 'srcx' and 'srcy' parameters are set to zero or negative values (default).
The temporal bin of the input light curve cannot be larger than the temporal resolution used to generate the RAW
intrument map. The bin size of the input light curve is preserved in the output corrected curve.
For WT data taken during spacecraft settling, the attitude file corrected for jumps from the archive (sw*pat.fits)
must be used.
PARAMETERS
- lcfile [file name]
- Name of the input Light Curve FITS file. If set to 'NONE' the light curve extraction region is read
from the region file given in input through the parameter 'regionfile'.
- regionfile [file name]
- Name of the input extraction region file (used only if parameter 'lcfile' is set to 'NONE').
The extraction region is read from the light curve given in input through the parameter 'lcfile' if
'regionfile' is set to 'NONE'.
- outfile [file name]
- Name of the output corrected Light Curve FITS file or DEFAULT for standard name
(created if parameter 'lccile' is not set to 'NONE').
- corrfile [file name]
- Name of the output file containing the time dependent rate correction factors. The value of the
correction factor ('CORRFACT') of the N-th row is valid for the time interval between the 'TIME' of the
row N-th and those of row (N-th)+1. If set to 'DEFAULT' a standard name is used.
- (teldef = CALDB) [filename]
- Name of teldef file. If set to CALDB, use the file in the Calibration Database.
- (aberration=no)[boolean]
- If set to 'no', the aberration correction is not applied to the data.
- (attinterpol=no)[boolean]
- If set to 'no', the attitude parameters correspond to the closest time
value to the time of each event.
- attfile [file name]
- Name of the input attitude file.
- (srcx=-1) [real]
- Source sky X coordinate in pixels. If srcx is set to zero or negative values the task assumes that
the source is located at the center of the extraction region.
- (srcy=-1) [real]
- Source sky Y coordinate in pixels. If srcy is set to zero or negative values the task assumes that
the source is located at the center of the extraction region.
- (psffile = CALDB )[file name]
- Name of the input PSF file. If set to 'CALDB' (default), uses the file in the Calibration Database
- (psfflag = yes) [boolean]
- If set to 'yes', corrects for PSF losses (for point-like sources).
- (energy=1.5) [real]
- Energy value (keV units) for PSF and vignetting correction.
- (createinstrmap = yes) [boolean]
- If set to 'yes', creates instrument map in RAW coordinates. If set to 'no', the RAW instrument map
is read in input through the parameter 'instrfile'.
- outinstrfile [file name]
- Name of the output Instrument Map file of 'DEFAULT' for standard name (created only if 'createinstrmap=yes').
- infile [file name]
- Name of the input cleaned event FITS file (only if 'createinstrmap=yes').
- hdfile [file name]
- Name of the input Housekeeping Header Packets FITS file (only if 'createinstrmap=yes').
- (fovfile = CALDB)[file name]
- Name of the file containing the Field of View geometry description. If set to
'CALDB' (default value) uses the file in the Calibration Database (only if 'createinstrmap=yes').
- (vigfile = CALDB) [file name]
- Name of the input vignetting FITS file. If set to 'CALDB' (default value) uses the file
in the Calibration Database (only if 'createinstrmap=yes').
- (wtnframe=10) [integer]
- Number of frames considered together in the instrument map calculation for WT (POINTING mode only). If set to 0, produce an
instrument map for a set of consecutive frames separated by less than 100 seconds (only if 'createinstrmap=yes').
- (pcnframe=4) [integer]
- Number of frames considered together in the instrument map calculation for PC mode. If set to 0, produce an
instrument map for a set of consecutive frames separated by less than 100 seconds (only if 'createinstrmap=yes').
- instrfile [file name]
- Name of the input RAW Instrument Map file (only if 'createinstrmap=no').
- (clobber=no) [boolean]
- If set to 'yes', existing output files with the same name are overwritten.
- (history=yes) [boolean]
- If set to 'yes', writes parameter values and other information in HISTORY blocks.
- (chatter = 2) [integer]
- Chatter Level (min=0, max=5).
EXAMPLES
- Reads in input a FITS light curve and generates in output the corresponding rate correction file
(sw00052100007xwtw2posr_corrfact.fits) and corrected light curve (sw00052100007xwtw2posr_corr.lc).
The attitude, event list and housekeeping header files are also read in input and used to generate
the instrument map in RAW coordinates (sw00052100007xwtw2posr_srawinstr.img):
> xrtlccorr lcfile=sw00052100007xwtw2posr.lc regionfile=NONE outfile=DEFAULT
corrfile=DEFAULT attfile=sw00052100007sat.fits.gz outinstrfile=DEFAULT
infile=sw00052100007xwtw2po_cl.evt hdfile=sw00052100007xhdtc.hk
BUGS
SEE ALSO
LAST MODIFIED
January 2014