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

Remove the acis_detect_afterglow Correction

[CIAO 3.4 Science Threads]



Overview

Last Update: 1 Dec 2006 - reviewed for CIAO 3.4: no changes

Synopsis:

An afterglow is the residual charge from the interaction of a cosmic ray in a CCD. Some of the excess charge is captured by charge traps and released in a few to a few dozen subsequent frames. If afterglow events are not removed from the data, they can result in the spurious "detection" of faint sources.

Prior to version DS 7.4.0, standard data processing (SDP, aka "the pipeline") used the tool acis_detect_afterglow to flag possible cosmic ray events in the level 1 event file; these are then filtered out in the level 2 event file. It was determined that 3-5 % of the valid source photons may be rejected from diffracted spectra. These rejections, though a small fraction of the total events, are systematic and non-uniform. A significant fraction of the X-ray events from a source in imaging mode may also be removed.

A new, more precise method for identifying afterglow events was introduced to SDP at version DS 7.4.0, namely the ACIS hot pixel tools. The afterglow status bits in data that were processed with acis_detect_afterglow must be reset so that they may be properly recomputed. After running this thread, users should complete the Create a New ACIS Bad Pixel File: Identify ACIS Hot Pixels and Cosmic Ray Afterglows thread.

Purpose:

To reset the status bits 16 through 19, removing the effects of the acis_detect_afterglow processing. How to examine the events marked as afterglows is also shown.

Read this thread if:

you are working with any ACIS observation processed with an SDP version lower than DS 7.4.0. Since acis_detect_afterglow was part of SDP, both grating and non-grating data are affected.

Removing the afterglow correction is especially important if your source is piled and you intend use the jdpileup model in Sherpa or XSPEC; read the Pileup Talk for more information, in particular Data Preparation and Caveats. Note that the new hot pixel tools are more judicious with respect to throwing away piled source events.

Related Links:

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




Contents



Get Started

Sample ObsID used: 459 (HETG/ACIS-S, 3C 273)

File types needed: evt1

To see which processing version was used on the data:

unix% dmkeypar acisf00459_000N002_evt1.fits ASCDSVER echo+
R4CU5UPD11.1

This observation was processed before acis_detect_afterglow was replaced in the pipeline, i.e. the ASCDSVER is lower than DS 7.4.0. Note that the version naming convention changed after version R4CU5UPD14 to the "DS" system, starting with DS 6.0.0.



Examine the Afterglow Events (Optional)

It is possible to display the spatial distribution of events flagged by acis_detect_afterglow. Here we have defined a filter that excludes cases in which none of the afterglow status bits (16-19, counting from the right, starting at zero) are marked as bad (1). The other bits are filtered on the wildcard "x", which lets either a good or bad value pass. This filter retains the events in which any of the afterglow flags have been set to 1:

unix% dmcopy \
      "acisf00459_000N002_evt1.fits[exclude status=xxxxxxxxxxxx0000xxxxxxxxxxxxxxxx]" \
      acis_459_afterglows_evt1.fits

In this case, displaying the file in ds9 [Link to Image 1: Image of the afterglow events] shows that the source is clearly visible, meaning that many source photons have been marked as afterglows.



Reset the Status Bits

The tool dmtcalc is used to reset the status bits.

The expression selects the afterglow bits (status=X15F,status=X14F,status=X13F,status=X12F) and sets them to "0" (False), while retaining the original value of all other status bits (status=status). The tool counts the bits in the opposite direction (left-to-right vs. right-to-left), so the numbers 15-12 in the expression correspond to bits 16-19.

unix% punlearn dmtcalc
unix% pset dmtcalc infile=acisf00459_000N002_evt1.fits 
unix% pset dmtcalc outfile=acis_459_reset_evt1.fits 
unix% pset dmtcalc expression="status=status,status=X15F,status=X14F,status=X13F,status=X12F"
unix% dmtcalc
Input file (acisf00459_000N002_evt1.fits): 
Output file (acis_459_reset_evt1.fits): 
expression(s) to evaluate (status=status,status=X15F,status=X14F,status=X13F,status=X12F): 

Since the file is processed line-by-line, this step can take awhile to run. Tests on a SunBlade100 (384 MB main memory) took approximately 1 minute per 12000 rows.

The new output file, acis_459_reset_evt1.fits, is a level=1 file with status bits 16-19 set to "0". The content of the parameter file may be checked using plist dmtcalc.




Summary

At this point, users should procede to the Create a New ACIS Bad Pixel File: Identify ACIS Hot Pixels and Cosmic Ray Afterglows thread to create a new bad pixel file for their data which contains more accurate afterglow information. After that, the data is reprocessed with acis_process_events and a new level=2 file must be created. For an overview of the full reprocessing thread, see the ACIS Data Preparation Analysis Guide.




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


        infile = acisf00459_000N002_evt1.fits   Input file
       outfile = acis_459_reset_evt1.fits Output file
    expression = status=status,status=X15F,status=X14F,status=X13F,status=X12F expression(s) to evaluate
       (kernel = default)         Data Model creation/copy kernel
      (clobber = no)              Clobber output file if it exists?
      (verbose = 0)               Debug level
         (mode = ql)              
    

History

13 Jan 2005 updated for CIAO 3.2: the thread now shows how to reset the afterglow status bits before applying a new bad pixel file
12 Dec 2005 reviewed for CIAO 3.3: no changes
01 Dec 2006 reviewed for CIAO 3.4: no changes

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.