EP-FXT Science Data Center / Users Guide v2.0 · 2026-11-04

FXTSoft v2.0 documentation

fxtrmfmerge help

Command help for fxtrmfmerge in the FXTSoft v2.0 release.

← Back to Command Reference

NAME

fxtrmfmerge -- Merge multiple EP/FXT RMF response files

USAGE

fxtrmfmerge specfiles=@pha.lst outfile=merged.rmf
fxtrmfmerge inputmode=spec specfiles=@pha.lst outfile=merged.rmf weightmode=equal
fxtrmfmerge inputmode=spec specfiles=@pha.lst outfile=merged.rmf weightmode=coverage
fxtrmfmerge inputmode=rmf rmffiles=@rmf.lst outfile=merged.rmf weightmode=weights weights=@wgt.lst
fxtrmfmerge inputmode=rmf rmffiles=@rmf.lst arffiles=@arf.lst exposures=@exp.lst outfile=merged.rmf weightmode=arf_exposure

DESCRIPTION

fxtrmfmerge combines compatible EP/FXT RMF files using scalar weights, or energy-dependent ARF-times-exposure weights in weightmode=arf_exposure. In inputmode=spec, the task uses each PHA spectrum observation time and detector information to resolve the corresponding CALDB RMF with the same rules used by fxtrmfgen. In inputmode=rmf, the task merges explicitly supplied RMF files. MATRIX and EBOUNDS energy columns are normalized to keV (missing units default to keV). The input channel grid, finite non-negative MATRIX values, sparse group spans, and DETCHANS consistency are validated before an OGIP-classified, checksummed RMF is published atomically. CALDB-selected MATRIX extension numbers are retained.

Scalar modes (exposure, coverage, equal, and weights) accept only numerically identical RMFs with positive contribution by default (allow_scalar=no). Different RMFs with positive contribution are rejected; numerically identical responses are preserved exactly, including when zero-weight noncontributors are present. Set allow_scalar=yes only for a diagnostic scalar average: the task warns and stamps the output MATRIX with SCALDIAG=T, and the result is not for science fitting.

PHA lookup prefers absolute SRCGTI/GTI, including a single GTI, over inherited date headers. It checks CALDB validity boundaries, exact GRADE selections and the selected CAL_XNO. Each input PHA must resolve to one numerical RMF; a PHA spanning different RMFs must first be split into the corresponding observation/calibration intervals.

For science stacking with different RMFs and ARFs, use weightmode=arf_exposure. At energy E its weights are t_i*A_i(E)/sum_j(t_j*A_j(E)); pair the result with the matching exposure-weighted ARF, using the same inputs and exposures. This per-observation ARF path is unchanged by allow_scalar. Scalar weighting alone is not generally equivalent. Alternatively, fxtsrcproducts combines the full ARF*RMF responses and records the resulting RSP in the PHA. Its science PHA continues to reference that full RSP; any scalar merged RMF is only a diagnostic sidecar and does not replace the full response.

PARAMETER SUMMARY

ParameterDefault / valuesSummary
inputmodespecInput mode: spec or rmf
specfilesrequired for inputmode=specInput spectrum files, comma-separated or @listfile
rmffilesrequired for inputmode=rmfInput RMF files, comma-separated or @listfile
outfilerequiredOutput merged RMF file
weightmodeexposureWeight mode: exposure, coverage, equal, weights, or arf_exposure
weightsrequired for weightmode=weights unless rmffiles list has two columnsWeights, comma-separated or @listfile
arffilesrequired for weightmode=arf_exposureARF files used by weightmode=arf_exposure
exposuresrequired for weightmode=arf_exposure in inputmode=rmf unless inline weights are suppliedExposure weights used by weightmode=arf_exposure
allow_scalarnoAllow scalar averaging of distinct positive-contribution RMFs for diagnostics only (not for science fitting; yes/no); warns and stamps SCALDIAG=T
caldb_rootNONEOptional CALDB root override
caldb_configNONEOptional CALDB config override
clobberyesOverwrite existing output file (yes/no)
verbose1Logging verbosity: 0=warning/error, 1=normal info, 2=debug
modeqlQuery/learn mode

