'xrttimetag' uses the readout time values stored in the ROTIME column and writes the calculated time value in the TIME column of the output file. A keyword XRTTIMES set to TRUE (T) is added to the header to indicate that the file has been already processed by the task. The columns TSTART and TSTOP in the GTI extension are updated by the task as are the keywords ONTIME, LIVETIME, DEADC and EXPOSURE.
The time tag of the events requires the knowledge of the source location on the CCD. This is usually determined using data collected when the instrument operates in imaging mode. Since the WT and PD have either a limited or no spatial resolution, it is not possible to discriminate between source and background events, and the time tagging is done assuming that all the events are from the source.
If the parameter 'usesrcdet' is set to no (default) the source detector coordinates
(with the exception of DETX for the WT mode, see below) are calculated, and written in the
DETX/DETY columns, using the celestial coordinates (J2000.0)
of the source (specified through the parameters 'srcra' and 'srcdec'), the RA and Dec of the
nominal pointing (parameters 'ranom' and 'decnom') and the attitude file (parameter 'attfile').
During the slews the time tag of the events assumes that all the events are at
position (300,300) in detector coordinates and the input 'srcra' and 'srcdec' are ignored.
For the Windowed Timing mode, the RAWX coordinates are transformed to DETX using the teldef file
stored in CALDB. If needed, the task corrects telemetered RAWX values using information from the
file specified by the 'colfile' parameter.
The source detector coordinates, with the exception of DETX for the WT mode, can also be specified through the parameters 'srcdetx' and 'srcdety' if the parameter 'usesrcdet' is set to 'yes'. Note that this last option should not be used since it produces i) less accurate photon arrival times (both WT and PD modes) and ii) less accurate sky coordinates (WT mode only).
For the Windowed Timing mode only, xrttimetag also converts the detector coordinates into sky coordinates and writes their values in the X/Y columns of the output files. The sky coordinates calculation makes use of the the RA and Dec of the nominal pointing (parameters 'ranom' and 'decnom') and of the attitude file (parameter 'attfile').
The first frame taken in PD mode contains pixels which are not completely exposed. These pixels can be eliminated by setting the parameter 'npixels'. In addition, it is possible to exclude PD frames considered piled-up (parameter 'percent'), by calculating the percentage of events per frame that have a DN value above the on-board upper level discriminator. Non completely exposed pixels and piled-up frames are excluded from the GTI.
'xrttimetag' can be re-run on the same event file if a better source position is known and and the 'TIME', 'DETX', 'DETY', 'X' and 'Y' (WT only) columns are recalculated and overwritten.
All the other columns of the EVENTS extension of the input file are copied to the output file without changes.
> xrttimetag infile=sw00052100007xwtw2po_uf.evt outfile=NONE attfile=sw00052100007sat.fits hdfile=sw00052100007xhdtc.hk trfile=sw00052100007xtr.hk srcra=166.13375 srcdec=38.21742 ranom=166.133 decnom=38.21 chatter=5