The rslsamcnt task calculates the XRISM Resolve local time and fills the sample count column(s) that represent the fine time resolution assigned internally by the instrument electronics. This is used to assign time using the xatime task. After rslsamcnt is executed, xatime synchronizes the fine local time to the TT time (obtained via the GPS). It may be applied to Resolve (pixel and antico) event, diagnostic mode, lost GTI, and HK files. The diagnostic mode files that this task is applied to are the pixel and antico WaveForm Ring-Buffer (WRFB), antico and pixel Noise Record, and pixel Pulse Record data files.
The input file columns required to calculate sample count depend on file type, and may be specified using the appropriate subset of 'col1', 'col2', 'col3', col4', and 'col5' parameters. There are four general file types: PIXEL, ANTICO, HK, and GTILOST. Each file type supports various input file types. The PIXEL file type supports: pixel event (e.g., p0px), pixel noise record (e.g., pxnr), and pixel pulse record (e.g., pxpr) input file types. The ANTICO file type supports: antico event (e.g., a0ac), antico noise record (e.g., acnr), antico WFRB (e.g., acwf), and pixel WFRB (e.g., pxwf) input file types. The HK and GTILOST file types only support Resolve HK (e.g., *rsl.hk1) and lost GTI (e.g., *rsl_el.gti) input file types, respectively.
For the PIXEL file type, by default the input file columns are ('col1') TRIG_LP, a rough event trigger time, ('col2') TIME_VERNIER, a fine time correction, ('col3') WFRB_WRITE_LP, a reference for TRIG_LP, and ('col4') WFRB_SAMPLE_CNT, a reference for SAMPLECNT. For the ANTICO file type, by default, the input file columns are ('col1') TRIG_LP, ('col3') WFRB_WRITE_LP, ('col4') WFRB_SAMPLE_CNT, and ('col5') FLG_EVENT_LOST. For the HK file type, by default, the input file columns are ('col1') LATCH_SAMPLE_CNT1, a reference for SAMPLECNT, and ('col2') LATCH_BASE_CNT1, a fine clock value. For the GTILOST file type, by default, the input file columns are ('col1') EL_#_LP, which is the TRIG_LP for the beginning and end of the interval, ('col3') WFRB_WRITE_LP, and ('col4') WFRB_SAMPLE_CNT. The hash (#) symbol for the GTILOST file type directs the task to calculate two sample count values using values in the columns EL_START_LP and EL_STOP_LP. For ANTICO and GTILOST file types, the value(s) specified by the parameter(s) 'timever1' and 'timever2' (GTILOST only) set the TIME_VERNIER (fine time correction used in the sample count calculation(s). Since antico event times and lost GTI are used in event screening, this allows for some margin and/or offset relative to pixel events.
The result of the sample count calculation is written in the column(s) set by the parameter 'outcol'. The file type also determines the default number of columns and column names: SAMPLECNT for the ANTICO and HK file types, SAMPLECNT1 and SAMPLECNT2 for the GTILOST file type (corresponding to EL_START_LP and EL_STOP_LP, respectively), and SAMPLECNT and SAMPLECNTTRIG for the PIXEL file type. SAMPLECNTTRIG, is derived in a similar manner to the other local time values, and enables the calculation of the event trigger time by xatime. SAMPLECNT for the PIXEL file type, which enables the calculation of the event arrival time by xatime, is derived from a polynomial function of SAMPLECNTTRIG, whose coefficients are stored in CalDB. The table below also shows the file types and their corresponding columns, as well as the output column ('outcol') and the time vernier values ('timever1' and 'timever2') where applicable.
Default values for parameters for each file type:============================================================================================================================================ File col1 col2 col3 col4 col5 timever1 timever2 outcol | corresponding Type | # columns ============================================================================================================================================ PIXEL TRIG_LP TIME_VERNIER WFRB_WRITE_LP WFRB_SAMPLE_CNT -- -- -- SAMPLECNT# | SAMPLECNT, | SAMPLECNTTRIG -------------------------------------------------------------------------------------------------------------------------------------------- ANTICO TRIG_LP -- WFRB_WRITE_LP WFRB_SAMPLE_CNT FLG_EVENT_LOST 0 -- SAMPLECNT | -------------------------------------------------------------------------------------------------------------------------------------------- HK LATCH_SAMPLE_CNT1 LATCH_BASE_CNT1 -- -- -- -- -- SAMPLECNT | -------------------------------------------------------------------------------------------------------------------------------------------- GTILOST EL_#_LP -- WFRB_WRITE_LP WFRB_SAMPLE_CNT -- 23 -8 SAMPLECNT# | SAMPLECNT1, | SAMPLECNT2 ============================================================================================================================================
rslsamcnt hk_in.fits hk_out.fits
rslsamcnt event_in.fits event_out.fits
rslsamcnt antico_in.fits antico_out.fits
rslsamcnt lost_in.gti lost_out.gti timever1=30 timever2=-15