The HRC-I Background Event Files
CIAO 4.6 Science Threads
The High Resolution Camera (HRC) detectors are occasionally active while they are in a stowed position. Data taken during these active intervals have been released by the HRC calibration team as a set of stowed background event files for the HRC-I detector.
To create an HRC-I background event file tailored to a specific observation for imaging or spatial analyses, e.g. for use in the HRC-I Exposure Map and Fluxed Image thread.
For information on using the HRC-I background spectra files to select the "optimal" PI range to reduce the background signal in imaging analysis, follow the HRC-I Background Spectra Files thread instead.
Last Update: 3 Dec 2013 - Review for CIAO 4.6; no changes.
- Get Started
- Choosing the Correct File
- Tailor the background file to your dataset
- Parameter files:
Download the sample data: 144 (HRC-I, G21.5-0.9)
unix% download_chandra_obsid 144 evt2,asol
The HRC background event datasets are stored in the CALDB at $CALDB/data/chandra/hrc/bkgrnd/. There is a file for each year from 2000-2009:
unix% ls -1 $CALDB/data/chandra/hrc/bkgrnd/ hrciD1999-12-06bkgrndN0001.fits hrciD2001-01-01bkgrndN0001.fits hrciD2002-01-01bkgrndN0001.fits hrciD2003-01-01bkgrndN0001.fits hrciD2004-01-01bkgrndN0001.fits hrciD2005-01-01bkgrndN0001.fits hrciD2006-01-01bkgrndN0001.fits hrciD2007-01-01bkgrndN0001.fits hrciD2008-01-01bkgrndN0001.fits hrciD2009-01-01bkgrndN0001.fits
Note that the file hrciD1999-12-06bkgrndN0001.fits is valid from 1999-12-06 to 2001-01-01. It is used for analysis for data taken in 2000. All the other files are valid from 01 January of the year in the filename to 01 January of the following year.
The naming scheme is:
The hrc_bkgrnd_lookup script makes it easy to find an HRC-I background file that matches your data. The script takes an input event file and what background filetype is desired - event or spectrum - and returns the background file:
unix% hrc_bkgrnd_lookup hrcf00144N007_evt2.fits event /soft/ciao/CALDB/data/chandra/hrc/bkgrnd/hrciD1999-12-06bkgrndN0001.fits
hrciD1999-12-06bkgrndN0001.fits is valid for all observations from 1999-12-06 to 2001-01-01, and ObsID 144 was observed in 2000:
unix% dmkeypar hrcf00144N007_evt2.fits DATE-OBS echo+ 2000-09-01T00:13:35
In addition to being printed to the screen, the background filename is also stored in the outfile parameter:
unix% pget hrc_bkgrnd_lookup outfile /soft/ciao/CALDB/data/chandra/hrc/bkgrnd/hrciD1999-12-06bkgrndN0001.fits
Make a local copy of the file:
unix% cp \ $CALDB/data/chandra/hrc/bkgrnd/hrciD1999-12-06bkgrndN0001.fits \ 144_bg.fits
The tailor the background file to your dataset section explains what data processing is required in order to use the background in the analysis.
The pointing (PNT) header keyword values in the background files are set to zero:
unix% dmlist 144_bg.fits header |grep PNT 0072 RA_PNT 0 Real8 Pointing RA 0073 DEC_PNT 0 Real8 Pointing Dec 0074 ROLL_PNT 0 Real8 Pointing Roll
These values indicate where the optical axis was during the observation. Having zero-values will cause the CIAO tool dmcoords to produce incorrect results when run with the background file.
To avoid this problem later in the analysis, the PNT values from the event file are copied into the background file header. This is done by creating a file of the event file header keywords with dmmakepar, extracting the PNT values, then adding them to the background file header with dmreadpar:
unix% dmmakepar hrcf00144N007_evt2.fits event_header.par unix% grep _pnt event_header.par > event_pnt.par unix% cat event_pnt.par ra_pnt,r,h,278.38757642566,,,"Pointing RA" dec_pnt,r,h,-10.572481776435,,,"Pointing Dec" roll_pnt,r,h,266.2642947201,,,"Pointing Roll" unix% chmod +w 144_bg.fits unix% dmreadpar event_pnt.par "144_bg.fits[events]" clobber+ unix% dmlist 144_bg.fits header |grep PNT 0072 RA_PNT 278.3875764257 Real8 Pointing RA 0073 DEC_PNT -10.5724817764 Real8 Pointing Dec 0074 ROLL_PNT 266.2642947201 Real8 Pointing Roll
It is necessary to specify the "[events]" extension of the background file, or the keywords will be added to the NULL block header. The "clobber+" setting tells dmreadpar to overwrite the existing (zero) header PNT values.
A status-bit filter is applied to remove the events that standard processing would have removed as likely "background" events in generating the level=2 event file. The status filter is recorded in the file history:
unix% dmhistory hrcf00144N007_evt2.fits dmcopy dmcopy infile=".../output/tmpf00144N007_evt2.fits[status=xxxxxx00xxxx0xxx00000000x0000000]" outfile=".../output/hrcf00144N007_evt2.fits" kernel="default" option="" verbose="0" clobber="no"
The standard HRC-I status filter - "status=xxxxxx00xxxx0xxx00000000x0000000" - was applied to this dataset. If a custom filter was used in creating the level=2 event file, use the same filter in this step:
unix% dmcopy "144_bg.fits[status=xxxxxx00xxxx0xxx00000000x0000000]" \ 144_filt_bg.fits
The reproject_events tool takes the time range covered by the aspect solution of the observation (intersected with GTIs from the match file) and shifts and expands it to cover the time range in the background dataset. Then a random time within the range of the background data subspace is selected and assigned to the event. The GTIs used are taken from the specified match file.
ObsID 144 has only one aspect solution file, which we assume to be in the current working directory. It is possible to use multiple asol files by using a stack for the aspect parameter; see this FAQ for more information.
The random parameter is set to a value other than -1. This tells the tool to apply a random aspect solution to each background event, thus sampling the dither of the observation.
unix% punlearn reproject_events unix% pset reproject_events infile=144_filt_bg.fits unix% pset reproject_events outfile=144_reproj_bg.fits unix% pset reproject_events aspect=pcadf084154631N004_asol1.fits unix% pset reproject_events match=hrcf00144N007_evt2.fits unix% pset reproject_events random=0 unix% reproject_events Input dataset/block specification (144_filt_bg.fits): Output dataset/block specification (144_reproj_bg.fits): Match file (hrcf00144N007_evt2.fits):
You can check the parameter file that was used with plist reproject_events.
The file 144_reproj_bg.fits can now be used in your analysis, e.g. for use in the HRC-I Exposure Map and Fluxed Image thread
Parameters for /home/username/cxcds_param/reproject_events.par infile = 144_filt_bg.fits Input dataset/block specification outfile = 144_reproj_bg.fits Output dataset/block specification match = hrcf00144N007_evt2.fits Match file (aspect = pcadf084154631N004_asol1.fits) Aspect file (random = 0) random seed (0 use time, -1 no randomize) (geompar = geom) Parameter file for Pixlib Geometry files (verbose = 0) Debug Level(0-5) (clobber = no) Clobber existing file (mode = ql)
|10 Jun 2010||new for CIAO 4.2/CALDB 4.3.0|
|11 Jan 2011||reviewed for CIAO 4.3: no changes|
|04 Apr 2011||updated for 04 Apr scripts package release: hrc_bkgrnd_lookup script prints the version at verbose > 0.|
|20 Jul 2011||required software updates are listed in Synopsis|
|11 Jan 2012||reviewed for CIAO 4.4: no changes|
|03 Dec 2012||Review for CIAO 4.5; file version number changes|
|03 Dec 2013||Review for CIAO 4.6; no changes.|