NAME
ftmarfrmf -- multiplies/divides a detector redistribution matrix by
an ancillary response dataset or a scalar
USAGE
ftmarfrmf rmffile[ext#] (ebdfile[ext#]) arffile[ext#] outfile (rmfversn)
(qoverride) telescop instrume filter detnam (clobber)
scalar (qdivide) (arfcol)
DESCRIPTION
A detector redistribution matrix (aka response matrix) basically
consists of a 2-dimensional array (detector channel vs incident
photon energy) giving the probability that an incident photon of a
given energy will be detected in a given detector channel. An
ancillary response dataset is a 1-dimensional array as a function
of incident photon energy (containing, for example, the effective
area of the optics, corrections for the spatial point spread
function etc). Provided the input files are in the standard RMF
FITS format, this task multiplies the redistribution array for
each channel (along the incident energy dimension) by the
ancillary response array (ARF). The output is thus a new RMF file
containing the new redistribution matrix.
A detailed description of the RMF file can be found at:
https://heasarc.gsfc.nasa.gov/docs/heasarc/caldb/docs/memos/cal_gen_92_002/cal_gen_92_002.html
In brief, the output file consists of a FITS file with 2 BINTABLE
extensions (both of which have HDUCLAS1 = RESPONSE), containing:
(1) the redistribution matrix (with HDUCLAS2 = RSP_MATRIX)
(2) the nominal energies of the channel boundaries (with HDUCLAS2 = EBOUNDS)
The data contained in Extension (1) above is in a compressed
format whereby only elements for which the value of the
redistribution matrix above a given threshold are stored. This
provides a significant reduction in disk-storage requirements for
sparsely populated matrices. The default threshold is read from the
input file. Users are reminded that the threshold is defined in
absolute units (NOT relative to the value of the maximum value in
the matrix).
PARAMETERS
- rmffile [filename]
- The name of the RMF file containing the input redistribution
matrix. If there are multiple matrix extensions then they will
all be multiplied by the ARF (or scalar value). If the number
of energy bins in the ARF is a multiple of the number of energy
bins in one of the matrix extensions (as will happen for XRISM
Resolve RMFs) then the ARF is binned up to multiply that matrix.
- (ebdfile = '%') [string]
- The name of the file containing the i/p EBOUNDS dataset Since
the EBOUNDS extension corresponding to a given RSP_MATRIX
usually resides in the same file as the RSP_MATRIX, this
parameter is hidden with the default value "ebdfile = %"
indicating that the rmffile will be used.
- arffile [filename]
- The name of the ARF file containing the ancillary spectral
response dataset with which the i/p redistribution matrix
is to be multiplied/divided. If a value of 'NONE', 'none' or '
' is entered the user will be prompted for the scalar value by
which the the i/p redistribution dataset is to be
multiplied/divided.
- outfile [filename]
- The name of the RMF file to be created. For safety, the name
of the output file cannot be the same as one of the input files,
and the task will stop if this is the case. However, the
existing file can be automatically removed, and
the new file written if the output filename is preceeded by "!" at
the outfile prompt.
- (rmfversn) [string]
- The OGIP FITS format version for RMF files in which the output
FITS is to be written. This parameter is obsolete and is
not used.
- (qoverride = no) [boolean]
- Logical indicating whether the user wishes to override the
mission and instrument strings in the input file.
The default is QOVERRIDE=N
- telescop [string]
- The user-supplied string for the telescope name, required if
QOVERRIDE=Y
- instrume [string]
- The user-supplied string for the instrument name, required if
QOVERRIDE=Y
- filter [string]
- The user-supplied string for the name of any moveable filter
in use, required if QOVERRIDE=Y. FILTER=NONE should be used
if on such moveable filter is in use.
- detnam [string]
- The user-supplied string for the sub-instrument name, required
if QOVERRIDE=Y. DETNAM=NONE should be used if the
specification of a sub-instrument is unneccessary.
- (clobber = false) [boolean]
- Flag specifying whether or not a pre-existing file with the
same name as that requested as the output file from this task
will be overwritten.
- scalar [real]
- Scalar value by which the RSP_MATRIX dataset is divided or
multiplied. This parameter is only used when arffile = 'NONE',
'none' or ' ' is entered.
- (qdivide = no) [boolean]
- Flag to indicate whether the RSP_MATRIX dataset is DIVIDED
(qdivide = yes) or MULTIPLIED (qdivide = no) by the SPECRESP
dataset/scalar.
- (arfcol = 'SPECRESP') [string]
- The column name to use to read the ARF data. SPECRESP is the
standard but this parameter allows another column to be read
if necessary.
EXAMPLES
ftmarfrmf test.rmf test.arf test.rsp
LAST MODIFIED
February 2025