FXTSoft v2.0 documentation
fxtbkgmap help
Command help for fxtbkgmap in the FXTSoft v2.0 release.
NAME
fxtbkgmap — create an FXT instrumental background map from
an fxtbkggen spectrum and a non-vignetted exposure map.
USAGE
fxtbkgmap infile=background.pha expfile=exposure.fits \
outfile=background_map.fits [emin=0.5] [emax=10.0] [bkgimgpixels=AUTO]
fxtbkgmap particle_bkg.pha expo_without_vign.fits particle_bkg_map.fits
DESCRIPTION
The command queries CALDB for the E2PI calibration appropriate to
infile. It maps each energy endpoint through the E2PI rule
ELOW <= energy < EHIGH, then integrates the PHA
COUNTS for the explicit CHANNEL values from the
lower endpoint PI through the channel immediately below the upper endpoint
PI. Thus the requested energy interval is half-open:
[emin, emax).
With the default bkgimgpixels=AUTO, the integrated count rate
is normalized using the BACKSCAL and reference-area metadata
written by fxtbkggen. For a map pixel i, the
normalization is:
map_i = exposure_i * R_band / (BACKSCAL * BKGREF) * (Omega_map / Omega_ref)
BKGREF is the BACKSCAL normalization denominator in reference
pixels; it is area metadata and need not equal the dimensions of the actual
SKY image. BKGPIXA gives the reference pixel area in
BKGUNIT=deg2; Omega_ref is the area of one reference
pixel, equal to BKGPIXA. BKGREF is not a detector solid
angle. The physical normalization area is
BACKSCAL * BKGREF * BKGPIXA. For the standard FXT pixel scale, the
solid-angle ratio is one and this reduces to the corresponding pixel-area
ratio. The exposure map continues to encode the spatially varying exposure.
Do not multiply by a second good-pixel fraction, and do not replace
BKGREF with the dimensions of a cropped output image.
AUTO requires valid BACKSCAL, BKGREF,
BKGPIXA and BKGUNIT metadata,
as well as celestial WCS in the exposure map. The current legacy FXT
20250509 FF spectra are accepted only when they identify EP/FXT, FXTA or
FXTB, FF, and one of the verified BACKSCAL values. These PHAs use
BKGREF=361201 (601^2) as the legacy BACKSCAL
normalization denominator, even though the native SKY image is
600^2, with reference pixel scale
0.002685739662709 degrees; the current effective areas are
142475 pixels for FXTA and 144350 pixels for FXTB.
These are compatibility values for the audited 20250509 templates, not
permanent detector constants. Unknown or incomplete reference metadata stops
AUTO with an error. Supply a positive numeric bkgimgpixels to use
the explicit legacy normalization.
Exposure values are converted from their BUNIT time unit to
seconds (for example, s, ks, ms or d). An explicit unit with a different
dimension, such as an area-weighted exposure, is rejected. Legacy maps without
BUNIT retain the seconds convention, with that assumption recorded
in HISTORY.
The output is a float32 FITS image with copied image/WCS metadata,
provenance keywords, FITS checksums, and BUNIT=count. It records
the resolved mode and normalization in BKGAMODE,
BKGASRC, BKGBSCL, BKGREF,
BKGPIXA, BKGUNIT, BKGPXRAT, and the
numeric final BKGPIX. A filename that does
not contain without_vign produces a warning, but processing
continues so explicitly named non-vignetted files remain usable.
PARAMETERS
The first three parameters are query parameters and may also be supplied
positionally. Hidden values omitted from the command line are read from the
active HEASoft fxtbkgmap.par; explicit name=value
arguments take precedence. A previously learned numeric pfile value such as
144400 remains an explicit-area run; use
bkgimgpixels=AUTO to override it and enable BACKSCAL-based
normalization. The run log records EXPLICIT or AUTO.
PARAMETER SUMMARY
| Parameter | Default / values | Summary |
|---|---|---|
infile | required | Instrumental background spectrum produced by fxtbkggen. |
expfile | required | Non-vignetted exposure map whose image and WCS define the output. |
outfile | required | Output instrumental background map. |
emin | 0.5 | Lower energy endpoint in keV; included in the selected band. |
emax | 10.0 | Upper energy endpoint in keV; excluded from the selected band. |
bkgimgpixels | AUTO | Use spectrum BACKSCAL and reference metadata; a positive number retains explicit legacy normalization. |
clobber | yes | Overwrite an existing output when set to yes. |
verbose | 1 (0–2) | Logging verbosity. |
mode | ql | HEASoft query/learn mode. |
ENERGY SELECTION
The default band is [0.5, 10.0) keV. PI bounds are not
hard-coded: both endpoints are looked up in the input-specific E2PI table.
If an endpoint is outside the table, matches more than one row, or a selected
PI value is absent from the spectrum, the command stops with an error.
EXAMPLES
Create the default 0.5–10.0 keV background map:
fxtbkgmap infile=particle_bkg.pha \
expfile=fxt_a_001-without_vign.expo \
outfile=particle_bkg_map.fits
Create a custom 0.3–7.0 keV map; both endpoints are looked up in E2PI:
fxtbkgmap particle_bkg.pha fxt_a_001-without_vign.expo \
particle_bkg_03_70.fits emin=0.3 emax=7.0
Use an explicit legacy reference area only when processing a spectrum whose reference metadata cannot be used:
fxtbkgmap infile=legacy_particle_bkg.pha \
expfile=fxt_a_001-without_vign.expo \
outfile=legacy_particle_bkg_map.fits bkgimgpixels=144400
EXIT STATUS
Exit status 0 indicates success, 2 indicates a parameter error, and 1 indicates a CALDB, FITS, or data-processing error. Runtime errors are reported as concise messages without a Python traceback.
SEE ALSO
fxtbkggen, fxte2pi,
fxtobsmerge
Manual page updated
2026-11-04