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

Skip the navigation links
Last modified: December 2007

URL: http://cxc.harvard.edu/ciao4.0/acis_bkgrnd_lookup.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 4.0 acis_bkgrnd_lookup Context: tools

Synopsis

Find the matching ACIS "blank-sky" dataset for an observation

Syntax

acis_bkgrnd_lookup infile [outfile] [verbose]

Description

The acis_bkgrnd_lookup script is used to find the ACIS background (i.e. "blank sky") dataset from the CALDB that matches your observation. It is suggested that you the read the following before using the background files in your analysis:

- ACIS Background Memos page

- Maxim Markevitch's ACIS background discussion

- The ACIS Background Subtraction thread

When supplied with an event file, the script will determine the aimpoint and set of ACIS CCDs covered by the file or selected region. For this to happen, the parameter file (acis_bkgrnd_lookup.par) should be made available as discussed on the Script Installation page.

The results of the CALDB search are written to the outfile parameter as well as being written to the screen, making them accessible by calling

pget acis_bkgrnd_lookup outfile

.

Output

If more than one file is found then they are listed on the screen one to a line and written to the parameter file as a comma-separated list (i.e. a stack). This will be the case, for instance, if the input file contains data from more than one CCD.

Example 1

acis_bkgrnd_lookup evt2.fits

The script finds the aimpoint, focal plane temperature, and details on the CTI correction from information in the header of the file and scans the ccd_id column of the event file to select the chips which contain data.

The matching file(s) are printed to the screen and stored in the outfile parameter of the script.

Example 2

acis_bkgrnd_lookup "evt2.fits[sky=region(source.reg)]"

The input file can include any Data Model expression (see "ahelp dmsyntax") as long as the resulting file is still a table with a ccd_id column. Here we use a spatial filter to filter the events file: the resulting background file(s) will be chosen to match only the CCDs that cover the region source.reg.

Parameters

name type def min max reqd stacks
infile file       yes  
outfile file         yes
verbose integer 0 0 5    

Detailed Parameter Descriptions

Parameter=infile (file required)

Event file for which you want background files

The event file must contain a CCD_ID column, SIM_Z header keyword, and FP_TEMP header keyword.

The FP_TEMP header keyword is included in the header of all level 2 event files processed with software version DS 7.3.0 or higher. If the keyword is missing from the file header, get the value from the evt1.fits file and use the dmhedit tool to add it to the evt2.fits file. The focal plane temperature FAQ has more information.

Parameter=outfile (file stacks=yes)

ACIS background file(s) to use

This parameter will be set to the name(s) of the ACIS background files selected from the CALDB to match your observation. The file names include the full path. If more than one file is selected then they will be stored as a comma-separated stack.

Parameter=verbose (integer default=0 min=0 max=5)

Debug level (0=no debug information)

In most cases the default verbose level (of 0) is the correct value to use. Higher values may prove useful when tryig to track down problems with the script. Setting verbose=5 lists the CALDB lookup that the script is using to select the background file.

CHANGES IN CIAO 4.0/ACIS_BKGRND_LOOKUP 2.0

The script has been updated to to run under S-Lang v2, which is the version packaged with CIAO 4.0. Code updates were made to replace the VARMM (Variable, Math and Macro S-Lang) library with the cxcdm (CXC Data Model) module. acis_bkgrnd_lookup functionality is unchanged.

CHANGES ACIS_BKGRND_LOOKUP 1.12

The script has been updated for use with the new ACIS blank-sky background files released in CALDB 3.4.0. The script is NOT backward-compatible. You must upgrade to CALDB 3.4.0 to use acis_bkgrnd_lookup v1.12.

The changes are:

  • acis_bkgrnd_lookup checks first for a CTI_APP header keyword, then looks for CTI_CORR. If neither keyword is found, it defaults to CTI_CORR=no.
  • The focal plane temperature is included in the CALDB lookup. This prevents the uncorrected -110 C files from being selected for -120 C input data.
  • The SIM_Z value is used to determine the aimpoint instead of the detector name. This change required a change in the CALDB index, which is why the script is not backward-compatible with earlier versions of the CALDB.

The deprecated syntax of supplying all parameters on the command line has been removed from the script.

NOTES

Downloading the script

This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see the installation instructions page for help on installing the package.

Downloading the CALDB background files

Since CALDB 3.0.0, the ACIS background files have been moved out of the main CALDB download file. They are now packaged separately, and are available from the CALDB download page.

Bugs

See the bugs page for this script on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2007



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.