.help  hxtdead 1 "14 Jan 1998"
.ih
NAME
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.  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.
.ih
USAGE
hxtdead ["coefficients_file" "rates_file"  "science_file" "file_to_correct"] 
.ih
DESCRIPTION
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.
.ih
PARAMETERS
.ls calvalf [string - file name]
Calibration file
.le
.ls engvalf [string - file name]
File containing status apid values (FH5{39})
.le
.ls eventarcf [string - file name]
File containing events list/archive data (FS5{0268})
.le
.ls phalcf [string - file name]
pha/lc file to be modified]
.le
.ls (chatter = 5) [integer]
How much info do you want? (0=none, 20=all)
.le
.ls (detectors = -) [string]
Detector list. - = all (default); x, xx, xxx, xxxx where x = 0, 1, 2 or 3
.le
.ih
EXAMPLES
.nf

1. hxtdead

.fi
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.
.nf

2. hxtdead caldb FH53_3f3ad0b-3f3b060 d0b-3f3b040_src FS50_3f3ad0b-3f3b040_src.pha

.fi
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.
.nf

3. hxtdead hxtdead_97jul2_pwa.fits FH53_3f3ad0b-3f3b060 FS50_3f3ad0b-3f3b040_src FS50_3f3ad0b-3f3b040_src.lc

.fi
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.
.ih    
NOTES:
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.
.ih
BUGS
.le
.ls Please report problems to xtehelp@athena.gsfc.nasa.gov.
.le
.ih
SEE ALSO
SEEXTRCT, SAEXTRCT and HXTBACK for more information.
.endhelp
