hxtdead - a program that corrects a HEXTE spectral or light curve FITS file for detector dead time, including correction for time lost to the rocking motion.
hxtdead ["coefficients_file" "rates_file" "science_file" "file_to_correct"]
hxtdead corrects a HEXTE spectral or light curve FITS file for detector dead time, including correction for time lost to the rocking motion.
The program is applied to .pha or .lc files produced by seextrct or saextrct from a single FITS file of HEXTE event-list data or archive data, respectively.
If the input file list is not present, the hxtdead program queries the user for a calibration file and three HEXTE files spanning the data interval: the 16-second housekeeping file (FH53... or FH59...), the science data file (FS50... or FS56... or FS52... or FS58... ) which was input to seextrct, and finally the spectral (.pha) or light curve (.lc) file to be corrected. The coefficients files, one for each cluster, may be installed in the calibration data base and are then most conveniently referred to with the word CALDB.
After obtaining the inputs, hxtdead first collects counting rates of discriminators upon which dead time depends. Next it reads the science data file for the value of the dead time counter, calculates the live time for each 16-sec frame of data, and the running sum. Finally the spectral or light curve file is modified. The keyword DEADAPP is inserted, with value T.
Spectral files are given a new, smaller, value for the EXPOSURE keyword, and the previous value is written to a new keyword, OLDEXP. If the spmode=RATE option to the extract program was employed, rather than SUM, the values of the RATE and STAT_ERR column are also revised upwards. Light curve files with the lcmode=RATE option, not SUM, are supported. These have a new column DEADLC written, whose values are in the range 0.4 to 0.7, and the RATE and ERROR columns are rewritten with larger values determined from the dead time correction. The saextrct option accum=MANY is supported.
1. Simple invocation
hxtdead
User will be prompted for filenames. The spectral or light curve file selected from the last prompt will be modified. If spectral, then the keyword EXPOSURE is modified. If a light curve in RATE format, then it will have a new column, DEADLC, written and the values of the RATE and ERROR columns are revised upwards. Other keywords are added to indicate that the file has been dead-time corrected.
2. Run using CALDB
hxtdead caldb FH53_3f3ad0b-3f3b060 d0b-3f3b040_src FS50_3f3ad0b-3f3b040_src.pha
Script will run without prompting, using as input the dead-time coefficients file in the calibration data base and the three files FHfd_3f3ad0b-3f3b080, FH53_3f3ad0b-3f3b060, FS50_3f3ad0b-3f3b040_src, FS50_3f3ad0b-3f3b040_src.pha. The last file will have the value of the EXPOSURE keyword changed, and other new keywords added.
3. Run using explicit files
hxtdead hxtdead_97jul2_pwa.fits FH53_3f3ad0b-3f3b060 FS50_3f3ad0b-3f3b040_src FS50_3f3ad0b-3f3b040_src.lc
Script will run without prompting, using as input the four files hxtdead_97jul2_pwa.fits, FH53_3f3ad0b-3f3b060, FS50_3f3ad0b-3f3b040_src, FS50_3f3ad0b-3f3b040_src.lc. If the accumulation was performed with the lcmode=RATE option The last file will have a new column, DEADC, written and the values in the RATE and ERROR columns will be revised upwards.
The program works for event-list and any archive data, but not for other binned data modes. The SEEXTRCT and SAEXTRCT spmode=MEAN and lcmode=MEAN modes are also not supported. Light curve files accumulated with the lcmode=SUM option are not supported.
For a very few data files in the early mission, when instrument parameters were being changed, the program will stop and complain that the XULD duration was not constant. The only fix is to split up the file(s) with fselect. For archive data created with versions of XFF earlier than 5.3.1, hxtdead quits with a not-very-helpful message if the third argument was the hxtback-selected data file. The fix is to rerun using the XFF-produced file directly, i. e., no _bkg or _src at the end of the file name.
The list-of-files option for input to the extract programs is NOT supported. It is very important to use the most up-to-date version of the extract tools. hxtdead assumes that each data set has housekeeping files which completely overlap the science data files. This is occasionally untrue, and hxtdead will stop with an informative message. The only fix is to rewrite the science file(s) to start later or end earlier, as needed.
SEEXTRCT, SAEXTRCT and HXTBACK for more information.