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

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/mkgrmf.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 mkgrmf Context: tools

Synopsis

Generate an RMF for Chandra grating data

Syntax

mkgrmf  outfile wvgrid_arf wvgrid_chan order obsfile regionfile src_id
threshold detsubsys grating_arm verbose [diagonalrmf] [ardlibparfile]
[geompar] [mirror] [clobber]

Description

The mkgrmf program generates an OGIP style RMF appropriate for spectral analysis of grating observations. The RMF is a representation of how the incident source photons are redistributed onto the detector, thus the grating RMF contains the HRMA + grating line spread function (LSF) vs energy for a given detector and grating combination.

mkgrmf calculates the RMF on user defined set of grid points, e.g. wavelength channel, for a given set of input functions. The output file contains two fits extensions, SPECRESP MATRIX and EBOUNDS. The SPECRESP matrix is generated by interpolating the parameters of LSF function in wavelength and then generating the LSF from the interpolated parameters. The EBOUNDS extension contains an array with the energy boundaries of each of the detector channels.

The input data files for mkgrmf have a few sets of LSFs per grating type, order, and detector configuration, a set for each of five to ten extraction regions. These regions range approximately from the 60 to 99% encircled energy (EE), where the percentage is defined to be at 1.497keV. The user is not required to use any specific extraction regions, but the tool will use a bi-linear interpolation method to determine the best RMF for the extracted data. For the case where the extraction region is larger (or smaller) than the largest (smallest) EE region, the RMF will be derived via extrapolation. The extraction region is assumed to be appended to the PHA file. For the grating data processed by CIAO, this region is appended to the type II PHA file.

Example 1

mkgrmf grating_arm="HEG" order=3 outfile="heg3.rmf" \
src_id=1 detsubsys=ACIS-S3 threshold=1e-06 \
obsfile="./acis_f1235_000N002_pha2.fits" \
regionfile="./acis_f1235_000N002_pha2.fits" \
wvgrid_arf="compute"\
wvgrid_chan="compute"

Computes a third order RMF for the HEG, writes the output to heg3.rmf and uses the default grids for the rmf. Note setting the parameter wvgrid_arf to "1.0:21.48:#8192" is equivalent to setting it to compute.

Example 2

mkgrmf grating_arm="LEG" order=1 outfile="leg1.rmf" \
obsfile="./hrcf00058N002_pha2.fits" \
regionfile="./hrcf00058N002_pha2.fits" \
wvgrid_arf="1.0:205.8:0.01"\
wvgrid_chan="1.0:205.8:0.01"

Computes a first order RMF for the LEG, writes the output to leg1.rmf and uses non-standard grids for the rmf.

Example 3

mkgrmf grating_arm="MEG" order=-1 outfile="meg1_log.rmf" \
obsfile="./acis_f1235_000N002_pha2.fits" \
regionfile="./acis_f1235_000N002_pha2.fits" \
wvgrid_arf="1.0:21.48:0.05L"\
wvgrid_chan="1.0:21.48:0.05L"

Computes a minus first order RMF for the MEG, writes the output to meg1_log.rmf and uses custom grids for the rmf. In this case we have chosen a logarithmic grid.

Parameters

name type ftype def min max units reqd
outfile string output         yes
wvgrid_arf string   compute     Angstrom yes
wvgrid_chan string   compute     Angstrom yes
order integer   1       yes
obsfile string input         yes
regionfile string input         yes
src_id integer   1       yes
threshold real   1.0e-6       yes
detsubsys string   ACIS-S3       yes
grating_arm string           yes
verbose integer   0 0 5   yes
diagonalrmf string   no        
ardlibparfile string   ardlib.par        
geompar string   geom        
mirror string   HRMA        
clobber boolean   yes        

Detailed Parameter Descriptions

Parameter=outfile (string required filetype=output)

Output File Name

The name of the output RMF file.

Parameter=wvgrid_arf (string required default=compute units=Angstrom)

Enter ARF side wavelength grid [angstroms]

