By setting the parameter 'corrtype' to 'NOMINAL', the 'xrtcalcpi' task calculates the PI values using the PHA values, stored in the PHA column of the input event file, the gain and a set of coefficients describing the average spatial dependence of the gain. The coefficient values have been evaluated from on-ground calibration data at three fixed temperature of the CCD and are periodically updated using the results of the in-flight calibration data analysis. The gain information is stored in the XRT calibration gain files which are included in CALDB. There is one similarly formatted gain calibration file for each readout mode. The coefficients describing the gain and its average spatial dependence for the three temperatures values are stored in the arrays GC0 - GC5 of the FITS files in CALDB. The GC1 and GC2 coefficients are energy dependent following a broken power-law model with indices 'beta1' and 'beta2' and break energy value, in PI units, 'ecti'. By default, the values of 'beta1', 'beta2' and 'ecti' are read from the CALB gain files. The user may specify in input their values by setting the parameter 'userctipar' to 'yes'. The PI values calculation is the result of an interpolation on temperature and on time. First, for each event the two rows valid for the epochs closest to the time of the observation are chosen. Then for each row, given the temperature of the frame, the task performs a temperature interpolation of the gain coefficients between the two nearest temperatures to the one of the frame, thus obtaining two sets of coefficients for two contiguous timestamps. Finally, a second interpolation with respect to time between these two sets of coefficients is performed.
By setting the parameter 'corrtype' to 'TOTAL' (default), in addition to the PI calculation described above, the task also applies a specific column to column correction to account for the effect of the charge traps. This correction is calculated by adding an energy offset to the events falling within column segments affected by a charge loss due to a trap. A broken power-law energy dependence for the charge trap correction is also applied by the task. The energy offset is calculated through an iterative algorithm with the number of steps set by the parameter 'offsetniter' value. The charge traps information (location on the CCD, offset, energy dependence) is stored in the XRT calibration gain files included in CALDB. Optionally (parameter 'userctcorrpar=yes'), the broken power-law energy dependence of the charge trap correction can be supplied by the user through the parameters 'alpha1', 'alpha2' and 'ebreak'. Note that when this correction is applied, the task uses a different set of GC coefficients (GC0_TRAP, GC1_TRAP, GC2_TRAP, GC3_TRAP, GC4_TRAP, GC5_TRAP) and a different set of parameters for the GC1/GC2 energy dependence (BETA1_TRAP, BETA2_TRAP, E_CTI_TRAP) read from the CALDB gain files.
The task allows to store in a specific column (PI_NOM) of the output event file the PI values obtained without the charge traps correction (parameter 'savepinom' set to 'yes').
'xrtcalcpi' by default uses the XRT gain file, appropriate for each mode, stored in CALDB, but it can be replaced with an input gain file supplied by the user (parameter 'gainfile'). The user-provided gain file must have the same format as the XRT gain file in the Calibration Database.
The algorithm describing the spatial dependence of gain is expressed in raw coordinates, RAWX and RAWY. For the timing modes (WT and PD), for which the telemetry does not contain complete spatial information, 'xrtcalcpi' accounts for the positional gain correction assuming all events at the source location. For the WT mode, the RAWX coordinate of the event is known and the RAWY is obtained by transforming the DETY column value. For the Photodiode mode the event detector coordinates are read from the DETX/DETY columns of the event file and transformed in RAWX/RAWY.
The unit of the PI column is set to 10 eV per channel. Users can adjust the PI values via the parameter 'offset' and 'gainnom'. These values can be obtained with the XSPEC command 'gain' that provides a slope and a constant. The parameter 'offset' should be set equal to the constant obtained by the XSPEC 'gain' command and the parameter 'gainnom' should be set equal to the slope obtained by the XSPEC 'gain' command multiplied by the default value of eV per channel (10).
xrtcalcpi infile=sw00111622000xwtw2po_uf.evt.gz outfile=outfile.fits hdfile=sw00111622000xhd.hk.gz