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

FXTSoft v2.0 documentation

fxtrmfgen help

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

← Back to Command Reference

NAME

fxtrmfgen -- Generate an RMF for an input FXT spectrum.

USAGE

fxtrmfgen specfile=source.pha outfile=source.rmf
fxtrmfgen specfile=source.pha outfile=source.rmf rmfmode=nodes
fxtrmfgen source.pha source.rmf

DESCRIPTION

fxtrmfgen generates an OGIP-style response matrix file for EP-FXT spectral analysis. The response matrix maps photon energy to detector channel and is used by XSPEC together with an ARF.

When the input PHA is writable, its SPECTRUM header receives a relative RESPFILE reference to the generated RMF. If the PHA cannot be opened for update because it is read-only, fxtrmfgen emits a warning, leaves the PHA unchanged, and continues to generate the complete RMF and its provenance/checksum metadata. Other input/output errors are reported normally.

CALDB RESPONSE NODES

rmfmode=quarterly is the default. When a compatible RMFNODE family is available, a matching certified quarterly MATRIX is copied exactly when all GTIs select one CALDB path/extension. A quarter is certified only by QMODEL=RMFQ1, a matching QSRCSHA descriptor hash, a recognized QSTAGE, a finite QSAMPMJD, and a physical RMFVMIN/RMFVMAX domain matching that descriptor. If every selected MATRIX lacks quarterly certification, the declared RMFNODE method is used with fallback reason QUARTERLY_UNAVAILABLE. If certified GTIs select multiple CALDB path/extension pairs, the declared RMFNODE method is used with reason CROSS_INTERVAL. Legacy CALDBs without a matching RMFNODE family continue through the traditional MATRIX path. Unknown or inconsistent quarterly certification is an error and never falls back silently.

rmfmode=nodes explicitly requires a matching, physically compatible RMFNODE family and applies its declared EVALMETH method. The output MATRIX records requested mode, actual mode, and fallback reason in RMFREQ, RMFMODE, and RMFWHY. Split spectra at the FXTB heating boundary before generating responses.

A matching CAL_CNAM=RMFNODE record selects a versioned RMFNODE1 FITS descriptor. Its grade range must exactly match the requested range; a G0:12 family is not used for G0 or G0:4 spectra.

The descriptor's EVALMETH selects the time aggregation contract. GTI_EXPOSURE_WEIGHTED_MEAN preserves the historical response evaluated once at the exposure-weighted GTI mean MJD(TT). This contract does not integrate responses across interpolation intervals.

GTI_EXPOSURE_WEIGHTED_INTEGRAL integrates the piecewise-linear node coefficients over every validated source GTI, with elapsed TT seconds as exposure weights. GTIs are split at node times and endpoint-hold boundaries; gaps contribute no exposure. The rule applies to single-observation and merged spectra alike. Each active node matrix is materialized once for aggregation. A single-node constant family remains constant over its declared validity domain.

Integral descriptors support TIMESYS=TT, TAI, TCG, and UTC. UTC intervals are also split at UTC midnight, including leap-second days, to retain the descriptor's linear MJD coordinate and physical elapsed exposure. Non-affine integral descriptor scales such as TDB, TCB, or UT1 fail explicitly; no numerical time-coordinate approximation is substituted. Historical MEAN time-scale support is unchanged.

Within physical validity, ENDPOL=HOLD holds the nearest endpoint outside node support rather than extrapolating a time slope. For INTEGRAL, any positive exposure in a held interval sets RMFCLMP; ENDPOL=ERROR rejects that exposure even when the mean time lies inside node support.

RMFAGGR records the actual software time method, RNDEVAL records the descriptor contract, and WTMODE=NODE_GTI identifies an integral response. RMFTMJD is a diagnostic mean for INTEGRAL, not its evaluation epoch. RMFNGTI, RMFNSEG, RMFEXPOS, and RMFHLDEX record GTI count, integration-piece count, TT exposure, and endpoint-hold exposure in seconds. RMFNDSHA and HISTORY retain the descriptor hash and all contributing node weights. Older MEAN descriptors keep their MEAN behavior; an unknown declared method is an error.

