The task xatime assigns times to all XRISM science and HK data files. By default, the calculated times are written in the column TIME (see parameter 'timecol') for science and HK data files, and in the columns START and STOP for GTI files. Only for the HK files are the times also written as UTC time in the columns YYYY, DDD, HH, MM, SS, and US. The time calculation always requires the following supporting input files: a) the TIM file ('timfile') containing the TI vs. TIME relation; b) the CalDB column definition file ('coldeffile') containing the column names appropriate for the instrument; and c) the leap seconds file ('leapsecfile'). All science data also require the CalDB delay file ('delayfile') containing the delay added last to the calculated time. The Resolve science data also require a look-up table stored in the instrument-specific HK extension for fine time assignment. The delay file and the HK look-up table are not required when calculating the times for the HK file.
The framework to assign time is based on a three-step process using two different look-up tables. For Resolve science files, the xatime task first derives the fine time, in units of L32TI, using a look-up table in the instrument HK (step 1). The fine time is assigned internally by the instrument processor. Next, the xatime task derives the time using the look-up table in the TIM files providing the TI vs. TIME relation (step 2). Lastly, when appropriate, the task adds a delay time between the on-board computer and the instrument (step 3). For HK data, step 1 and 3 are skipped because there is no need for a fine time assignment. An exception is the Resolve MXS HK, where a delay time is added (step 3). For Xtend science files, step 1 is skipped because the event data already includes fine time information, but the xatime task calculates the times considering the DATAMODE (if DATAMODE is WINDOW1, WINDOW2, WINDOW1BURST, or WINDOW2BURST), and this requires several keywords to be present in the event file (TIMEDEL, TIMTRANB, EXPDEADB, TIMTRANA, EXPDEADA, FLUSHIMB, LASTDEAD, LASTDEL, NOMEXPO, and TIMEPIXR).
The xatime task updates header keywords (TSTART, TSTOP, DATE-OBS, and DATE-END) in the primary and table extensions of the target FITS file. The smallest and largest values of the TIME column are used to calculate the values of these keywords. If the file contains more than one extension, as for the case of an HK file, the xatime task calculates time in all extensions. The header keywords in this case, are updated as follows: the primary header TSTART and TSTOP correspond to the smallest start and the largest stop values, considering all the extensions, while in each extension the TSTART and TSTOP are based on the smallest and largest times in the TIME column of the extension. The TIME column output from the xatime task is not time ordered.
xatime infile=xa100050010gen_a0.hk1 outfile=xa100050010gen_out.hk timfile=xa100050010.tim lookupfile=NONE
xatime infile=xa100050020rsl_p0px1010_uf.evt outfile=xa100050020rsl_out.hk timfile=xa100050020.tim lookupfile=xa100050020rsl_a0.hk1