ACIS-S Grating RMFs
CIAO 4.14 Science Threads
mkgrmf generates a grating RMF (gRMF) appropriate for spectral analysis of grating observations. The tool can be used either to create a standard gRMF with the most up-to-date calibration or to calculate a gRMF using non-standard grids.
To create an observation-specific gRMF for an on-axis ACIS-S source.
- About the Instrument: ACIS, HETG, & LETG
- Analysis Guide for Chandra High Resolution Spectroscopy: an in-depth discussion of grating analysis.
- The Formal Underpinnings of the Response Functions used in X-Ray Spectral Analysis (PS, 22pp)
Last Update: 31 Jan 2022 - Review for CIAO 4.14. Added section about repro5 datasets.
- About the Chandra Grating Data Archive and Catalog
- Repro V (5) data
- Script It
- Get Started
- Run mkgrmf
- Parameter files:
About the Chandra Grating Data Archive and Catalog
The Chandra Grating Data Archive and Catalog (TGCat) is a browsable interface to analysis-quality spectral products (binned spectra and corresponding response files). TGCat makes it easy to find observations of a particular object, type of object, or type of observation, to quickly assess the quality and potential usefulness of the spectra with pre-computed graphics or custom-generated plots of binned and combined counts or fluxe spectra. Spectra, responses, event files, and summary products may be downloaded as a package.
TGCat runs standard CIAO tools, but also includes customized extractions for non-standard cases to refine the zeroth order position or to use regions appropriate for extended sources. Non-standard extractions details are provided in "verification and validation" comments for users.
Most public grating observations are available and new ones are added soon after they are released. See the list of of observations not included for exceptions. Many of the observations currently in this list will be included when we add enhanced processing for more difficult cases (multiple sources, very extended sources).
Please consider using the spectrum and responses (PHA, ARF, and RMF files) from TGCat in your analysis.
Repro V (5) data
Datasets which have been processed as part of Repro V (5), and those recently obtained data processed with ASCDSVER=10.8.3 and newer include grating ARFs and RMF files for the source spectrum extracted in the pha2 file. These files are located in the primary/responses directory.
The creation of the grating ARF and RMF is now automated.
chandra_repro will now automatically create the RMF and ARF for grating spectra. The results are stored in a tg/ subdirectory of the output directory.
Also, the mktgresp tool will create all the ARFs and RMFs for the grating spectra in a type II PHA file using the default grids and standard calibrations files. Just simply run
unix% mktgresp pha2 evt2 root_filename
where pha2 and evt2 are the filenames of your spectra output from tgextract or tgextract2 and the corresponding event file.
If you have run chandra_repro or mktgresp then you are done with this thread and may move onto fitting and modeling your spectra. If you need to customize your responses or want to learn more details of the step by step processing steps you can continue with this thread.
Download the sample data: 459 (HETG/ACIS-S, 3C 273)
unix% download_chandra_obsid 459
The data used in this thread was taken very early in the Chandra mission. It was not included in the bulk reprocessing metioned in the Watchout page. The keywords required for analysis with CIAO need to be added by running chandra_repro or r4_header_update.
Make sure that you have set up ardlib to use the bad pixel file for your observation before following this thread.
About the calibration files
The calibration files used by mkgrmf (LSFPARM files) are labeled as 1 and -1:
unix% ls -1 $CALDB/data/chandra/acis/lsfparm/ acisheg-1D1999-07-22lsfparmN0003.fits acisheg1D1999-07-22lsfparmN0003.fits acisheg-1D1999-07-22lsfparmN0004.fits acisheg1D1999-07-22lsfparmN0004.fits acismeg-1D1999-07-22lsfparmN0003.fits acismeg1D1999-07-22lsfparmN0003.fits acismeg-1D1999-07-22lsfparmN0004.fits acismeg1D1999-07-22lsfparmN0004.fits acismeg-1D1999-07-22lsfparmN0005.fits acismeg1D1999-07-22lsfparmN0005.fits acissleg1D1999-07-22lsfparmN0002.fits acissleg-1D1999-07-22lsfparmN0003.fits acissleg1D1999-07-22lsfparmN0003.fits acissleg-1D1999-07-22lsfparmN0004.fits acissleg1D1999-07-22lsfparmN0004.fits
They scale nicely at higher orders, however, allowing one to build a fair representation of 2nd or 3rd order gRMFs based on 1st order LSF model.
Currently there is calibration available to create:
- +/- 1, 2, and 3 HEG and MEG randomized and unrandomized gRMFs
- +1 LEG randomized gRMFs
- +/- 1 LEG unrandomized gRMFs
The LSFPARM data is calibrated for on-axis or "near" pointings (within 1-2 arcmin radius of the axis). mkgrmf is not useful for observations with an offset of more than 2 arcmin as the calibration does not take into account the broadening introduced at larger off-axis angles.
Here we create a +1 order HEG gRMF with standard grids:
unix% punlearn mkgrmf unix% pset mkgrmf order=1 unix% pset mkgrmf grating_arm=HEG unix% pset mkgrmf outfile=heg_p1.rmf unix% pset mkgrmf obsfile="acisf00459_repro_evt2.fits[EVENTS]" unix% pset mkgrmf regionfile=acisf00459_repro_pha2.fits unix% pset mkgrmf detsubsys=ACIS-S3 unix% pset mkgrmf wvgrid_arf=compute unix% pset mkgrmf wvgrid_chan=compute unix% pset mkgrmf clobber=no unix% mkgrmf Output File Name (heg_p1.rmf): Enter ARF side wavelegth grid [angstroms] (compute): Enter channel-side wavelegth grid [angstroms] (compute): Enter Grating order (1): Name of fits file with obs info (acisf00459_repro_evt2.fits[EVENTS]): File containing extraction region (acisf00459_repro_pha2.fits): SrcID (1): Enter RMF threshold (1e-06): Verbosity (0:5) (0): Detector Name (e.g., ACIS-S3) (ACIS-S3): Enter Grating Arm (HEG|MEG|LEG|NONE) (HEG):
There are a few details to note:
The default srcid=1 is used in this example. The srcid is the number of the source in the pha2 file and is used to find the appropriate source position for creating the gRMF. For most observations, there is a single source in the grating observation; if you need to create a gRMF for more than one source in an observation, e.g. to use the output of the Grating Spectra for Multiple ACIS Sources thread, change the srcid to the correct source id for the data.
The detsubsys parameter is set to the chip on which the 0th order falls. For most observations, this will be ACIS-S3.
Specifying compute as the grid value is the same as using the default gridding. The default grids for the wvgrid_arf parameter, suitable for most analysis, are listed in the help file. In general, wvgrid_chan is set to be the same as the arf grid.
It is also possible to run mkgrmf with non-standard grids for the wvgrid_arf and wvgrid_chan parameters, e.g.:
unix% pset mkgrmf wvgrid_arf="1.0:205.8:0.01" unix% pset mkgrmf wvgrid_chan="1.0:205.8:0.01"
The contents of the parameter may be checked with plist mkgrmf.
Run the tool for every order and arm you wish to model, changing the order and grating_arm parameters accordingly.
Matching the grid to the PHA file
It is necessary for the grid to match that of the PHA file for the observation. The default pha2.fits binsize (from tgextract) is 0.0125 Å; if your PHA file was created with a different gridding, the RMF bin width must be chosen to match it.
If you are unsure of the gridding of your PHA file, it is possible to specify the file itself as the grid. This requires that a Type 1 PHA file be split out of the pha2.fits file beforehand, but ensures that the grids will match exactly:
unix% dmtype2split infile="acisf00459N004_pha2.fits[tg_part=1,tg_m=1]" outfile="heg_p1_pha.fits[SPECTRUM]" unix% pset mkgrmf wvgrid_arf="grid(heg_p1_pha.fits[cols BIN_LO,BIN_HI])" unix% pset mkgrmf wvgrid_chan="grid(heg_p1_pha.fits[cols BIN_LO,BIN_HI])"
Note: This may generate a grid that is well beyond the calibrated energy range. Due to a bug in earlier version of CIAO this could lead to negative effective areas which are non-physical.
You will need to make a Type 1 PHA file for each grating arm and order for which you are generating response files. Change the row number for the grating arm and order that you are working with in the dmtype2split command accordingly; see the Examining Grating Spectra for more information. Then run the tool as shown above.
This thread is now complete. You may procede to the Grating ARF thread appropriate for your observation: HETG/ACIS-S or LETG/ACIS-S.
Parameters for /home/username/cxcds_param/mkgrmf.par outfile = heg_p1.rmf Output File Name wvgrid_arf = compute Enter ARF side wavelength grid [angstroms] wvgrid_chan = compute Enter channel-side wavelength grid [angstroms] order = 1 Enter Grating order obsfile = acisf00459N004_pha2.fits[SPECTRUM] Name of fits file with obs info regionfile = acisf00459N004_pha2.fits File containing extraction region srcid = 1 SrcID # threshold = 1e-06 Enter RMF threshold detsubsys = ACIS-S3 Detector Name (e.g., ACIS-S3) grating_arm = HEG Enter Grating Arm # verbose = 0 Verbosity (diagonalrmf = no) Compute diagonal RMF? # # (ardlibparfile = ardlib.par) name of ardlib parameter file (geompar = geom) Parameter file for Pixlib Geometry files # (mirror = HRMA) Mirror Name (clobber = no) Overwrite existing files? (mode = ql) Enter mode for parameter file.
|20 Dec 2004||updated for CIAO 3.2: canned gRMFs are no longer available in the CALDB, users must run this thread|
|10 May 2005||added more detail to thread overall|
|05 Dec 2005||reviewed for CIAO 3.3: no changes|
|01 Dec 2006||reviewed for CIAO 3.4: no changes|
|01 May 2007||updated for CALDB 3.4.0: new MEG LSFPARM files|
|11 Jan 2008||reviewed for CIAO 4.0: specify output block name ("[SPECTRUM]") for dmtype2split; removed outdated calibration updates|
|12 Feb 2009||updated for CIAO 4.1: paths to calibration files updated for CALDB 4; input data must have a CTI_APP keyword|
|24 Feb 2009||added Off-axis Angles section|
|04 Mar 2009||srcid information added to the Run mkgrmf section|
|16 Jun 2009||added About the Chandra Grating Data Archive and Catalog section|
|14 Jan 2009||updated for CIAO 4.2: ObsID 459 file versions|
|15 Dec 2010||updated for CIAO 4.3: new LSFPARM calibration file|
|10 Jan 2012||reviewed for CIAO 4.4: no changes|
|03 Dec 2012||Review for CIAO 4.5; changed dmtype2split syntax to use tg_part and tg_m; added note about pre CIAO 4.5 negative specresp values.|
|24 Apr 2013||Add pointer to new mktgresp tool.|
|10 Dec 2013||Review for CIAO 4.6. Added warning about early dataset. Added note about obsfile.|
|22 Dec 2014||Review for CIAO 4.7; no changes.|
|31 Jan 2022||Review for CIAO 4.14. Added section about repro5 datasets.|