Skip to the navigation links
Last modified: 14 Jan 2009
Where are the PDFs?

ACIS-S Grating RMFs

CIAO 4.2 Science Threads



Overview

Last Update: 14 Jan 2009 - updated for CIAO 4.2: ObsID 459 file versions

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 for on-axis sources

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



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.



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) 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

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 Randomized vs. unrandomized data section contains more details.


Off-axis Angles

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.


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="acisf00459N004_pha2.fits[SPECTRUM]"
unix% pset mkgrmf regionfile=acisf00459N004_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 (acisf00459N004_pha2.fits[SPECTRUM]): 
File containing extraction region (acisf00459N004_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.



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="acisf00459N004_pha2.fits[#row=4]" 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])" 

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 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.
    

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
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

Return to Threads Page: Top | All | Grating

Where are the PDFs?
Last modified: 14 Jan 2009