About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: 1 Dec 2006
Hardcopy (PDF): A4 | Letter

Computing Average HRC Dead Time Corrections

[CIAO 3.4 Science Threads]



Overview

Last Update: 1 Dec 2006 - new for CIAO 3.4

Synopsis:

HRC deadtime corrections are determined as a function of time from detector total event and valid event counters (usually sampled every 2.05 seconds but may differ, depending on telemetry format) and written to a deadtime factor (dtf1) file. The average deadtime correction (DTCOR) for an observation is computed from the dtf1 file, filtered by the relevant good time intervals, and is applied to the corresponding ONTIME to compute the LIVETIME (and EXPOSURE) of the observation. If the user applies different time filters, DTCOR, LIVETIME, and EXPOSURE keyword values should be updated.

Purpose:

To recompute deadtime statistics from an HRC deadtime factor file (dtf1.fits) with different time filters from those used in standard processing, and to use them to update the DTCOR, LIVETIME, and EXPOSURE of the observation.

Read this thread if:

  • your data was processed with software version 7.6.4 through 7.6.7: a bug in HRC standard processing led to the use of incorrect good time intervals (GTIs) in the calculation of DTCOR in the dtfstats file, and hence the LIVETIME and EXPOSURE. This bug was introduced in processing version 7.6.4 and resolved in 7.6.8. Users whose datasets were processed with these software versions should follow this thread to verify the deadtime corrections in their data. Get Started shows how to determine what version of the software has been applied to your data.

  • if you are working with an HRC dataset and you wish to time-filter the event list in a manner different from that used in standard processing, particularly if the deadtime factors in the dtf1 file have been flagged as variable in the standard deadtime statistics (std_dtfstat1) file.

Proceed to the HTML or hardcopy (PDF: A4 | letter) version of the thread.




Contents



Get Started

Sample ObsID used: 5969 (HRC-S, Vega)

File types needed: evt1 or evt2; dtf1

This thread should be done after any necessary reprocessing is completed (e.g. running hrc_process_events).

In this thread, we assume that all relevant files are in the same working directory.

The software version is stored in the ASCDSVER header keyword:

unix% dmkeypar hrcf05969_000N003_dtf1.fits ASCDSVER echo+
7.6.7

Since these data were processed with a processing version between 7.6.4 and 7.6.7, they are affected by the bug described in the Overview, so we will complete this thread in its entirety.



Examine the deadtime corrections

We examine the individual deadtime corrections in the dtf1.fits file by plotting it in ChIPS:

unix% chips

Welcome to ChIPS, version CIAO 3.4
Copyright (C) 1999-2003, Smithsonian Astrophysical Observatory

chips> curve "hrcf05969_000N003_dtf1.fits[cols time,dtf]"
chips> simpleline
chips> red

The plot is shown Figure 1 [Link to Image 1: 
        Plot of deadtime correction value vs. time
      ]. The curve indicates a sharp drop from ~1 to ~.4 in dtf around 2.253398e8 s and a rise back to ~1 near 2.253418e8 s, due to slew on and off the target, a very bright x-ray source subject to telemetry saturation.

However, the average deadtime correction in the evt2 event list is ~0.97:

chips> quit

unix% dmlist hrcf05969N003_evt2.fits header | egrep 'DTCOR|ONTIME|LIVETIME|EXPOSURE'
0091 ONTIME                    2189.4000990987 [s]       Real8        
0092 DTCOR                    0.97910268724769           Real8        Dead time correction
0093 LIVETIME                  2143.6475204879           Real8        Ontime multiplied by DTCOR
0094 EXPOSURE                  2143.6475204879           Real8        Total exposure time, with all known corr. appl.

This indicates the the dtf1.fits data were not properly time-filtered in calculating the average deadtime correction.

An examination of the GTIs in the event list confirm the times cited above, with a bit more accuracy:

unix% dmlist hrcf05969N003_evt2.fits"[gti]" data,clean
#  START                STOP
 225339799.7114064991 225341989.1115055978


Recompute the deadtime statistics

These GTI information may be used to recompute the deadtime statistics using the tool hrc_dtfstats. The tool takes the existing dtf1.fits file and creates a new file with the event GTI information applied.

unix% punlearn hrc_dtfstats
unix% pset hrc_dtfstats infile=hrcf05969_000N003_dtf1.fits
unix% pset hrc_dtfstats outfile=hrcf05969_dtfstats_new.fits
unix% pset hrc_dtfstats gtifile=hrcf05969N003_evt2.fits"[gti]"
unix% hrc_dtfstats
Input file (hrcf05969_000N003_dtf1.fits): 
Output file (hrcf05969_dtfstats_new.fits): 
File containing GTI to filter on (<filename>|NONE) (hrcf05969N003_evt2.fits[gti]): 

The contents of the parameter file may be checked using plist hrc_dtfstats.

The new dtfstats file has a value of DTCOR=0.35535, which agrees with the plot in Figure 1:

unix% dmlist hrcf05969_dtfstats_new.fits"[cols DTCOR]" data,clean
#  DTCOR
     0.35535140943668


Update the Event File

Finally, we update the event list header values of LIVETIME and EXPOSURE, obtained by multiplying the ONTIME by the correct value of DTCOR. The file is copied first, to preserve the original, then edited with dmhedit.

unix% echo "2189.40009910*0.35535140943668" | bc -l
778.00641103599186717498

unix% dmcopy hrcf05969N003_evt2.fits hrcf05969N003_evt2_new.fits

unix% dmhedit hrcf05969N003_evt2_new.fits filelist="" op=add key=LIVETIME value=778.0064110
unix% dmhedit hrcf05969N003_evt2_new.fits filelist="" op=add key=EXPOSURE value=778.0064110
unix% dmhedit hrcf05969N003_evt2_new.fits filelist="" op=add key=DTCOR value=0.35535140943668

unix% dmlist hrcf05969N003_evt2_new.fits header | egrep 'ONTIME|LIVETIME|EXPOSURE|DTCOR'
0091 ONTIME                    2189.4000990987 [s]       Real8        
0092 DTCOR                    0.35535140943668           Real8        Dead time correction
0093 LIVETIME                   778.0064110              Real8        Ontime multiplied by DTCOR
0094 EXPOSURE                   778.0064110              Real8        Total exposure time, with all known corr. appl.

The corrected event list should be used for all further analysis.




Parameters for /home/username/cxcds_param/hrc_dtfstats.par


        infile = hrcf05969_000N003_dtf1.fits Input file
       outfile = hrcf05969_dtfstats_new.fits Output file
       gtifile = hrcf05969N003_evt2.fits[gti] File containing GTI to filter on (<filename>|NONE)
      (maincol = DTF)             Name of the deadtime factor column
       (errcol = DTF_ERR)         Name of the deadtime factor error column
     (chisqlim = 5)               Limit for the variability test
      (clobber = no)              Clobber the output file if it exists
      (verbose = 0)               Verbose level.
         (mode = ql)              
    

History

01 Dec 2006 new for CIAO 3.4

Return to Threads Page: Top | All | Data Prep
Hardcopy (PDF): A4 | Letter
Last modified: 1 Dec 2006


The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.