Create Grating RMFs for ACIS-S Observations
[CIAO 3.4 Science Threads]
OverviewLast Update: 1 May 2007 - updated for CALDB 3.4.0: new MEG LSFPARM files Synopsis: 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. Purpose: To create observation-specific gRMFs. Read this thread if: you are working with ACIS-S grating data and would like to create a grating RMF file. Get Started: About the calibration files discusses the available calibration.
Related Links:
|
Contents
- Get Started
- Run mkgrmf
- Caveats
- Summary
- Parameter files:
- History
Get Started
Sample ObsID used: 459 (HETG/ACIS-S, 3C 273)
File types needed: pha2
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) for the HETG grating arm (HEG, MEG) are labeled as +1 and -1:
unix% ls -1 $CALDB/data/chandra/tel/grating/hetg/cpf/lsf/ acisheg-1D1999-07-22lsfparmN0003.fits acisheg-1D1999-07-22lsfparmN0004.fits acisheg1D1999-07-22lsfparmN0003.fits acisheg1D1999-07-22lsfparmN0004.fits acismeg-1D1999-07-22lsfparmN0003.fits acismeg-1D1999-07-22lsfparmN0004.fits acismeg-1D1999-07-22lsfparmN0005.fits acismeg1D1999-07-22lsfparmN0003.fits acismeg1D1999-07-22lsfparmN0004.fits acismeg1D1999-07-22lsfparmN0005.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.
This holds true for the LETG calibration as well:
unix% ls -1 $CALDB/data/chandra/tel/grating/letg/cpf/lsf/acis* acissleg-1D1999-07-22lsfparmN0003.fits acissleg1D1999-07-22lsfparmN0002.fits acissleg1D1999-07-22lsfparmN0003.fits
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 Randomized vs. unrandomized data section contains more details.
Randomized vs. unrandomized data
In CIAO 3.1 (and DS 7.3.0), the value of the rand_pix_size parameter in tg_resolve_events was changed from 0.5 to 0.0. This means that, by default, randomization is not applied to the chip pixel coordinates before diffraction coordinates are derived. mkgrmf uses the value of the RAND_TG header keyword to determine whether or not the input data (obsfile parameter) was randomized and to select the correct calibration file; RAND_TG=0 indicates that the data is not randomized.
It is recommended that users remove the pixel randomization from their data before running this thread. To do so, re-run tg_resolve_events - as shown in the Obtain Grating Spectra for HETG/ACIS-S or LETG/ACIS threads - and extract a new PHA2 file.
Run mkgrmf
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="acisf00459N002_pha2.fits[SPECTRUM]" unix% pset mkgrmf regionfile=acisf00459N002_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 (acisf00459N002_pha2.fits[SPECTRUM]): File containing extraction region (acisf00459N002_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 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.
Caveats
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="acisf00459N002_pha2.fits[#row=4]" outfile=heg_p1_pha.fits 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])"
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.
Summary
This thread is now complete. You may procede to the Compute 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 = acisf00459N002_pha2.fits[SPECTRUM] Name of fits file with obs info regionfile = acisf00459N002_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. |
History
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 |