The rslmkrmf task is a script that calculates a Resolve redistribution matrix file (RMF) for selected grade and pixel combinations, weighted according to relative counts. After a file containing the weights is calculated based on the pixel and grade distributions in the input event file, the RMFs for single pixels and grades are individually calculated by the task rslrmf, and then combined with the appropriate weights. If an ARF is provided, rslmkrmf can output a total response (RSP) file upon request.
The required inputs to rslmkrmf are: (1) a cleaned Resolve event file ('infile') that is derived from the cleaned event file that was used to extract the spectrum to which the RMF is to be applied; (2) a list of resolution grades ('resolist'); and (3) a list of pixels. The selected grades and pixels should match the lists that were used to extract the spectrum and to create the ARF. Compared to the event file used to extract the spectrum, the input event file may have lo-res secondary (Ls) events removed, as well as energy-band selection, in order to mitigate the effects false (non-source) Ls events and anomalous branching ratios. Without such mitigation, the net effective area of the Resolve spectral responses could be in error by as much as a factor of ~2 because the RMF normalization accounts for the fact that the spectrum does not include all grades, but this factor must be based on true Ls events and well-behaved branching ratios.
The following two options for specifying the list of pixels are supported. (1) The user may input a DS9-format region file in either DET or SKY coordinates by setting the 'regmode' and 'regionfile' parameters. The task 'coordpnt' is then used to convert the region into a pixel list using the teldef CalDB file specified by the 'teldeffile' parameter. If 'regmode=SKY', by default the conversion from SKY coordinates uses the pointing recorded in the RA_NOM, DEC_NOM, and PA_NOM keywords of the input event file. However, these may be overridden using the 'rapoint', 'decpoint', and 'roll' parameters. For greatest accuracy, use a region file in DET coordinates. If 'regionfile=ALLPIX', all pixels are included. (2) If 'regionfile=NONE', the pixel selection is executed by entering the list of pixel ID numbers to include in the 'pixlist' parameter.
The selection of grades and pixels determined by the rslmkrmf parameters is used to construct a file containing the weights for each combination of grade and pixel (rslfrac.fits). This file is a FITS file with three columns: PIXEL, GRADE, and WEIGHT, where WEIGHT is defined as the ratio of counts for the specific PIXEL and GRADE combination to the total over the selected pixels. The rslfrac.fits file can be retained and used to enable the user to re-run rslrmf in a slightly different configuration without having to re-run rslmkrmf. The RMF for each pixel and grade is calculated by the rslrmf task using the line spread function (LSF) parameters stored in designated extensions of the CalDB file specified by the 'rmfparamfile' parameter. The LSF is assumed to consist of (1) a Gaussian core with an energy-dependent and pixel-dependent FWHM, (2) a pixel-dependent low-energy exponential tail due to energy loss at the surface of the absorbers, (3) a pixel-dependent extended low-energy electron loss continuum, (4) pixel-dependent discrete escape peaks from M-shell fluorescence of Hg or Te in the absorber, and (5) a pixel-dependent Si K alpha emission line.
Four types of RMF files may be created by setting the 'whichrmf' parameter. (1) The small option (s/S) includes only the Gaussian core; (2) the medium option (m/M) also includes the exponential tail and Si K alpha emission line; (3) the large option (l/L) also includes the escape peaks and Si K alpha line; and (4) the x-large option (x/X) also includes the electron loss continuum down to the minimum energy given by the 'emincont' parameter. The x-large matrix file may become very large (more than 2 GB), impractical to use, or even cause downstream software failures. In such cases the user should use the option to split the response function into two matrices using the 'splitrmf=yes' option. One matrix handles the "core" response, in which a significant number of off-diagonal elements are zero, and the other matrix handles the electron loss continuum (ELC), which is not sparsely filled but can be heavily binned to a coarser energy resolution (using the parameter 'elcbinfac'). If the 'splitrmf=yes' option is invoked and RSP matrices are requested (using 'outrsp=yes'), then the rslrmf task creates a second ARF output file that corresponds to the input ARF file binned to match the coarse ELC matrix. Note that 'splitrmf=yes' is only effective if 'whichrmf=X'. In general, the option 'outrsp=yes' deletes the RMF files that are used to make the RSP file by combing the RMF and ARF files.
The output file specifed by 'outfileroot'+".rmf" or 'outfileroot'+".rsp" is a FITS standard, containing the response matrix in the MATRIX extension and the PI channel definitions in the EBOUNDS extension. Output file names for the ELC component when 'splitrmf=yes' have "_elc" appended to the root name, before the ".rsp", ".rmf", or ".arf" file extension is appended. If 'splitcomb=yes', the two response matrices made with 'splitrmf=yes' will be placed into a single file. If 'outrsp=yes', the two ARFs will also be placed into a single file. In XSPEC the correct RMF, RSP, or ARF is specified by appending {n} to the file name, where n is an integer (and equal to the value of the keyword EXTVER in the header of the desired data set). For the fine-binned (i.e. core) response, n=1, whilst for the coarse-binned response (i.e., the ELC component), n=2.
Currently the CalDB parameter file only has calibration data for primaries because the LSF has not been calibrated for secondaries. However, the task rslrmf accomodates future versions of the CalDB file having independent calibration data for secondaries. The action of rslrmf is to first search the CalDB file for independent Ms or Ls calibration data if Ms or Ls events respectively are to be processed. If the required secondaries calibration data are not found, and if 'secondaries=yes', then the data for Mp and Lp are used in place of data for Ms and Ls respectively. Otherwise, if secondaries calibration data are found, they are used, regardless of the value of the 'secondaries' parameter. However, if 'secondaries=no' and calibration data for Ms or Ls are needed but not found, then the task aborts. There is also an option ('combps=yes') in rslmkrmf to make a weights file that combines primaries and secondaries, resulting in only three effective grades (H, M, L). This reproduces the behavior of the Hitomi task 'sxsmkrmf' and also results in faster excecution. Note that if 'combps=yes', the parameter 'secondaries' has no effect because all the events are effectively treated as primaries.
The energy bin widths of the input energy grid for the RMF may be set with the 'dein' parameter, with 'eminin' and 'nchanin' determining the energy range for those bins. The input energy grid may have multiple values for the number of energies and grid spacing to support a non-uniform grid. However, the single-grid default parameter values of 'eminin=0', 'dein=0.5', and 'nchanin=60000' are recommended. In this case the RMF MATRIX has 32768 input bins of 0.5 eV width, and extends to 16384 eV. If instead, for example, 'dein=0.5,2.0' and 'nchanin=26000,6500', the MATRIX would have 26000 input bins (with 0.5 eV size) up to 13000 eV, and 6500 bins (with 2 eV size) above 13000 eV (hence up to 26000 eV).
The output energy grid (EBOUNDS) must match the PI grid of the spectrum file. If the parameter 'useingrd=yes', the output grid is set equal to the input grid; this is the recommended binning. However, the EBOUNDS energy grid can be independently specified by setting the parameter values of 'deout', 'eminout', and 'nchanout'. If 'useingrd=yes', the output grid parameters are ignored.
rslmkrmf infile=xa100050020rsl_p0px1010_cl.evt outfileroot=rsl_allpix_large resolist=0 regionfile=ALLPIX
rslmkrmf infile=xa100050020rsl_p0px1010_uf.evt outfileroot=rsl_region_small resolist="0,1" regmode=SKY \
regionfile=rsl_sky.reg outrsp=yes arfinfile=rsl_region_small.arf whichrmf=S
rslmkrmf infile=rsl_cl_bin64.evt outfileroot=rsl_allpix_xlarge_splitcomb resolist="0,1,2" \
regionfile=ALLPIX arfinfile=rsl_allpix_xlarge_bin64.arf whichrmf=X outrsp=yes splitrmf=yes elcbinfac=64 combps=yes \
splitcomb=yes eminin=0 dein=0.5 nchanin=60000
September 8, 2025