FXTSoft v2.0 documentation
fxtlccorr help
Command help for fxtlccorr in the FXTSoft v2.0 release.
NAME
fxtlccorr -- Correct an FXT source-region light curve with a scaled background light curve.
USAGE
fxtlccorr srcfile=source.lc bkgfile=background.lc outfile=net.lc alpha=0.125 errmethod=input fxtlccorr srcfile=source.lc bkgfile=background.lc outfile=net.lc alpha=AUTO errmethod=auto scaling_manifest=srcproducts/fxtsrcproducts_manifest.json
DESCRIPTION
fxtlccorr requires aligned source and background bins. It converts background RATE and ERROR to the source RATE unit, calculates RATE_out = RATE_src - alpha * RATE_bkg, and propagates errors in quadrature. RATE units must be declared and compatible. alpha is a rate multiplier: with AUTO, the tool uses a unique rate-domain manifest match or BACKSCAL_src / BACKSCAL_bkg. Each RATE already includes its own exposure normalization, so EXPOSURE is not multiplied again.
errmethod=auto (the default) selects the symmetric Gehrels approximation g(N)=1+sqrt(N+0.75) per source/background region only when integer raw COUNTS, per-bin LIVETIME in seconds, CNTSTAT=POISSON, CNTMETH=XSELECT, LCNORM=LIVETIME, and RATE=COUNTS/LIVETIME are all verified. It rejects weighted, background-applied, corrected, or otherwise untrusted provenance for this choice, logs a warning, and falls back to the input ERROR columns when the evidence is incomplete. errmethod=gehrels reports missing or invalid metadata as an error; errmethod=input preserves the original ERROR propagation formula. The Gehrels value is a symmetric approximation, not a strict confidence interval. With alpha=0, only source statistics are required.
Net products set POISSERR=F and record the actual ERRMETH. When source metadata is available, raw columns are replaced by explicit SRC_CNTS/SRC_EXP and BKG_CNTS/BKG_EXP audit columns; source COUNTS/LIVETIME are never relabelled as net counts/exposure. NaN and no-live-time bins remain paired masks, and negative net RATE values are retained.
The strict timing interface requires matching TIME, TIMEDEL, TIMEPIXR and timing metadata. Missing TIMEPIXR means 0.5; equivalent bins encoded with different TIME/TIMEPIXR values are also rejected. Each GTI is interpreted using its own time reference and compared on the RATE time axis. Per-bin GTI support and FRACEXP must agree. Partial FRACEXP without GTI, unequal within-bin support, or finite rates without exposure are rejected. Existing rates cannot recover counts on a smaller GTI intersection: re-extract both event selections on common GTIs. The output retains the source GTI and FRACEXP after these checks; it does not approximate common support using minimum FRACEXP.
Split MJDREFI/MJDREFF references retain their precision during GTI conversion. Support comparison permits floating-point roundoff only: eight double-precision rounding units at the coordinate/offset scale, with a one-day arithmetic floor (about 0.15 ns). This tolerance is not a scientific allowance for different GTIs.
A manifest should supply rate_alpha, or alpha with alpha_domain=rate. Known source-products records containing source/background BACKSCAL values can be migrated by their area ratio; their legacy alpha remains a count-domain quantity. An unmarked external alpha is rejected; an explicit numeric command-line alpha remains a direct RATE multiplier.
PARAMETER SUMMARY
| Parameter | Type | Mode | Default / range | Purpose |
|---|---|---|---|---|
srcfile | s | q | required | Input source-region light curve |
bkgfile | s | q | required | Input background-region light curve |
outfile | s | q | required | Output background-corrected light curve |
alpha | s | h | AUTO | Background rate multiplier; AUTO uses manifest or BACKSCAL ratio |
errmethod | s | h | auto | Error method: auto, input, or gehrels |
scaling_manifest | s | h | NONE | Manifest with matching source/background pair and rate_alpha |
clobber | b | h | yes | Overwrite an existing output file |
verbose | i | h | 1; range 0 .. 2 | Logging verbosity |
mode | s | h | ql | Query/learn mode |
PARAMETERS
- srcfile
- Input source-region light curve.
- bkgfile
- Input background-region light curve with bins and timing metadata compatible with
srcfile. - outfile
- Background-corrected output light curve.
- alpha
- Finite nonnegative background RATE multiplier or
AUTO. - errmethod
autouses trusted XSELECT COUNTS/LIVETIME for the symmetric Gehrels approximation and otherwise warns then uses input ERROR;inputpreserves the original formula;gehrelsrequires trusted metadata.- scaling_manifest
- Manifest containing a matching source/background pair and rate_alpha or an explicit rate-domain alpha.
- clobber
- Overwrite an existing output. Default:
yes. - verbose
- Logging verbosity from 0 to 2. Default:
1. - mode
- HEASoft query/learn mode. Default:
ql.
SEE ALSO
fxtsrcproducts, lcmath
Manual page updated
2026-11-04