PARAMETERS

(inputmode=spec) [string]
Input mode: spec to resolve RMFs from PHA files, or rmf to merge explicit RMF files.

specfiles [string]
Input PHA spectra, comma-separated or provided through an @listfile. Required when inputmode=spec.

rmffiles [string]
Input RMF files, comma-separated or provided through an @listfile. Required when inputmode=rmf. For weightmode=weights, an @listfile may contain two columns: file name and weight.

outfile [file name]
Name of the merged RMF output file.

(weightmode=exposure) [string]
Weighting method: exposure, coverage, equal, weights, or arf_exposure. Exposure and coverage weighting are available in inputmode=spec. Coverage weighting first uses source-valid SRCGTI intervals, then ordinary GTI intervals, then COVERAGE.DT, and finally the PHA EXPOSURE keyword. GTI and COVERAGE.DT units are converted to seconds and overlapping GTI intervals are counted once. Malformed, empty or reversed GTIs are errors, not fallback triggers. arf_exposure weights each RMF by the matching ARF response and exposure list.

(weights=NONE) [string]
Explicit weights, comma-separated or provided through an @listfile. This parameter is required when weightmode=weights unless the rmffiles @listfile contains two columns: file name and weight.

(arffiles=NONE) [string]
ARF files, comma-separated or provided through an @listfile. Required when weightmode=arf_exposure.

(exposures=NONE) [string]
Exposure values, comma-separated or provided through an @listfile. Required when weightmode=arf_exposure in inputmode=rmf unless the RMF list provides inline weights. In inputmode=spec, omitted exposures are read from the input spectra.

(allow_scalar=no) [boolean]
Scalar merge guard. The default no rejects numerically different RMFs with positive contribution in scalar modes (exposure, coverage, equal, and weights). Numerically identical RMFs are preserved exactly, including when zero-weight inputs are noncontributors. Set yes only for a diagnostic scalar average: the task warns and stamps SCALDIAG=T; the output is not for science fitting. This option does not alter weightmode=arf_exposure, which uses per-observation ARFs and exposures. The opt-in must be specified on each invocation; a saved PFILE value of allow_scalar=yes is ignored when the command omits the option.

(caldb_root=NONE) [string]
Optional CALDB root override used when resolving RMFs from spectra.

(caldb_config=NONE) [string]
Optional CALDB configuration override used when resolving RMFs from spectra.

(clobber=yes) [boolean]
Overwrite an existing output file. The output cannot alias any input PHA, RMF or ARF, even with clobber=yes.

CALDB RESPONSE NODES

In inputmode=spec, a matching RMFNODE1 family is materialized for each PHA in a task-owned temporary directory, using the same GTI mean, exact grade scope, validity checks and endpoint HOLD policy as fxtrmfgen. The task neither writes a cache into CALDB nor modifies the input PHA. Missing RMFNODE records retain ordinary MATRIX lookup; malformed or unsupported families fail explicitly.

Response-node materialization does not change the merge weighting rules. For distinct responses used in science fitting, provide each observation's ARF and exposure with weightmode=arf_exposure. A PHA spanning a physical calibration boundary must first be split into valid per-epoch spectra.

EXAMPLES

fxtrmfmerge specfiles=@pha.lst outfile=merged.rmf
fxtrmfmerge inputmode=spec specfiles=@pha.lst outfile=merged.rmf weightmode=equal
fxtrmfmerge inputmode=spec specfiles=@pha.lst outfile=merged.rmf weightmode=coverage
fxtrmfmerge inputmode=rmf rmffiles=@rmf_weights.lst outfile=merged.rmf weightmode=weights
fxtrmfmerge inputmode=rmf rmffiles=@rmf.lst arffiles=@arf.lst exposures=@exp.lst outfile=merged.rmf weightmode=arf_exposure

Manual page updated

2026-11-04