sxirmf -- Create an SXI energy Redistribution Matrix File (RMF)


sxirmf infile outfile


'sxirmf' creates an SXI RMF file that may be used for spectral analysis with an input spectrum file. The output RMF contains a matrix that, for a given incoming X-ray photon energy, describes the normalized probability of detecting that photon in any PI (pulse invariant) channel. This photon can be redistributed to PI channels away from the expected energy due to interactions with different material in the detector. For the SXI, the response is composed of: (1) a primary Gaussian component, centered at the expected energy, for photons that interact and are detected completely in the sensitive layer of the detector; (2) a secondary Gaussian sub-peak at slightly lower energy, for photons that lose some charge to pixels below the split threshold; (3) a Gaussian silicon escape peak centered at 1.74 keV below the primary peak, for photons that have some energy absorbed by a CCD Si atom; (4) a Gaussian silicon fluorescence peak at constant energy 1.74 keV, if the Si atom excited in the interaction with the X-ray photon emits a Si K alpha photon that is then detected in a different region; and (5) a constant continuum component extending from the peak energy to 0 eV, produced when a photon interacts near the insensitive detector layer and some charge is lost.

The SXI response has been measured on the ground using sources of monochromatic X-rays at a number of energies. However, increasing charge transfer inefficiency (CTI) due to radiation damage changes the response, especially the width of the Gaussian features, and so the RMF depends on both observation time and position on the detector. This information is extracted from the header keywords and the weighted map (WMAP) image, respectively, in the input spectrum file. The WMAP is a small counts image of the extracted events, which is used to weight the response parameters in each region before combining to produce a weighted response. Response parameters are defined in the CALDB at a number of energies, and interpolation is performed to place them on the energy grid in the MATRIX extension before the response is calculated.

The output RMF contains a MATRIX extension, which contains the response matrix; and an EBOUNDS extension listing the energy boundaries of each PI channel.

The energy bin size(s) of the RMF may be set with the 'dein' parameter, with 'eminin' and 'nchanin' determining the energy range for those bins (see below for more detail). The recommended energy bin sizes are 2 eV and 24 eV for the energies below and above 12 keV, respectively. The default parameter values of 'eminin=200', 'dein=2,24', and 'nchanin=5900,500' are determined so that these recommended MATRIX bins are calculated. Furthermore, the grid energy of 'EBOUNDS' must match the PI grid of the spectrum file, so the default parameter values of 'deout=6', 'eminout=0', and 'nchanout=4096' should be maintained, unless users want to change them for their specific purpose. Changing any of the hidden parameter values for this tool is not recommended and must be done with care.


infile [filename]
Name of input spectrum (PHA) file. It must contains a WMAP image rendered in the DET coordinate system in the primary extension.

outfile [filename]
Name of output response (RMF) file

(rmfparam = CALDB) [filename]
Name of input file from which the RMF parameters are read

(eminin = 200.0) [real]
Minimum energy of the MATRIX grid in eV.

(dein = 2,24) [string]
Spacing of energy bins (in eV) in each interval of the MATRIX grid. A single value (e.g., 2) applies a constant grid spacing for the entire matrix. Multiple values separated by commas (e.g., '2,24' as the default) create a variable grid spacing starting at 'eminin'. The number of channels in each energy interval must be specified with 'nchanin'. The values can be floating point.

(nchanin = 5900,500) [string]
Number of channels in each interval of the MATRIX grid. Combined with the default values of the previous two parameters, the default of '5900,500' means that the output MATRIX has 5900 bins (with 2 eV size) between 200 eV and 12000 eV, and 500 bins (with 24 eV size) above 12000 eV (hence up to 24000 eV). 'dein' and 'nchanin' must have the same number of intervals. The values of 'nchanin' must be integers

(eminout = 0.0) [real]
Minimum energy of EBOUND in eV. The default value is 0.

(deout = 6.0) [real]
Spacing of the EBOUND energy grid in eV. This must be consistent with the assumed energy grid of the PHA file (i.e., 6 eV for the SXI).

(nchanout = 4096) [integer]
Number of channels in EBOUND. This must be consistent with the number of PI channels in the PHA file. The default value for SXI is 4096.

(rmfthresh = 1.e-6) [real]
Low threshold for the RMF construction. For a given X-ray photon energy, the normalized probability (i.e., a value less than 1) of producing a certain PI value is calculated for each channel and written in the MATRIX extension. If the probability is less than this threshold, 0 (zero) is written for that element. Using the default value (1.0e-6) is secure enough for most cases.

(buffer = -1) [integer]
Rows to buffer (-1=auto, 0=none, >0=numrows).

(clobber = no) [boolean]
Overwrites the existing output file if set to yes (yes/[no]).

(chatter = 1) [integer]
Chatter level for output. Set to 0 to suppress output, or to 1, 2, or 3 for increasing the chatter of the output.

(logfile = !DEFAULT) [string]
Log filename. If set to DEFAULT uses the name of the task and, if preceded by '!', overwrite the file if it exists. If set to NONE no log file is created.

(debug = no) [boolean]
Diagnostic output is printed out on the screen if set to yes (yes/[no]).

(history = yes) [boolean]
Records tool parameters in HISTORY if set to yes ([yes]/no).

(mode = ql) [string ql|hl|q]
Mode to query the parameter file. Acceptable values include: "ql" (query and learn/remember), "hl" (hidden and learn/remember), "q" (query but don't remember), "h" (hidden).


  1. Create an RMF file with default energy grid and other settings.
    sxirmf infile="spectrum.pha" outfile="response.rmf"
  2. Create an RMF file with energy grid of 2 eV for the entire energy band of 0.2-24 keV.
    sxirmf infile="spectrum.pha" outfile="response.rmf" dein=2 nchanin=11900


sxipi, sxsrmf


February 3, 2016