The integral is an exposure average of the intrinsic redistribution. It does not by itself establish full ARF*RMF equivalence when effective area or the source spectrum varies. Use matching per-observation full responses or joint fitting when those differences matter.

The entire GTI span must lie in the selected family's physical validity interval. Split a spectrum spanning the FXTB heating boundary before generating and combining responses. A malformed descriptor, unsupported schema, missing node, hash mismatch or invalid grid is an error. Only the absence of a matching RMFNODE record uses the legacy MATRIX selection described below; it is not a fallback for an invalid declared family.

LEGACY MATRIX TIME, GRADE AND MERGED SPECTRA

Calibration selection uses SRCGTI in preference to GTI, including a single interval. FITS time reference, time scale, column units and TIMEZERO are converted to UTC. Intervals are split at matching CALDB validity boundaries; the selected CAL_XNO is retained. An inherited DATE-OBS does not override valid GTIs. Empty, malformed or overlapping GTIs are errors. Merged spectra marked MERGED or ASPREQ require absolute GTIs. Only legacy unmerged files without an absolute GTI may fall back to validated UTC DATE-OBS/DATE-END, with a warning.

GRADE declarations must describe exactly 0 (also 0:0), 0:4, or 0:12. Equivalent explicit comma-separated sets are accepted. Partial sets such as 1:4, malformed values and conflicting declarations fail instead of silently selecting another grade. When no GRADE declaration exists, the legacy default is 0:12.

When all intervals resolve to the same numerical redistribution and energy/channel grid, the response is copied exactly. Genuinely different RMFs cannot be combined safely from a PHA alone: scalar GTI weights omit the energy-dependent ARF weights. Such inputs now fail before changing the RMF or PHA. Use per-observation products with fxtsrcproducts to combine full ARF*RMF responses, or fxtrmfmerge weightmode=arf_exposure with matching per-observation ARFs, RMFs and exposures. A single ARF computed from the merged observation does not supply these missing per-observation weights. For a single observation proven by one non-empty OBS_ID/OBSID, with no merge/stack marker or multi-observation count, a different-matrix boundary may use the RMF valid at the earliest GTI start when the complete endpoint span (including GTI gaps) is at most 10 days. The same rule applies to the validated legacy DATE-OBS/DATE-END fallback. This is a start-response approximation, not an RMF merge; the selected file, start time, candidates, span and threshold are written to the output RMF header and HISTORY. Merged or unidentified spectra, spans over 10 days, and incompatible or otherwise invalid responses remain errors. No region extension is required for RMF selection.

PARAMETER SUMMARY

This table is synchronized with the installed HEASoft parameter file. Mode letters follow the standard PFILES convention.

ParameterTypeModeDefault / rangePurpose
specfilesqrequiredThe input spectrum file
outfilesqrequiredThe output response file
rmfmodeshquarterlyRMF source mode (quarterly/nodes)
clobberbhyesOverwrite existing output file (if outfile!=NONE)?(yes/no)
verboseih1; range 0 .. 2Logging verbosity
modeshqlQuery/learn mode

PARAMETERS

specfile
Input spectrum file. Required. A writable PHA receives a relative RESPFILE link; a read-only PHA is left unchanged after a warning while RMF generation continues.
outfile
Output RMF FITS file. Required.
rmfmode
Requested response mode: quarterly (default) prefers a certified quarterly MATRIX and falls back to the declared RMFNODE method when unavailable or when GTIs cross quarterly intervals; nodes requires and uses a compatible RMFNODE family.
clobber
Overwrite an existing output file. Values: yes or no. Default: yes.
verbose
Logging verbosity: 0=warning/error, 1=normal info, 2=debug. Default: 1.

EXAMPLES

fxtrmfgen specfile=src.pha outfile=src.rmf clobber=yes

SEE ALSO

fxtarfgen, fxtrmfmerge

Manual page updated

2026-11-04