About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: 1 Dec 2006
Hardcopy (PDF): A4 | Letter

Create Grating RMFs for HRC Observations

[CIAO 3.4 Science Threads]



Overview

Last Update: 1 Dec 2006 - reviewed for CIAO 3.4: no changes

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 HRC grating data and would like to create a grating RMF file. Get Started discusses the available calibration.

Related Links:

Proceed to the HTML or hardcopy (PDF: A4 | letter) version of the thread.




Contents



Get Started

Sample ObsID used: 460 (LETG/HRC-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 order:

unix% cd $CALDB/data/chandra/tel/grating/letg/cpf/lsf/
unix% ls -1 hrcsleg*
hrcsleg-1D1999-07-22lsfparmN0003.fits
hrcsleg1D1999-07-22lsfparmN0002.fits
hrcsleg1D1999-07-22lsfparmN0003.fits

The 1st order LSF scales nicely at higher orders, however, allowing mkgrmf to build higher order gRMFs based on 1st order model. If you request a higher order response file, a message of this form will be printed:

WARNING: Unable to find a row with TG_M=2 --- rescaling TG_M=1 region

The tool looks for a 2nd-order calibration file and, failing to find one, chooses the 1st order LSF and builds the gRMF based on it.


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 LETG/HRC-S Data thread - and extract a new PHA2 file.

If your analysis requires that you use randomized data, please read the responses for randomized HRC-S data caveat.



Run mkgrmf

Here we create a +1 order gRMF with standard grids:

unix% punlearn mkgrmf
unix% pset mkgrmf order=1
unix% pset mkgrmf grating_arm=LEG
unix% pset mkgrmf outfile=leg_p1.rmf
unix% pset mkgrmf obsfile="hrcf00460N004_pha2.fits[SPECTRUM]"
unix% pset mkgrmf regionfile=hrcf00460N004_pha2.fits
unix% pset mkgrmf detsubsys=HRC-S2
unix% pset mkgrmf wvgrid_arf=compute
unix% pset mkgrmf wvgrid_chan=compute
unix% pset mkgrmf clobber=no
unix% mkgrmf
Output File Name (leg_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 (hrcf00460N004_pha2.fits[SPECTRUM]): 
File containing extraction region (hrcf00460N004_pha2.fits): 
SrcID (1): 
Enter RMF threshold (1e-06): 
Verbosity (0:5) (0): 
Detector Name (e.g., ACIS-S3) (HRC-S2): 
Enter Grating Arm (HEG|MEG|LEG|NONE) (LEG): 

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

  • 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 you wish to model, changing the order parameter accordingly. This process can be automated with a foreach loop (shown here for the tcsh shell). After setting the mkgrmf parameters:

unix% foreach f ( -1 -2 -3 1 2 3 )
foreach? mkgrmf outfile=460_leg_{$f}.grmf order=$f mode=h
foreach? end

This loop creates gRMFs for the first three positive and negative orders of the spectra. The Creating Higher-order Responses for HRC-S/LETG Spectra thread provides some advice on determing the number of orders to model.



Caveats

Responses for randomized HRC-S data

For randomized data, there is only calibration available for the positive orders. This is primarily due to the fact that users are recommended to work with unrandomized data, so a higher priority is placed on making those calibration files.

Since the effect of randomization on LETG+HRC-S data is virtually zero, the randomized and unrandomized calibration is essentially identical. This means that you can use the negative-order unrandomized file to make negative-order randomized gRMFs.

In order to do so, it is necessary to set the filename in ardlib.par:

unix% pset ardlib \
      AXAF_LETG_1111_LSF_FILE="$CALDB/data/chandra/tel/grating/letg/cpf/lsf/hrcsleg-1D1999-07-22lsfparmN0003.fits"

This forces mkgrmf to use the -1 randomized file for all runs of the tool, so make sure to "punlearn ardlib" when finished with this analysis. Otherwise the wrong file will be selected in future sessions.


Working with LETG/HRC-I data

The calibration files used by mkgrmf (LSFPARM files) were calibrated for LETG/HRC-S data, but may be used for HRC-I data as well. The calibration would be identical, except at the very ends of the spectrum. The difference became noticeable around 0.2 keV and worsened quickly at a lower energies.

  • Pixel size is not an issue, and intrinsic charge cloud-related detector broadening in HRC-I is very similar to HRC-S, and small compared with mirror broadening.

  • The HRC-I plate is 90x90mm, or 127mm along the diagonal of the dispersion axis, compared to 100mm for the HRC-S central plate. The Rowland circle will deviate from the detector for HRC-I only at the extra ~8.5mm at each end. As can be seen from the LETG/HRC-S though, this effect is insignificant over the whole of the HRC-S, so will likely not get that much worse over the extra few mm in HRC-I.

Users that have questions or need further information on creating gRMFs for LETG/HRC-I should contact the Helpdesk.




Summary

This thread is now complete. You may procede to the Compute Grating ARF thread appropriate for your observation: LETG/HRC-S or LETG/HRC-I.




Parameters for /home/username/cxcds_param/mkgrmf.par


       outfile = leg_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 = hrcf00460N004_pha2.fits[SPECTRUM] Name of fits file with obs info
    regionfile = hrcf00460N004_pha2.fits File containing extraction region
         srcid = 1                SrcID
#
     threshold = 1e-06            Enter RMF threshold
     detsubsys = HRC-S2           Detector Name (e.g., ACIS-S3)
   grating_arm = LEG              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
14 Jan 2005 added Working with LETG/HRC-I data caveat
08 Apr 2005 added more detail to thread overall; new section - Get Started: About the calibration files; new caveat - Responses for randomized HRC-S data
05 Dec 2005 reviewed for CIAO 3.3: no changes
06 Feb 2006 removed "Matching the grid to the PHA file" section, as it is not straightforward for HRC observations; users who set a custom bin size when running tgextract (e.g. not 0.0125 Å) may contact the Helpdesk for assistance.
01 Dec 2006 reviewed for CIAO 3.4: no changes

Return to Threads Page: Top | All | Grating
Hardcopy (PDF): A4 | Letter
Last modified: 1 Dec 2006


The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.