Using the ACIS "Blank-Sky" Background Files
[CIAO 3.4 Science Threads]
OverviewLast Update: 14 Sep 2007 - updated for CALDB 3.4.1: new ACIS background files Synopsis: The ACIS calibration team has completed a detailed study of the ACIS background. Part of this study has produced a set of "blank-sky" datasets which can be used, for instance, for analyses where the object of interest fills the entire chip. Purpose: To create background spectra tailored to a specific observation for spectral fitting or images for spatial analyses. Read this thread if: you are analyzing an ACIS imaging observation and the source is so large that you can not estimate the background from your dataset. Older calibration updates for this thread are listed in the Previous CALDB updates section.
Related Links:
|
Contents
- Get Started
- Finding the Correct File
- Make a Local Copy of the Background File
- Remove Background Flares from the Event File
- Tailor the background file to your dataset
- Caveats
- Previous CALDB updates
- Parameter files:
- History
- Images
Get Started
Sample ObsIDs used: 1838 (ACIS-S, G21.5-09); 1712 (ACIS-S, 3C 273)
File types needed: evt2; asol1
The 1838 event file used in this thread has been reprocessed to apply the newest gain file; the CTI correction has not been applied. In these examples, we shall restrict attention to the ACIS-S3 chip and the 0.3 to 10 keV energy range:
unix% dmcopy "1838_evt2.fits[energy=300:10000,ccd_id=7]" evt2_c7.fits unix% dmcopy "evt2_c7.fits[bin sky=8]" img8_c7.fits
ObsID 1712 is used as an example of a strong background flare; this is the same dataset used in the Filtering Lightcurves thread.
The acis_bkgrnd_lookup script requires that the input file contains a CCD_ID column, SIM_Z header keyword, and FP_TEMP header keyword. If your data has not been recently reprocess, the FP_TEMP keyword may not be included in the level 2 event file. If it is missing from the file header, get the value from the evt1.fits file and use dmhedit to add it to the evt2.fits file; refer to the focal plane temperature FAQ has more information.
unix% dmkeypar evt2_c7.fits FP_TEMP echo+ 153.446014
Download the background files
The ACIS "blank-sky" background files are not included in the main CALDB download file, due to the substantial filesize. If you have not already installed them, you must download the background files tarfile from the CALDB Download page and install it before continuing with this thread.
The background files are installed in the $CALDB/data/chandra/acis/bcf/bkgrnd/ directory.
Download the scripts
This thread uses the acis_bkgrnd_lookup and lc_clean.sl scripts. The most recent version of acis_bkgrnd_lookup is v1.12 (29 March 2007):
unix% grep Id `which acis_bkgrnd_lookup` % $Id: acis_bkgrnd_lookup,v 1.12 2007/03/29 16:43:34 egalle Exp $
The most recent version of lc_clean.sl is v1.9 (20 June 2003):
unix% grep Id $ASCDS_CONTRIB/share/slsh/local-packages/lc_clean.sl % $Id: lc_clean.sl,v 1.9 2003/06/20 14:23:12 dburke Exp $
Note that $ASCDS_CONTRIB/share/slsh/local-packages/ is the default path in the standard CIAO scripts installation; see the Scripts page for more information. Please check that you are using the most recent version before continuing. If you do not have the scripts installed or need to update to a newer version, please refer to the Scripts page.
Finding the Correct File
Naming scheme
The ACIS background datasets are stored in the CALDB at $CALDB/data/chandra/acis/bcf/bkgrnd/. They are indexed by focal plane temperatures, aimpoint (i.e. ACIS-I or ACIS-S), and chip number:
unix% ls -1 $CALDB/data/chandra/acis/bcf/bkgrnd/ acis0D2000-12-01bgstow_ctiN0004.fits acis0iD1999-09-16bkgrndN0002.fits acis0iD2000-01-29bkgrnd_ctiN0005.fits acis0iD2000-01-29bkgrndN0003.fits acis0iD2000-12-01bkgrnd_ctiN0004.fits acis0iD2000-12-01bkgrndN0002.fits acis1D2000-12-01bgstow_ctiN0004.fits acis1iD1999-09-16bkgrndN0002.fits acis1iD2000-01-29bkgrnd_ctiN0005.fits ...
The naming scheme for CTI-corrected data is:
acis<chip><aimpoint>D<date>bkgrnd_ctiN<version>.fits
For uncorrected data, the naming is:
acis<chip><aimpoint>D<date>bkgrndN<version>.fits
The files which have "bgstow" in place of "bkgrnd" in the filename are particle-only background files created from data taken when the HRC was in the focal plane (e.g. ACIS was "stowed"). There is no ACIS-S/ACIS-I distinction for these data, so an "<aimpoint>" is not included in the filename.
Using acis_bkgrnd_lookup
The acis_bkgrnd_lookup script makes it easy to find an ACIS background file that matches your data. The script takes an input event file and returns a list of background files for all the ACIS chips in the file that have events on them:
unix% acis_bkgrnd_lookup evt2_c7.fits /soft/ciao/CALDB/data/chandra/acis/bcf/bkgrnd/acis7sD2000-01-29bkgrndN0005.fits
This file only has data on ACIS-7 (ACIS-S3), so a single file is returned. The path reflects where the CALDB is installed on your system; here, $CALDB is set to /soft/ciao/CALDB.
In addition to being printed to the screen, the list of background files is also stored in the outfile parameter:
unix% pget acis_bkgrnd_lookup outfile /soft/ciao/CALDB/data/chandra/acis/bcf/bkgrnd/acis7sD2000-01-29bkgrndN0005.fits
The input file can include a Data Model filter as long as the resulting file is still a table with a ccd_id column, such as "acisf01838N001_evt2.fits[ccd_id=7]". In this example, we use a spatial region to filter an event file which has been CTI-corrected. The resulting background file(s) will be chosen to match the CCDs that are covered by the circle:
unix% acis_bkgrnd_lookup "1838_ctiapp.fits[sky=circle(6072.5,4632.5,320)]" /soft/ciao/CALDB/data/chandra/acis/bcf/bkgrnd/acis1sD2000-01-29bkgrnd_ctiN0005.fits /soft/ciao/CALDB/data/chandra/acis/bcf/bkgrnd/acis3sD2000-01-29bkgrnd_ctiN0005.fits
Two files are returned, so the outfile parameter contains a comma-separated list:
unix% pget acis_bkgrnd_lookup outfile /soft/ciao/CALDB/data/chandra/acis/bcf/bkgrnd/acis1sD2000-01-29bkgrnd_ctiN0005.fits, /soft/ciao/CALDB/data/chandra/acis/bcf/bkgrnd/acis3sD2000-01-29bkgrnd_ctiN0005.fits
No matching file and identical lookup cases
There are a number of known cases where acis_bkgrnd_lookup cannot find a background file for the dataset and exits with this error:
# acis_bkgrnd_lookup: ERROR: Unable to find an ACIS background file to match <filename>
There are no background files for:
-
non-CTI-corrected data on ACIS-1
-
any data on ACIS-4
-
CTI-corrected data on ACIS-9
-
ACIS-0 data, when ACIS-S is in the focal plane (a SIM_Z limit is exceeded)
There are also a few cases that result in identical lookup results:
-
For the front-illuminated (FI) chips, there is no difference between:
- CTI_APP = PPPPPNPNPP
- CTI_APP = PPPPPBPBPP
since the parallel CTI-correction is applied to all FI chips either way.
-
For the back-illuminated (BI) chips, there is no difference between any of these:
- CTI_APP = NNNNNNNNNN
- CTI_APP = PPPPPNPNPP
- CTI_CORR = YES
- CTI_CORR = NO
since no CTI correction is applied to BI chips for any of those configurations.
Make a Local Copy of the Background File
The background file for the evt2_c7.fits dataset is $CALDB/data/chandra/acis/bcf/bkgrnd/acis7sD2000-01-29bkgrndN0005.fits. Make a local copy of the file:
unix% cp \ $CALDB/data/chandra/acis/bcf/bkgrnd/acis7sD2000-01-29bkgrndN0005.fits \ bgevt2_c7.fits
The tailor the background file to your dataset section explains how to what data processing is required in order to use the background in the analysis. A "cleaned" event file is needed for that step, so we first have to remove any background flares from the event data.
Remove Background Flares from the Event File
As discussed in the ACIS background page, the background datasets were created for quiescent-background periods. It is therefore important that you filter your dataset to remove periods of background flares. The selection of a "true" background can be critical, as discussed in M. Markevitch's memo (astro-ph/0205333).
We use the lc_clean.sl script to calculate a GTI for the dataset.