Synopsis
Identify and patch HRC Secondary Science Corruption (SSC) data
Syntax
patch_hrc_ssc dtf_infile mtl_infile evt_infile evt_outfile gti_outfile dtf_outfile threshold [smooth_count] [tmpdir] [verbose] [clobber]
Description
SSC results from a byte-shift anomaly which occasionally causes a portion of the housekeeping data to be corrupted. The symptom is dropouts in the dead-time-factor (dtf) which can be seen in a plot of the dtf1 file's dtf valuse vs time, where the dtf is significantly (>10%) below the median value (~1.0).
In the dtf1 file are several rate columns. The one that seems to reliably flag SSC is the TOTAL_EVT_COUNT, when it is anomalously high, with values > 4000 (2000 count/s; the default binning is 2s, the dtf file values are integrated over time bins)
Event data are good during the SSC times. Standard data processing, however, will create multiple GTI intervals around the low dtf times, rejecting some events, and lowering the dead-time-correction factor (DTDOR).
Note: telemetry saturation from a bright source can also cause lower dtf values. That tends to be a more continuous and sustained lowering of the value. Hence, inspection of the dtf and total_evt_count vs time is recommended.
Technical References:
Chandra Proposers and Observatory Guide secion on HRC SSC
HRC Secondary Science Anomaly on Day 2005:349
Pseudo-MSIDs in the engineering archive
Examples
Example 1
patch_hrc_ssc dtf_in=primary/hrcf27499_000N001_dtf1.fits \ mtl_infile=secondary/hrcf27499_000N001_mtl1.fits \ evt_infile= secondary/hrcf27499_000N001_evt1.fits \ evt_outfile=patched_evt1.fits \ dtf_outfile=patched_dtf1.fits \ gti_outfile=patched_flt1.fits clob+ mode=h
patch_hrc_ssc (10 October 2024) dtf_infile = primary/hrcf27499_000N001_dtf1.fits mtl_infile = secondary/hrcf27499_000N001_mtl1.fits evt_infile = secondary/hrcf27499_000N001_evt1.fits evt_outfile = patched_evt1.fits gti_outfile = patched_flt1.fits dtf_outfile = patched_dtf1.fits threshold = 4000 smooth_count = 3 tmpdir = /tmp verbose = 1 clobber = yes mode = h SSC detected; patching DTF_MEDIAN = 0.99117975 (0.0007477008299119561) Patching DTF values in primary/hrcf27499_000N001_dtf1.fits Patching DTF values in /tmp/tmprtqf975j_mtl.fits Creating new GTI limits Make new flt file... Recomputing DTF stats New DTCOR=0.9912249218272523 Updating DTCOR in event file and recomputing EXPOSURE time
In this example, OBS_ID 27499 experiences secondary science corruption which is detected and patched by the script. The output files are a new dead time factors file (dtf1.fits), a new level 1 event file (evt1.fits), and a new good time intervals, aka filter file, (flt1.fits).
The script must be run with the level 1 event file since the level 2 event file already has data outside the bad intervals removed.
Example 2
patch_hrc_ssc dtf_in= primary/hrcf01297_000N004_dtf1.fits \ evt_in=secondary/hrcf01297_000N004_evt1.fits \ mtl_in=secondary/hrcf01297_000N004_mtl1.fits \ dtf_out=patched_dtf1.fits evt_out=patched_evt1.fits gti_out=patch_flt1.fits \ mode=h clob+
patch_hrc_ssc (10 October 2024) dtf_infile = primary/hrcf01297_000N004_dtf1.fits mtl_infile = secondary/hrcf01297_000N004_mtl1.fits evt_infile = secondary/hrcf01297_000N004_evt1.fits evt_outfile = patched_evt1.fits gti_outfile = patch_flt1.fits dtf_outfile = patched_dtf1.fits threshold = 4000 smooth_count = 3 tmpdir = /tmp verbose = 1 clobber = yes mode = h SSC not detected, no action required.
In this example with OBS_ID 1297, there is no secondary science corruption detected. In this case there are no output files create and the exit status of the tool is 0 (ie good).
Parameters
name | type | ftype | def | min | max | reqd |
---|---|---|---|---|---|---|
dtf_infile | file | input | yes | |||
mtl_infile | file | input | yes | |||
evt_infile | file | input | yes | |||
evt_outfile | file | output | yes | |||
gti_outfile | file | output | yes | |||
dtf_outfile | file | output | yes | |||
threshold | integer | 4000 | yes | |||
smooth_count | integer | 3 | ||||
tmpdir | file | output | ${ASCDS_WORK_PATH} | no | ||
verbose | integer | 1 | 0 | 5 | ||
clobber | boolean | no |
Detailed Parameter Descriptions
Parameter=dtf_infile (file required filetype=input)
The input Level 1 dead time factors file, dtf1.fits.
Parameter=mtl_infile (file required filetype=input)
The input Level 1 mission time line file, mtl1.fits.
Parameter=evt_infile (file required filetype=input)
The input Level 1 event file, evt1.fits.
Users should use the Level 1 event file because you cannot recover the updated Good Time Intervals from the already filtered Level 2 event file.
Parameter=evt_outfile (file required filetype=output)
The output Level 1 event file.
The output level 1 event file is a copy of the input level 1 event file with the following keywords modified:
- DTCOR : This value is updated based on the patched dead time factor values.
- DTFFILE : This keyword is updated to be the dtf_outfile file name.
- FLTFILE : This keyword is updated to be the gti_outfile file name.
- SSC = True : This keyword indicates that the secondary science corruption was detected.
- SSCFIX = True: This keyword indicates that the secondary science correction was fixed (patched).
This file should be used in place of the standard archived Level 1 event file in processing.
Parameter=gti_outfile (file required filetype=output)
The output good time intervals, aka filter, file.
The good time intervals are recomputed from the mission time line file based on the patched DTF values and removing the limit on the IMHVLV and IMHBLV values.
Parameter=dtf_outfile (file required filetype=output)
The output dead time factors file.
The median DTF and DTF_ERR values outside the secondary science correction time are used to replace the values in the dtf_infile.
Parameter=threshold (integer required default=4000)
The TOTAL_EVT_COUNT threshold used to identify SSC.
Parameter=smooth_count (integer default=3)
Smoothing applied to the TOTAL_EVT_COUNT column
The TOTAL_EVT_COUNT column is smoothed over this many rows when looking for values above the threshold parameter.
Parameter=tmpdir (file not required filetype=output default=${ASCDS_WORK_PATH})
Temporary working directory
Directory used to store temporary file created by the script.
Parameter=verbose (integer default=1 min=0 max=5)
Amount of tool chatter level.
Parameter=clobber (boolean default=no)
Overwrite output files if they already exist?
About Contributed Software
This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see this page for installation instructions.
Bugs
See the bug pages on the CIAO website for an up-to-date listing of known bugs.
Refer to the CIAO bug pages for an up-to-date listing of known issues.
See Also
- chandra
- eventdef
- tools::hrc
- hrc_build_badpix, hrc_dtfstats, hrc_process_events