Clean ACIS Background in VFAINT Mode
![[CXC Logo]](../../imgs/cxc-logo.gif)
CIAO 4.0 Science Threads
OverviewLast Update: 24 Jun 2008 - updated image display to place figures inline with text Synopsis: In ACIS very faint mode, there is a 5x5 pixel event island, instead of just a 3x3 event island (as in FAINT mode). Therefore, acis_process_events can use the pulse heights in the outer 16 pixels of the 5x5 event island to help distinguish between good X-ray events and bad events that are most likely associated with cosmic rays. The Background Information section has more details. Purpose: To clean the ACIS particle background for very faint mode observations; Get Started shows how to check the mode of your observation. Related Links:
|
Contents
- Background Information
- Analysis Caveats
- Get Started
- Generate a New Level=1 Event File
- Elimination of real events
- Generate a New Level=2 Event File
- Parameter files:
- History
- Images
Background Information
In VFAINT mode, this is the benefit of working with a 5x5 pixel event island, instead of just a 3x3 event island (as in FAINT mode). Therefore, acis_process_events can use the pulse heights in the outer 16 pixels of the 5x5 event island to help distinguish between good X-ray events and bad events that are most likely associated with cosmic rays. An event is considered to be a potential background event if one or more of those outer pixels is greater than a set split threshold. In that case, status bit 23 is set to one ("bad") for the event.
More information on this is available from the Reducing ACIS Quiescent Background Using Very Faint Mode page. The abstract from that page is included here:
ACIS particle background can be reduced significantly compared to the standard grade selection by screening out events with significant flux in border pixels of the 5x5 event islands. The particle background above 6 keV is reduced by a factor of 1.4 in the front-illuminated chips and ~ 1.25 in the back-illuminated chips. The background rejection is much better at soft energies - by a factor of 2 near 0.5 keV in FI chips and by a factor of 3 near 0.3 in BI chips. In the intermediate energies, 1-5 keV, the background is reduced by a factor of 1.1-1.15.
Analysis Caveats
Combining with destreak
When the destreak tool is run on data that has been processed with check_vf_pha=yes, it is not as efficient at detecting streak events because of the large number of nonzero status bits set by the background-cleaning algorithm. The following is still the recommended method for combining these two processes:
- destreak the level=1 event file
- run acis_process_events as shown in this thread to perform the VFAINT background cleaning
Combining with ACIS CTI Correction and destreak
There is no longer a caveat when using the VFAINT background algorithm and the CTI adjustment simultaneously. acis_process_events uses the unadjusted (i.e. read-out) pulse height values to perform the VFAINT cleaning, so the CTI adjustment has no effect on it.
After destreaking the level=1 event file (if necessary), simply run acis_process_events as shown in this thread to perform the VFAINT background cleaning.
Get Started
Sample ObsID used: 884 (ACIS-S, 0235+164)
File types needed: evt1; flt1; bpix1; asol1
If you created a new bad pixel file by running the New ACIS Bad Pixel File: Identify ACIS Hot Pixels and Cosmic Ray Afterglows thread, use that file in this analysis. Otherwise, use the bpix1.fits file from the Archive.
Generate a New Level=1 Event File
Determine the eventdef parameter
The mode of the observation is recorded in the READMODE and DATAMODE header keywords:
unix% dmkeypar acisf00884_000N002_evt1.fits READMODE echo+ TIMED unix% dmkeypar acisf00884_000N002_evt1.fits DATAMODE echo+ VFAINT
This is a very faint mode observation; all VFAINT observations will also have READMODE equal to TIMED. The proper eventdef parameter, used in the next section, is "stdlev1".
Run acis_process_events
Running acis_process_events with check_vf_pha=yes produces a new level=1 event file with possible background events flagged in status bit 23.
In this example, the CTI correction and time-dependent gain adjustment are applied at the same time as the background cleaning.
unix% punlearn acis_process_events unix% pset acis_process_events infile=acisf00884_000N002_evt1.fits unix% pset acis_process_events outfile=acis_884_new_evt1.fits unix% pset acis_process_events acaofffile=pcadf083202635N002_asol1.fits unix% pset acis_process_events badpixfile=acis_884_new_bpix1.fits unix% pset acis_process_events eventdef=")stdlev1" unix% pset acis_process_events check_vf_pha=yes unix% pset acis_process_events trail=0.027 unix% acis_process_events Input event file or stack (acisf00884_000N002_evt1.fits): Output event file name (acis_884_new_evt1.fits): aspect offset file ( NONE | none | <filename>) (pcadf083202635N002_asol1.fits):
In some cases, there will be more than one aspect solution file (pcad_asol1.fits) for an observation. All the files must be input to the acaofffile parameter in chronological order, either as a comma-separated list or as a stack. The time is in the filename, so "ls" lists them in chronological order.
It is important to note the unusual syntax of the eventdef parameter; the tool will not access the predefined string if the leading ")" is missing (see example 6 of ahelp parameter).
The content of the parameter file may be checked using plist acis_process_events.
The trail parameter
The amount of charge in the pixels above the center of the event island is due in part to a fraction of charge trailed from the other pixels (as a result of charge transfer inefficiency (CTI)). The trail parameter - set to the default value of 0.027 in this example - indicates what fraction of charge should be ignored when checking to see if the pixel is above the split threshold.
By default, the algorithm ignores 2.7% of the charge in the central pixels. This value comes from empirical data taken at the focal plane temperature of -110C. Those experiments have shown very little impact of trail parameter on the particle rejection efficiency. This is likely due to the fact that the CTI coefficient only affects testing of 1 or 2 of the 16 border pixels. Even if the value is far off, the rejection efficiency is degraded by 10% at most - that is, you reject 18% (instead of 20%) of the particles.
Elimination of real events
This caveat applies to both imaging and grating observations: in bright sources where pile-up superimposes events on one another, some percentage of real X-ray events are marked as potential background events.
To see if this is a problem in your data, create a file of the photons rejected by the check_vf_pha screening in acis_process_events. Here the filter is defined with status bit 23 marked as "bad" (1) and all other bits may be good or bad (x); note that the bits are counted from the right, starting at zero. This filter retains those events that have been flagged on account of the 5x5 screening:
unix% dmcopy "acis_884_new_evt1.fits[EVENTS][status=xxxxxxxx1xxxxxxxxxxxxxxxxxxxxxxx]" \
acis_884_23bad.fits
Figure 1 shows acis_884_new_evt1.fits (left) and acis_884_23bad.fits (right) displayed side-by-side. As seen, there are some source photons identified as background particles by acis_process_events; this is evident because the photons are clumped around the source location. In this case, you may decide to keep the photons (i.e. not use the newly screened file).
[Version: full-size]
![[Print media version: bitmap image of ds9 display showing two images: left displays new level=1 event file, right displays file of photons marked as background particles.]](1.gif)
Figure 1: Image of "Cleaned" Photons
The new level=1 event file, acis_884_new_evt1.fits, is displayed on the left and the file of photons marked as background particles, acis_884_23bad.fits, is on the right.
If the rejected photons are uniform across the field, then pile-up was not a problem and it is perfectly safe to filter out those events. There are more examples of this comparison on the Reducing ACIS Quiescent Background Using Very Faint Mode page.
Generate a New Level=2 Event File
If you are working with grating data, you should proceed to the HETG/ACIS-S Grating Spectra thread or the LETG/ACIS-S Grating Spectra thread at this point to generate the correct level=1.5 and level=2 files. For non-grating data, continue with the following steps.
Apply grade/status filters
Filter for bad grades and for a "clean" status column (i.e. all bits set to 0). Since the background particles are flagged as one ("bad"), they will be filtered out of the event file:
unix% punlearn dmcopy unix% dmcopy "acis_884_new_evt1.fits[EVENTS][grade=0,2,3,4,6,status=0]" \ acis_884_flt_evt1.fits
Apply GTI filters
The Good Time Intervals (GTIs) supplied by the pipeline now need to be applied. Simultaneously, an unnecessary column is eliminated from the output:
unix% punlearn dmcopy
unix% dmcopy \
"acis_884_flt_evt1.fits[EVENTS][@acisf00884_000N002_flt1.fits][cols -phas]" \
acis_884_evt2.fits
Be sure to include the @ symbol in the filter expression; the command will not be executed properly if it is omitted.
Parameters for /home/username/cxcds_param/acis_process_events.par
#--------------------------------------------------------------------------
#
# acis_process_events.par- Parameter file for acis_process_events program
#
#--------------------------------------------------------------------------
infile = acisf00884_000N001_evt1.fits Input event file or stack
outfile = acis_884_new_evt1.fits Output event file name
acaofffile = pcadf083202635N002_asol1.fits aspect offset file ( NONE | none | <filename>)
(apply_cti = yes) Apply CTI adjustment?
(apply_tgain = yes) Apply time-dependent gain adjustment?
(alignmentfile = )acaofffile -> NONE) sim/fam alignment file ( NONE | none | <filename>)
(obsfile = NONE) obs.par file for output file keywords ( NONE | none | <filename>)
(geompar = geom) Parameter file for Pixlib Geometry files
(logfile = stdout) debug log file ( STDOUT | stdout | <filename>)
(gradefile = CALDB) grade mapping file ( NONE | none | CALDB | <filename>)
(gainfile = CALDB) acis gain file ( NONE | none | CALDB | <filename>)
(badpixfile = acis_884_new_bpix1.fits) acis bad pixel file ( NONE | none | <filename>)
(threshfile = CALDB) split threshold file ( NONE | none | CALDB | <filename>)
(ctifile = CALDB) acis CTI file ( NONE | none | CALDB | <filename>)
(tgainfile = CALDB) gain adjustment file ( NONE | none | CALDB | <filename>)
(eventdef = )stdlev1 -> {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,s:phas,l:pha,l:pha_ro,f:energy,
l:pi,s:fltgrade,s:grade,x:status}) output format definition
(doevtgrade = yes) Determine event flight grade?
(check_vf_pha = yes) Check very faint pixels?
(calc_cc_times = no) Estimate the times of arrival for CC-mode observation?
(trail = 0.027) Trail fraction
(spthresh = 13) Default split threshold level (overridden by values in threshfile)
(time_offset = 0) Offset to add to event time field to synch w/ fam data
(docentroid = no) Determine pixel centroid for coord. conversion?
(calculate_pi = yes) perform pha->pi conversion? (requires gain file)
(pi_bin_width = 14.6) Width of Pi bin in eV
(pi_num_bins = 1024) Number of values to bin energy into
(max_cti_iter = 15) Maximum iterations for the CTI adjustment of each event
(cti_converge = 0.1) The convergence criterion for each CTI-adjusted pixel in adu
(tstart = TSTART) header key containing start/default time value
(tstop = TSTOP) header key containing time of last event
(clobber = no) Overwrite output event file if it already exists?
(verbose = 0) level of debug detail (0=none, 5=most)
(stop = sky) where to end transformations
(instrume = acis) axaf instrument- used for instrument parameter file
(rand_seed = 1) random seed (for pixlib), 0 = use time dependent seed
(rand_pha = yes) Randomize the pha value used in gain calculations
(rand_pix_size = 0.5) pixel randomization width (-size..+size) 0=no randomization
(stdlev1 = {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,s:phas,l:pha,l:pha_ro,f:energy,
l:pi,s:fltgrade,s:grade,x:status}) TE faint modes event definition string
(grdlev1 = {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,l:pha,l:pha_ro,
s:corn_pha,f:energy,l:pi,s:fltgrade,s:grade,x:status}) TE graded event format definition string
(cclev1 = {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,f:sky_1d,s:phas,l:pha,l:pha_ro,
f:energy,l:pi,s:fltgrade,s:grade,x:status}) CC faint event format definition string
(ccgrdlev1 = {d:time,s:ccd_id,s:node_id,i:expno,s:chip,s:tdet,f:det,f:sky,f:sky_1d,l:pha,l:pha_ro,s:corn_pha,
f:energy,l:pi,s:fltgrade,s:grade,x:status}) cc graded event format definition string
(mode = ql)
|
History
| 16 Dec 2004 | updated for CIAO 3.2: use ACIS bad pixel file (badpixfile parameter) |
| 01 Feb 2005 | added note about "Event island contains 1 or more bad pixels" warning |
| 09 Feb 2005 | added Combining with destreak caveat |
| 20 Jun 2005 | CIAO 3.2.2 patch: minor acis_process_events parameter change (default value of threshfile is CALDB instead of NONE) |
| 09 Dec 2005 | updated for CIAO 3.3: output filenames include ObsID |
| 01 Dec 2006 | updated for CIAO 3.4: removed use of "rand_pha=no" in acis_process_events, as most users should keep the PHA randomization (see the Apply/Remove PHA Randomization thread) |
| 25 Jan 2008 | reviewed for CIAO 4.0: no changes |
| 13 Feb 2008 | revised to list caveats before example, as they affect how acis_process_events may be run; include aspect solution in acis_process_events to cover all possible uses |
| 10 Mar 2008 | added dmcopy step between acis_process_events runs in the Combining with ACIS CTI Correction and destreak section |
| 16 Apr 2008 | there is no longer a caveat for Combining VFAINT cleaning with ACIS CTI Correction and destreak |
| 24 Jun 2008 | updated image display to place figures inline with text |
