| AHELP for CIAO 4.5 | mktgresp |
Context: tools |
Synopsis
Create ARF and RMF files for each spectral order and grating arm in a TypeII PHA file
Syntax
mktgresp infile evtfile outroot [wvgrid_arf] [wvgrid_chan] [asolfile] [bpixfile] [mskfile] [dtffile] [pbkfile] [dafile] [osipfile] [verbose] [clobber]
Description
The 'mktgresp' tool will create the ARF and RMF for each spectral order and grating arm in a Type II PHA file. It runs the mkgrmf tool and the fullgarf script with the appropriate inputs using the energy and channel grids.
For ACIS data, the default PHA files will have 12 spectra for HETG: +/- 3 orders for each MEG and HEG, and 6 for LETG: +/- 3 orders. Since HRC lacks energy resolution, the spectra cannot be order separated so there are only 2 spectra: +/- 1 which represents the contribution from all orders.
The tool will automatically try to locate the auxiliary files needed to make the response products: aspect solution, bad-pixel file, mask, dead time factors (HRC only), and parameter block (ACIS only). If any of these cannot be found, it will produce an error and users will need to set the file name via the parameter file.
Example
unix% mktgresp acis_repro_pha2.fits acis_repro_evt2.fits acis_repro
The ARF and RMF for each spectral order and grating arm in the input PHA file is created using the default energy and channel grids.
unix% /bin/ls acis_repro*.arf acis_repro*.rmf acis_repro_heg_m1.arf acis_repro_heg_p2.arf acis_repro_meg_m3.arf acis_repro_heg_m1.rmf acis_repro_heg_p2.rmf acis_repro_meg_m3.rmf acis_repro_heg_m2.arf acis_repro_heg_p3.arf acis_repro_meg_p1.arf acis_repro_heg_m2.rmf acis_repro_heg_p3.rmf acis_repro_meg_p1.rmf acis_repro_heg_m3.arf acis_repro_meg_m1.arf acis_repro_meg_p2.arf acis_repro_heg_m3.rmf acis_repro_meg_m1.rmf acis_repro_meg_p2.rmf acis_repro_heg_p1.arf acis_repro_meg_m2.arf acis_repro_meg_p3.arf acis_repro_heg_p1.rmf acis_repro_meg_m2.rmf acis_repro_meg_p3.rmf
Parameters
| name | type | def | min | max | units | reqd | stacks |
|---|---|---|---|---|---|---|---|
| infile | file | yes | |||||
| evtfile | file | yes | |||||
| outroot | file | yes | |||||
| wvgrid_arf | string | compute | Angstrom | no | |||
| wvgrid_chan | string | compute | Angstrom | no | |||
| asolfile | file | no | yes | ||||
| bpixfile | file | no | |||||
| mskfile | file | no | |||||
| dtffile | file | no | |||||
| pbkfile | file | no | |||||
| dafile | file | CALDB | no | ||||
| osipfile | file | CALDB | no | ||||
| verbose | integer | 0 | 0 | 5 | |||
| clobber | boolean | no |
Detailed Parameter Descriptions
Parameter=infile (file required)
Input type II pha file
The input type II PHA file produced by either tgextract or tgextract2.
Parameter=evtfile (file required)
Input event file
The input event file with the extraction region attached. This file is also used to locate the auxiliary files with the information stored in the header.
Parameter=outroot (file required)
Output path and root file name for the products
The output file name will be
${root}_${arm}_${pm}${order}.${type}where ${root} is this parameter. ${arm} is the grating arm: 'leg', 'meg', or 'heg'. ${pm} is 'p' for positive/plus orders and 'm' for minus/negative orders. ${order} is the integer order number: for ACIS the default PHA file will have orders '1', '2', and '3'. For HRC, only '1'. The ${type} identifies the file as either 'arf' or 'rmf'.
Parameter=wvgrid_arf (string not required default=compute units=Angstrom)
Wavelength grid of rmf and arf
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 not 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=asolfile (file not required stacks=yes)
Names of aspect solution file(s).
If blank, the script will use the information in the header of the event file to try to locate the correct file. If it cannot then the user must set the file name explicitly.
Parameter=bpixfile (file not required)
Name of bad pixel file.
If blank, the script will use the information in the header of the event file to try to locate the correct file. If it cannot then the user must set the file name explicitly.
Parameter=mskfile (file not required)
Names of instrument mask file.
If blank, the script will use the information in the header of the event file to try to locate the correct file. If it cannot then the user must set the file name explicitly.
Parameter=dtffile (file not required)
HRC Only. Name of dead time factors, dtf, file.
If blank, the script will use the information in the header of the event file to try to locate the correct file. If it cannot then the user must set the file name explicitly.
Parameter=pbkfile (file not required)
ACIS only. Names of parameter block, pbk, file.
If blank, the script will use the information in the header of the event file to try to locate the correct file. If it cannot then the user must set the file name explicitly.
Parameter=dafile (file not required default=CALDB)
ACIS only. Name of the dead area calibration file.
The default, CALDB, will retrieve the correct file from the calibration database. If blank, then the dead area calibration will be omitted from the ARF.
Parameter=osipfile (file not required default=CALDB)
Order sorting calibration file
The order sorting calibration file contains information needed to construct the ARF. The default, CALDB, will retrieve the correct file from the calibration database.
Parameter=verbose (integer default=0 min=0 max=5)
Amount of information printed to the terminal
Parameter=clobber (boolean default=no)
Should existing files be removed?
About Contributed Software
This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see this page for installation instructions - such as how to ensure that the parameter file is available.
Bugs
There are no known bugs for this tool.
See Also
- chandra
- eventdef
- tools
- dmtype2split, tg_bkg, tg_create_mask, tg_findzo, tg_resolve_events, tgdetect, tgextract, tgextract2, tgidselectsrc, tgmatchsrc

![[CIAO Logo]](../imgs/ciao_logo_navbar.gif)