Last modified: December 2022

URL: https://cxc.cfa.harvard.edu/ciao/ahelp/hrc_bkgrnd_lookup.html
AHELP for CIAO 4.17

hrc_bkgrnd_lookup


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

Examples

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 this page for installation instructions.

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::aspect
asphist, dither_region
tools::background
acis_bkgrnd_lookup, readout_bkg
tools::composite
combine_grating_spectra, combine_spectra, specextract
tools::coordinates
sky2tdet
tools::core
dmextract
tools::response
acis_fef_lookup, acis_set_ardlib, addresp, dmarfadd, eff2evt, find_mono_energy, fullgarf, make_instmap_weights, mean_energy_map, mkacisrmf, mkarf, mkexpmap, mkgarf, mkgrmf, mkinstmap, mkosip, mkpsfmap, mkrmf, mkrprm, mkwarf, psf_project_ray, rmfimg
tools::statistics
aprates