Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: November 2015

URL: http://cxc.harvard.edu/ciao/ahelp/hrc_bkgrnd_lookup.html
AHELP for CIAO 4.9

hrc_bkgrnd_lookup

Context: tools

Synopsis

Find the matching HRC "blank-sky" dataset (event file or spectrum) for an observation

Syntax

hrc_bkgrnd_lookup  infile caltype [outfile] [blname] [verbose]

Description

The hrc_bkgrnd_lookup script is used to find the HRC-I background (i.e. "blank sky") dataset from the CALDB that matches your observation. Unlike acis_bkgrnd_lookup the HRC background datasets come in two types - event or spectrum - and are generated from stowed observations (where the HRC is not at the focal plane of the Chandra mirrors).

Please see the following HRC threads: The HRC-I Background Event Files and The HRC-I Background Spectra Files. Note that there are no versions of these datasets for HRC-S observations.

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:

unix% pget hrc_bkgrnd_lookup outfile

Example 1

unix% hrc_bkgrnd_lookup evt2.fits event

The matching HRC-I background event file is printed to the screen and stored in the outfile parameter of the script. It can be accessed using the pget tool:

unix% set bg = `pget hrc_bkgrnd_lookup outfile`

Example 2

unix% hrc_bkgrnd_lookup evt2.fits spectrum

The matching HRC-I background spectrum file is printed to the screen and stored in the outfile parameter of the script.

Parameters

name type def min max reqd
infile file       yes
caltype string event     yes
outfile file        
blname string none      
verbose integer 0 0 5  

Detailed Parameter Descriptions

Parameter=infile (file required)

The file for which you want a background file

This can be any file which contains the necessary header keywords about the observation; an event file or a file created from an event file (e.g. image or spectrum) should suffice.

Parameter=caltype (string required default=event)

What type of background file?

Should the event or spectrum version of the background file be used?

Parameter=outfile (file)

HRC background file to use

This parameter will be set to the name of the HRC background files selected from the CALDB to match your observation. The file names include the full path.

Parameter=blname (string default=none)

What block identifier should be added to the filename?

This parameter determines whether any block identifier should be included in the filename and, if so, what form should the identifier be in. The allowed values are:

blname=none

No identifier is added; this is the default value. The output will look something like

hrciD2007-09-17pibgspecN0001.fits
blname=name

Add the name of the block to the file, so the output will look something like

hrciD2007-09-17pibgspecN0001.fits[SPECTRUM]
blname=number

Add the number of the block to the file using the DataModel numbering scheme ([1] refers to the first block). The output will look something like

hrciD2007-09-17pibgspecN0001.fits[2]
blname=cfitsio

Add the number of the block to the file using the CFITSIO numbering scheme ([0] refers to the first block). The output will look something like

hrciD2007-09-17pibgspecN0001.fits[1]

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 trying to track down problems with the script. Two useful values are:

Verbose=2

Setting verbose=2 will display the version of the script being used together with basic information derived from the input file. It also lists the equivalent calquiz call (or calls) that you would need to make to select the files.

Verbose=5

Setting verbose=5 lists the CALDB lookup that the script is using to select the background file.

Changes in the scripts 4.8.1 (December 2015) release

The code has been updated to avoid warning messages from NumPy version 1.9. There is no difference to how the script behaves.

Changes in the CIAO 4.6.1 (December 2013) Release

The script has been updated to run in CIAO 4.6.

About Contributed Software

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

The HRC-I background spectra are provided as part of the default CALDB install, but the background event files are packaged separately. See the CALDB download page for more information.

Bugs

There are no known bugs for this tool.

See Also

calibration
ardlib
psf
psf
tools
acis_bkgrnd_lookup, acis_fef_lookup, acis_set_ardlib, addresp, aprates, asphist, combine_grating_spectra, combine_spectra, dither_region, dmarfadd, dmextract, eff2evt, fullgarf, make_instmap_weights, mean_energy_map, mkacisrmf, mkarf, mkexpmap, mkgarf, mkgrmf, mkinstmap, mkpsfmap, mkrmf, mkwarf, psextract, psf_project_ray, readout_bkg, rmfimg, sky2tdet, specextract

Last modified: November 2015
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.