The HRC-I Background Event Files
CIAO 4.16 Science Threads
Overview
Synopsis:
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.
Purpose:
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.
Related Links:
- About the Instrument: HRC
Last Update: 24 Jan 2022 - Review for CIAO 4.14. Updated for Repro-5/CALDB 4.9.6.
Contents
- Get Started
- Choosing the Correct File
- Tailor the background file to your dataset
- Parameter files:
- History
Get Started
Download the sample data: 144 (HRC-I, G21.5-0.9)
unix% download_chandra_obsid 144 evt2,asol
Choosing the Correct File
Naming scheme
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-2013:
unix% ls -1 $CALDB/data/chandra/hrc/bkgrnd/ hrciD2000-01-01bkgrndN0002.fits hrciD2001-01-01bkgrndN0002.fits hrciD2002-01-01bkgrndN0002.fits hrciD2003-01-01bkgrndN0002.fits hrciD2004-01-01bkgrndN0002.fits hrciD2005-01-01bkgrndN0002.fits hrciD2006-01-01bkgrndN0002.fits hrciD2007-01-01bkgrndN0002.fits hrciD2008-01-01bkgrndN0002.fits hrciD2009-01-01bkgrndN0002.fits hrciD2010-01-01bkgrndN0002.fits hrciD2011-01-01bkgrndN0002.fits hrciD2012-01-01bkgrndN0002.fits hrciD2013-01-01bkgrndN0002.fits hrciD2014-01-01bkgrndN0002.fits hrciD2015-01-01bkgrndN0003.fits hrciD2016-01-01bkgrndN0001.fits hrciD2017-01-01bkgrndN0001.fits
All the files are valid from 01 January of the year in the filename to 01 January of the following year.
The naming scheme is:
hrci<date>bkgrnd_N<version>.fits
Using hrc_bkgrnd_lookup
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 hrcf00144N009_evt2.fits event /soft/ciao/CALDB/data/chandra/hrc/bkgrnd/hrciD2000-01-01bkgrndN0002.fits
hrciD2000-01-01bkgrndN0002.fits is valid for all observations from 2000-01-01 to 2001-01-01, and ObsID 144 was observed in 2000:
unix% dmkeypar hrcf00144N009_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/hrciD2000-01-01bkgrndN0002.fits
Make a Local Copy of the Background File
Make a local copy of the file:
unix% cp \ $CALDB/data/chandra/hrc/bkgrnd/hrciD2000-01-01bkgrndN0002.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.
Tailor the background file to your dataset
Add the PNT header keywords
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 hrcf00144N009_evt2.fits event_header.par unix% grep _pnt event_header.par > event_pnt.par unix% cat event_pnt.par ra_pnt,r,h,278.38637016348,,,"Pointing RA [deg]" dec_pnt,r,h,-10.571749063739,,,"Pointing Dec [deg]" roll_pnt,r,h,266.24919057005,,,"Pointing Roll [deg]" unix% chmod +w 144_bg.fits unix% dmreadpar event_pnt.par "144_bg.fits[events]" clobber+ unix% dmlist 144_bg.fits header |grep PNT 0071 RA_PNT 278.3863701635 Real8 Pointing RA [deg] 0072 DEC_PNT -10.5717490637 Real8 Pointing Dec [deg] 0073 ROLL_PNT 266.2491905701 Real8 Pointing Roll [deg]
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.
Apply the status bit filter
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 hrcf00144N009_evt2.fits dmcopy dmcopy infile=".../output/tmpf00144N009_evt2.fits[status=xxxxxx00xxxx0xxx00000000x0000000]" outfile=".../output/hrcf00144N009_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
If the level 2 event file was created with the chandra_repro script, it will contain the STATFILT header keyword that can also stores the status bit filter which was used.
unix% dmkeypar hrcf00144_repro_evt2.fits STATFILT echo+ xxxxxx00xxxx0xxx00000000x0000000 unix% flag=`pget dmkeypar value` # -or- if using tcsh then use: set flag=`pget dmkeypar value` unix% dmcopy "144_bg.fits[status=${flag}]" 144_filt_bg.fits
Reproject the background data
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=pcadf00144_000N001_asol1.fits unix% pset reproject_events match=hrcf00144N009_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 (hrcf00144N009_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 = hrcf00144N009_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)
History
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. |
21 Mar 2014 | Updated for CALDB 4.6.1 release. |
18 Dec 2014 | Reviewed for CIAO 4.7. Added a note about STATFILT keyword in event files created with chandra_repro |
24 Jan 2022 | Review for CIAO 4.14. Updated for Repro-5/CALDB 4.9.6. |