Wavelength grid for the arf specification string. This string may specify compute, a file, or an explicit energy grid. For example, to use a grid for the MEG that ranges from 1 to 41.96 angstroms with 8192 channels set. The units for this parameter is angstroms.


  wvgrid_arf="1.0:41.96:#8192"

This is the same grid that you would get with


  wvgrid_arf=compute

The default grids for the three grating types are

Grating type wvgrid_arf
MEG 1.0:41.96:#8192
HEG 1.0:21.48:#8192
LEG 1.0:205.8:#16384

Parameter=wvgrid_chan (string required default=compute units=Angstrom)

Enter channel-side wavelength grid [angstroms]

Specification string for the channel side wavelength grid. This string may specify compute, a file, or an explicit energy grid. In general this is set to be the same as the arf grid. However, there is no compelling reason that the fitting engine needs the ARF and the RMF on the same grid so this has been left as a user adjustable parameter. The units for this parameter is angstroms.

Parameter=order (integer required default=1)

Enter Grating order

The order that the RMF will be computed for.

Parameter=obsfile (string required filetype=input)

Name of fits file with obs info

The name of a FITS file containing keywords which specify the mission, detector, SIM offsets, extraction region etc. The PHA2 spectral file is needed to read the width of the extraction region. The LSF input data files have LSFs for approximately 99.75, 99, 96, 90, and 60% encircled energy, where the percentage is definted to be at 1.497keV. The tool then interpolates the LSF parameters.

Parameter=regionfile (string required filetype=input)

File containing extraction region

The name of a FITS file containing keywords which specify the extraction region.

Parameter=src_id (integer required default=1)

SrcID

The number of the source in the spectrum list. This will be used to determine source parameters such as the source position.

Parameter=threshold (real required default=1.0e-6)

Enter RMF threshold

The lowest value for the response matrix calculation.

Parameter=detsubsys (string required default=ACIS-S3)

Detector Name (e.g., ACIS-S3)

The ACIS chip or HRC plate on which the 0th order falls. The value of this parameter is passed to ARDLIB to select a particular detector subsystem so that the appropriate grid can be computed for the case where wvgrid_arf and wvgrid_chan are both set to "compute". For Chandra, this is most commonly one of these two detector subsystems:

  • ACIS-S3
  • HRC-S2

However this parameter can be any one of the following detector subsystems:

  • HRC-I
  • HRC-S1, HRC-S2, HRC-S3
  • ACIS-I0, ACIS-I1, ACIS-I2, ACIS-I3
  • ACIS-S0, ACIS-S1, ACIS-S2, ACIS-S3, ACIS-S4, ACIS-S5

Parameter=grating_arm (string required)

Enter Grating Arm

Name of the grating that the rmf will be computed for. Valid values are HEG, MEG and LEG.

Parameter=verbose (integer required default=0 min=0 max=5)

Verbosity

The verbose parameter is used to set the level of output from mkgrmf.

Parameter=diagonalrmf (string default=no)

Compute diagonal RMF

Option to compute a diagonal RMF. This option gives the correct wavelength grid for any order but has no LSF information encoded.

Parameter=ardlibparfile (string default=ardlib.par)

name of ardlib parameter file

The tool-specific parameter file contains no explicit CALDB parameters. Instead, the CALDB parameters are all contained in a separate parameter file selectable using the `ardlibparfile' parameter; "ardlib.par" is the default file name. Calibration files are specified implicitly via the `DetSubsys' and `Mirror' parameters described below.

Parameter=geompar (string default=geom)

The name of the Pixlib Geometry parameter file.

Parameter=mirror (string default=HRMA)

Mirror Name

For Chandra the mirror parameter must be set to "HRMA".

Parameter=clobber (boolean default=yes)

Overwrite existing files?

The default values here is yes which allows you to overwrite existing files. Changing this to "no" will prevent the overwriting of files.

Notes

The command "mkgrmf --version" prints the version of mkarf and the associated libraries. This is useful when reporting problems with the tool.

Bugs

See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 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.