Destreak the ACIS-S4 Chip
[CIAO 3.4 Science Threads]
OverviewLast Update: 1 Dec 2006 - reviewed for CIAO 3.4: no changes Synopsis: There is a flaw in the serial readout of the chips, causing a significant amount of charge to be randomly deposited along pixel rows as they are read out. Chip S4 (ccd_id=8) is most affected by this problem. These streak events are not removed by standard grade, status, or bad pixel filtering, and are therefore still present in the level=2 event file. This horizontal streak (in CHIP coordinates) should not be confused with the vertical "read-out" streaks associated with bright sources, as discussed in the Which streak is that? section. The destreak tool became part of standard data processing at software version DS 7.3.0. Purpose: To use the destreak to produce a new, destreaked event file. Read this thread if: you are working with any ACIS data (imaging or grating) affected by streak events. Related Links:
|
Contents
- Which streak is that?
- Background Information
- Get Started
- Run destreak
- Remove the Streaks
- Examine the Output
- Caveat: VFAINT background cleaning
- Summary
- Parameter files:
- History
- Images
Which streak is that?
This thread only shows how to remove the serial readout streaks from the S4 chip. Figure 1 shows both the streaks on the S4 chip, as well as the prominent readout streak on the S3 chip. The latter is due to out-of-time events from the source; to remove this streak, you need to use the acisreadcorr tool, as shown in the Remove the ACIS Readout Streak thread.
Background Information
On account of the serial readout problem, the event file shows a variable pattern of linear streaks. For the purpose of this tool, a "streak" is defined as any CHIPY row which contains more than M events in a single frame-time in a single CCD node. By default, M=1, which is to say that any row containing 2 or more events on a single node in a single frame-time is identified as a streak. This default should be fine for low count-rate data; more details are given in destreak.ps.
destreak should always be used with caution because it removes counts from any source sufficiently bright to generate multiple events in a single row of one CCD node within a single frame-time. Bright point sources are certain to be affected.
Applying destreak to the ACIS-S4 chip is justified when the source count rate per row is small compared to the streak event rate. It is generally most applicable to grating observations of faint point sources and imaging observations of extended, low-surface brightness objects.
Get Started
Sample ObsID used: 1712 (ACIS-S, 3C273)
File types needed: evt2
To avoid confusion with cosmic ray events and events generated in bad pixels and bad columns, this tool should be applied after all standard filtering steps. See the ACIS Imaging Observations section of the Create a New Level=2 Events File thread for more information on standard filtering.
You can check the software processing version to see if destreak was applied in SDP:
unix% dmkeypar acisf01712N002_evt2.fits ASCDSVER echo+ R4CU5UPD14.1
This observation was processed before the correction became part of SDP, i.e. the ASCDSVER is lower than DS 7.3.0. Note that the version naming convention changed after version R4CU5UPD14 to the "DS" system, starting with DS 6.0.0.
Run destreak
The ccd_id parameter should always be set to 8 (the default) to ensure that the destreak algorithm will be applied to the ACIS-S4 chip only. The algorithm should not be applied to chips that do not show streaks like those on ACIS-S4.
unix% punlearn destreak unix% pset destreak infile=acisf01712N002_evt2.fits unix% pset destreak outfile=acis_1712_dstrk_evt2.fits unix% pset destreak filter=no Input dataset/block specification (acisf01712N002_evt2.fits): Output dataset/block specification (acis_1712_dstrk_evt2.fits):
The filter parameter determines whether the streak events are eliminated from the output (yes) or simply flagged as bad in status bit 15 (no). If you intend to image the flagged events in the final section of this thread, you must use filter=no, as seen in the example.
The contents of the parameter file may be checked using plist destreak.
Remove the Streaks
NOTE: if you set filter=yes in the previous step, skip ahead to the last section.
In the destreak run, we flagged all the possible streak events. Now we need to use dmcopy to eliminate them from the file. The filter is defined to only keep those events with status bit 15 marked as ``good'' (0); all other bits are filtered on the wildcard (x):
unix% dmcopy \ "acis_1712_dstrk_evt2.fits[EVENTS][status=xxxxxxxxxxxxxxxx0xxxxxxxxxxxxxxx]" \ acis_1712_clean_evt2.fits
The output file no longer has any of the streaks in it.
Examine the Output
To compare the input and output files, view them both in ds9. If you set filter=no in the Run destreak section:
unix% ds9 acisf01712N002_evt2.fits acis_1712_clean_evt2.fits &
or, if you set filter=yes in the Run destreak section:
unix% ds9 acisf01712N002_evt2.fits acis_1712_dstrk_evt2.fits &
Figure 2 compares the original level=2 event file (left) and the "destreaked" version (right).
To determine whether significant source counts were removed, examine the spatial distribution of streak events flagged by destreak. Here we have defined a filter with status bit 15 marked as "bad" (1) and all other bits set as "good" (0); note that the bits are counted from the right, starting at zero. This filter retains only those events that have been flagged by destreak:
unix% dmcopy "acis_1712_dstrk_evt2.fits[EVENTS][status=00000000000000001000000000000000]"\ streak_events.fits
If the events are distributed across the field when displaying the file in ds9 , it is fine to filter out the events. However, if the source is visible, raise the streak event threshold (max) and run the tool again. Remember that the streak threshold that was used was printed to the screen in the previous step. The default threshold value is appropriate for low count-rate sources, but higher threshold values may be required for brighter sources.
Caveat: VFAINT background cleaning
If you have run acis_process_events with check_vf_pha=yes, as shown in the Clean ACIS Background in VFAINT Mode thread, destreak will not be as efficient at detecting (and removing) streak events because of the large number of nonzero status bits set by the background-cleaning algorithm. While the destreak mask parameter may now be used to include the nonzero status events in the destreaking, the following is still the recommended method for combining these two processes:
- run destreak on the level=1 event file
- perform the VFAINT background cleaning with acis_process_events
Summary
If you are working with grating data, you should now look at the Obtain Grating Spectra from HETG/ACIS-S Data thread or Obtain Grating Spectra from LETG/ACIS-S Data thread to create a new PHA2 file from the destreaked event file. Make sure that you use the correct file as input to tgextract; depending on how you ran this thread, it may be named either acis_1712_dstrk_evt2.fits or acis_1712_clean_evt2.fits.
Parameters for /home/username/cxcds_param/destreak.par infile = acisf01712N002_evt2.fits Input dataset/block specification outfile = acis_1712_dstrk_evt2.fits Output dataset/block specification (max = ) streak threshold syntax: m OR m:m:m:m (max_rowloss_fraction = 5.0e-5) Maximum fraction of avg streaks/node/frame (num_sigma = 1.0) Sigma value for determining streak threshold (filter = yes) Discard tagged events (mask = [status=0,grade=0,2:4,6]) Filter to select candidate streak events (ccd_id = 8) CCD ID to filter (ccd_col = ccd_id) CCD ID column name (node_col = node_id) Node ID column name ('none' for single node) (exptime = -1) frame time (s) (reads EXPTIME if no pos. value given) (countfile = ) filename for event row-count distribution (fracfile = ) filename for cumulative streak contam function (timefile = ) filename for exposure time lost per row (verbose = 0) Debug Level(0-5) (clobber = no) Clobber existing file (mode = ql) |
History
16 Dec 2004 | updated for CIAO 3.2: new max_rowloss_fraction parameter |
21 Jan 2005 | updated VFAINT background cleaning caveat |
09 Feb 2005 | reinstated original version of VFAINT background cleaning caveat |
12 Dec 2005 | updated for CIAO 3.3: output filenames include ObsID; several changes to the destreak parameter file, including a new default value for the mask parameter |
01 Dec 2006 | reviewed for CIAO 3.4: no changes |