FXTSoft v2.0 documentation
fxtarfgen help
Command help for fxtarfgen in the FXTSoft v2.0 release.
NAME
fxtarfgen -- Extract arf file for input spectrum fileUSAGE
aspcor, extend and psfcor accept only
0 or 1. The output path must be non-empty; bare NONE is not an
output-disable option. Invalid values are rejected before ARF generation or
PHA updates.
Keyword values for srcmodel and clobber are
case-insensitive. srcmodel accepts uniform,
gaussian, beta and image;
clobber accepts yes/y/true/1/on or
no/n/false/0/off. An unknown value is an error and is never
silently converted to a point-source or no-overwrite path. srcmap
is required only for srcmodel=image; in a non-interactive run its
absence produces a required-parameter error rather than a raw stdin
EOFError.
fxtarfgen specfile=source.pha expfile=expo-without_vign.fits outfile=uniform.arf extend=1 srcmodel=uniform fxtarfgen specfile=source.pha expfile=expo-without_vign.fits outfile=gaussian.arf extend=1 srcmodel=gaussian srcsigma=30 fxtarfgen specfile=source.pha expfile=expo-without_vign.fits outfile=beta.arf extend=1 srcmodel=beta srcrc=30 fxtarfgen specfile=source.pha expfile=expo-without_vign.fits outfile=image.arf extend=1 srcmodel=image srcmap=brightness.fits
These are alternative examples, not a sequence to run on one PHA. The widths are illustrative, not instrument defaults or measured source sizes. Use a separate copy of the input PHA for each comparison because its ANCRFILE is updated.
DESCRIPTION
fxtarfgen generates an OGIP style ARF suitable for imaging observations with the EP/FXT.
This ARF characterizes the effective area as a function of energy for a specific observation and instrument setup,
quantified in units of [cm**(2) counts/photon]. In the default mode, aspcor=0, fxtarfgen requires both an exposure file,
and a spectrum file containing detailed header information about the observation.
The output is an ARF that can be employed in spectral analysis software like Xspec. The task attempts to update the input PHA in place: the SPECTRUM header receives an ANCRFILE reference to the generated ARF. If the PHA is read-only, a warning is issued and ARF generation continues without changing the PHA.
When aspcor=1, fxtarfgen uses the cleaned event file and MKF attitude history to compute an
attitude-weighted off-axis angle distribution. In this mode the task uses evtfile and mkffile
instead of the exposure-map input path. Attitude samples or extended-source region pixels outside the detector
footprint, outside the 45 arcmin field of view, or on BADPIX detector pixels contribute zero effective area; if
the source is never visible, the task stops without writing a normal ARF.
With extend=0 psfcor=1, the point-source PSF is integrated
against the live source-region mask for each attitude sample. Detector losses
are not approximated by multiplying a complete-region EEF by the visible area
fraction. Fully invisible samples contribute zero response and retain their
time in the normalization. The existing area-visibility approximation remains
for psfcor=0, which does not provide PSF-weighted detector-loss or
aperture corrections.
Point-source PSF correction is not restricted to pile-up excision. It also accounts for the modeled photons lost outside a finite aperture or in an excluded subregion, and for exposure losses within the retained region. Use the same inclusion/exclusion region as the spectrum and the true source center. This corrects the response; it does not restore event counts or repair residual pile-up.
For psfcor=1, the region inclusion/exclusion predicate and
the PSF are evaluated at the same subpixel coordinates. This avoids treating
the retained part of a boundary pixel as a uniformly diluted full pixel,
which can bias an annulus or a small excluded region close to a point source.
Exposure and per-attitude detector availability still weight the parent image
pixel. The tabulated legacy EEF uses its calibrated annular-area model.
Numerical aperture integration evaluates the selected CALDB PSF.
For point sources, srcx and srcy are an optional
paired override in the original 1-based FXT SKY/physical coordinate system.
When both are positive, that position is used for vignetting, theta and PSF
aperture integration in both static and attitude-weighted modes. A single
coordinate, zero, a negative value other than the paired -1,-1
sentinel, or a non-finite value is rejected. When they remain at
-1,-1, resp_pos selects the automatic point-source
position: region (default), centroid, or
max. Circles, ellipses, boxes and annuli use their defined center;
polygons use the arithmetic mean of their vertices, ignoring one repeated
closing vertex. centroid uses the non-negative counts in the
selected aperture and max uses its brightest pixel. These automatic
positions are response-location estimates, not a guarantee of the true source
position; use the explicit pair for an offset, crowded-field or excised-core
source.
The count-based methods require a two-dimensional PHA counts image and
positive counts inside the same inclusion/exclusion mask; otherwise the task
reports an error. Non-finite and negative image values are ignored. Equal
maxima use the first pixel in row-major order. To return from a learned manual
position to automatic positioning, supply both srcx=-1 srcy=-1:
fxtarfgen specfile=src.pha expfile=novign.expo outfile=src.arf psfcor=1 srcx=310 srcy=310 fxtarfgen specfile=src.pha expfile=novign.expo outfile=src.arf psfcor=1 srcx=-1 srcy=-1 resp_pos=region fxtarfgen specfile=src.pha expfile=novign.expo outfile=src.arf psfcor=1 srcx=-1 srcy=-1 resp_pos=centroid fxtarfgen specfile=src.pha expfile=novign.expo outfile=src.arf psfcor=1 srcx=-1 srcy=-1 resp_pos=max
Within one run, unchanged EEF calibration tables and matching aperture
integrals are reused. Both PSF models share the near-axis beta branch below
3 arcmin; the selected far-axis branch begins at 3 arcmin. Vignetting, live
pixels and time-dependent factors remain evaluated on their original attitude
samples, including when thetabin<=0.
When a response energy is below the first node of the selected CALDB vignetting table, the vignetting factor is held at that first node. This is a constant endpoint boundary; requests above the final node likewise use that final node, without extrapolation; it does not change the energy at which other ARF factors are evaluated.
Large point-source apertures use compact active-pixel and sparse annular caches. Resource limits are checked before large allocations; exceeding the image-grid, subpixel or attitude-matrix budget raises an error instead of silently downsampling the region or losing attitude samples. Use a coarser PHA image grid, or divide long GTI selections when the error requests it. Recheck numerical convergence when changing the image grid.
In ordinary exposure-map mode, point-source PSF weights include the
no-vignetting exposure divided by the spectrum's EXPOSURE.
For a uniform extended source the response factor is
sum(region_fraction * exposure * vignetting) /
(SPECTRUM_EXPOSURE * sum(region_fraction)).
Zero-exposure pixels and aperture pixels outside the exposure-map footprint
remain in the denominator. Exposure is area-reprojected onto the complete
source-region grid in the PHA WCS, including fractional pixel footprints and
region bounds beyond every edge of the cropped WMAP, including its left and
bottom edges. Cropping the WMAP with an equivalent WCS does not change the
aperture or its flux normalization. This applies to the uniform, Gaussian,
beta and image models and to attitude integration. It is not normalized to the
largest value inside the selected region. Use a map for the same GTI selection
as the spectrum. Exposure-map mode remains a static attitude approximation;
use aspcor=1 for time-varying pointing or detector coverage.
Maps marked VIGNAPP=T are rejected wherever their exposure weights
are used. An explicit BUNIT may be time or effective-area multiplied
by time. For area-time maps, AREAFAC (in cm2) or the legacy
fxtexpogen HISTORY area_scale must provide the positive
scalar used to make the map; fxtarfgen divides by it before weighting.
Without that scale, the absolute exposure fraction cannot be recovered and the
map is rejected. Absent units retain the legacy assumption of seconds with a warning.
Merged products are identified by MERGED=T or
ASPREQ=T in the spectrum, exposure map, or supplied event headers.
They always use attitude weighting, even if aspcor=0 was supplied.
The task resolves the RESPCTX sidecar (or explicit
respctx=), validates its merged-event/atom mapping and recorded
checksums, and builds a temporary normalized MKF from the atom files.
An explicitly supplied MKF must match that context telemetry; time coverage
alone does not prove that it contains the correct attitudes.
It does not infer provenance from filenames. Missing context, missing atom
files, incompatible time references, or incomplete MKF coverage of a GTI stop
the task. Merged products without a usable context must be regenerated
with fxtobsmerge or supplied a validated matching context.
MKF attitudes are interpolated with quaternions at the midpoint of each
actual GTI/MKF overlap. Each GTI uses its applicable BADPIX mask and FF/PW/TM
readout window, sharing the detector-window boundaries used by
fxtexpogen. CALDB dates use the same effective time reference as
the attitude samples, including inherited PRIMARY time cards. Time-dependent
ARF factors, vignetting and point-source EEF are multiplied on the same sample
axis before weighting; their separate averages are not multiplied together.
Aspect clustering and theta binning retain this time-factor association.
The merged ATOM_GTI extension preserves native GTI boundaries,
including adjacent observations which the container GTI joins. Context
products can reconstruct these boundaries from the native event files.
Simultaneously overlapping independent atoms are rejected: compute and combine
per-atom responses because a union GTI cannot encode their exposure multiplicity.
Sky positions and extended-region samples use the actual event/PHA celestial
WCS; a cropped, binned or mosaic image is not assumed to have origin 300.5.
For attitude-weighted runs, RA, Dec and roll are recovered from the complete spacecraft rotation using the same roll sign as the FXT quaternion encoder. The correction includes nonzero roll and pointing near a celestial pole.
FITS REGION components use intersection within each COMPONENT and union
between components, with negated shapes applied inside their component.
Legacy tables without COMPONENT and DS9 inclusion/exclusion selections retain
their include-union minus excluded-area semantics. Boolean selections are
combined at subpixel resolution before fractional pixel coverage is computed.
DS9 image and physical coordinates are distinct.
Malformed, unsupported or valid-but-empty source selections are errors, not
requests to use a full field or a simple circular substitute. A genuinely
absent region remains a full-field input. Static extended-source ARFs require
a celestial exposure-map WCS and reject VIGNAPP=T maps to avoid
double vignetting.
FK5/ICRS ellipse and box angles respect the handedness of a supported axis-aligned celestial WCS. Rotated, sheared or non-uniform transforms that cannot be represented safely by the current shape rows are rejected with a request for an equivalent image/physical region. Sky circles/annuli also require a locally conformal, uniformly scaled transform; pure rotation does not by itself invalidate a circle.
An explicit regfile replaces both embedded REGION tables and
embedded REGION text. Without an explicit file, independent polygon text can
be combined with the structured table. An annulus with zero inner radius is
valid and has no central hole. Physical-region rasterization preserves signed,
independent CDELT1P/CDELT2P scales; unsupported physical CD/PC/CROTA
transforms are rejected rather than reduced to a mean radius. PSF/EEF work
requires conformal image pixels. The angular pixel scale is read from the full
celestial CD/PC/CDELT WCS and its units; tabulated EEF radii are converted from
native 9.6687-arcsec pixels to the PHA image scale. GTI START and STOP column
units are interpreted independently, including in merged ATOM_GTI.
Headerless CIAO/DS9 region files
regfile accepts the supported CIAO/DS9 text convention in which
the file begins directly with a shape and has no fk5,
icrs, image, or physical directive.
Coordinate interpretation is inferred independently for each shape: a position
containing sexagesimal colons or explicit h/d position
units is treated as celestial FK5/J2000 by default. The task logs this inference
and applies the same strict parser used for an explicit fk5
directive. Add fk5 or icrs when the frame matters; an
explicit directive takes precedence for the rows in its scope and is never
overridden by inference.
Plain numeric positions keep the physical-coordinate default. The parser
never infers sky coordinates from numeric ranges or from an angular radius
alone. For an inferred celestial circle, annulus,
ellipse, or box, every size or axis must carry an
explicit angular unit such as d, ' (arcmin), or
"/'' (arcsec); a bare size is rejected to avoid interpreting CIAO
pixel-radius syntax as degrees. Mixing pixel and sky position tokens in one
shape is an error. Signed exclusions, including a headerless
-circle(...), are preserved.
For an inferred POLYGON, every coordinate pair must carry a sky
marker such as a colon or explicit h/d unit. A polygon
whose pairs are all unmarked keeps the physical default; mixing marked and
unmarked pairs is rejected.
polygon(20:56:11.574,+32:18:09.77,20:54:41.578,+32:23:27.48,20:54:39.195,+32:21:47.05,20:55:58.460,+32:04:54.73) -circle(20:55:24.997,+32:13:31.21,0.48426')
This is a compatibility subset of CIAO/DS9 syntax, not a general CIAO region-language implementation; use only the supported shapes and boolean forms documented here. The upstream CIAO region convention is described in dmregions.
The necessary calibration data for fxtarfgen, such as detector quantum efficiencies (QE), mirror effective areas,
and the identification of defective pixels, are accessed through the CALDB.
fxtarfgen uses the matching CALDB effective-area and detector-QE data for the selected response calculation. Static exposure-map and aspect-sampled calculations represent pointing changes differently, as described below. The independent time-factor correction is controlled by arfcorr and is limited to the configurations and dates covered by its calibration.
When neither psfmodel nor psfcor is supplied,
fxtarfgen defaults to psfmodel=dual-beta and
psfcor=1 for point-like sources (extend=0).
An explicitly supplied psfcor takes precedence;
for example, psfmodel=dual-beta psfcor=0 selects the model but disables
the correction. A saved user PFILES psfcor value applies when neither
psfmodel nor psfcor is supplied on the command line.
As before, an explicit psfmodel enables the correction unless
psfcor is also supplied. PSF correction remains disabled for extend=1.
The exposure-map path (aspcor=0) with point-source PSF correction
requires a no-vignetting map (VIGNAPP=False).
When PSF correction is enabled for a point-like source, the selected model controls the off-axis correction path:
legacy: use the establishedfxtarfgenbehavior: the CALDB beta model inside 3 arcmin and the tabulated CALDB EEF curves at larger off-axis angles.dual-beta: use the indexed CALDB beta model inside 3 arcmin and the indexed CALDB off-axis betaTHETAextensions at larger angles. Both files are selected for the spectrumDATE-OBS. Missing, invalid, or unreadable CIF entries stop the task; no fixed-name beta or fitted-EEF fallback is used.
EXTENDED-SOURCE SPATIAL MODELS
The source-model interface requires the matching program and parameter file.
srcmodel=uniform is the default uniform-brightness assumption.
The other source models are brightness weights over the extraction aperture and
require extend=1. Each model supplies one energy-independent spatial
template: gaussian uses
exp(-r**2/(2*srcsigma**2)), beta uses the fixed
[1+(r/srcrc)**2]**(-1.5) profile (beta=2/3), and
image uses a supplied source map. The analytic profiles are truncated at
srccut times srcsigma or srcrc; the default is
5 and all widths and cutoffs are in the units stated below. Brightness is normalized
within the extraction aperture, including pixels with zero exposure in the source
denominator. For gaussian and beta, two positive
srcx/srcy values override the model center. With both at
-1, a region containing at least one included POLYGON
uses the PHA SPECTRUM RA_PNT/DEC_PNT, transformed
through the PHA celestial/physical WCS to the original 1-based SKY/physical
pixels; this does not assume the cropped image center. When this pointing
default applies, missing or invalid PHA RA_PNT/DEC_PNT
produce a clear request for both positive manual values. Manual values override
the model-center choice but do not waive other observation metadata required by
ARF generation.
Regions without an included polygon retain the region-center rule, and an
exclusion-only polygon does not trigger the pointing default. The observation
pointing is a coordinate default, not an automatically measured brightness peak.
The uniform default is unchanged, and an image model
uses the source map's celestial WCS. Analytic profiles are sampled at the
spectrum image pixel centers, weighted by pixel solid angle and fractional
region coverage, so the spectrum image grid should resolve the profile.
Image maps are reprojected onto that grid using pixel overlap areas, with no
5000-pixel sampling limit. Uniform extended-source aspect integration also
retains every selected pixel and processes them in memory-bounded chunks;
there is no fixed-stride spatial subsampling. Reprojection between different grids requires
reproject>=0.20, which includes the upstream small-polygon accuracy
fix; backends below this minimum version are rejected when exact reprojection is needed. The exact
path preserves the complete source-map WCS, including SIP polynomial
distortion. FITS lookup-table distortion (CPDIS/D2IM)
and -TAB coordinates cannot be carried safely through this input
contract and are rejected explicitly instead of being silently treated as an
undistorted TAN image.
Sampling-resolution note.
Analytic gaussian and beta profiles are evaluated on
the PHA image grid. Before sampling, the task computes the selected region's
maximum PHA pixel angular width from the celestial WCS and rejects an analytic
model when either its scale (srcsigma or srcrc) or its
cutoff radius (scale*srccut) is less than twice that width. There
is no automatic fine resampling and no general 1% or 0.1% accuracy guarantee.
The check does not apply to uniform or image. On the
native FXT grid (about 9.67 arcsec per pixel), 30--120 arcsec scales with
srccut=5 or 8 follow the existing sampling path. A coarser PHA image
requires a correspondingly larger scale; use a finer PHA image when rejected.
For aspcor=0, a nonuniform extended model requires an exposure map made
without vignetting correction and carrying VIGNAPP=F (for example, the
expo-without_vign.fits companion from fxtexpogen), because
fxtarfgen applies the vignetting model itself. All source models use
exposure divided by the PHA SPECTRUM EXPOSURE, not the map maximum, so absolute
exposure losses remain in the ARF. Integer-map roundoff above unity is logged
and clipped for non-uniform models only up to 0.1%; larger excesses fail.
An image map is relative source brightness in flux
PER PIXEL, must have a celestial WCS, and must contain finite nonnegative pixels;
invalid values fail the task rather than being clipped. Pixels outside the map have
zero brightness. The task does not generate a source map automatically and does not
perform PSF or EEF deconvolution for an extended source. An eSASS spatial-model
reference is a brightness-weighting reference, not a full telescope-ARF equivalence.
Prepare source and background spectra or images with matching GTIs and detector masks;
srcmap contains source brightness only and is not a background map.
What do srcsigma and srcrc mean?
Both parameters describe the source brightness distribution on the sky in
arcseconds. They are not detector pixels, extraction-region radii, PSF
calibration parameters, or image-smoothing settings. The example value 30 is
illustrative; it is not a fitted value for a particular observation.
fxtarfgen uses the supplied model and does not fit its width to the data.
There is no universal 30- or 60-arcsec source size. The parameter-file values
srcsigma=0 and srcrc=0 represent unset scales, not usable
model widths: selecting Gaussian or beta requires an explicit finite positive
value. The default model is uniform.
The amplitude S0 cancels when the brightness weights are
normalized over the aperture, so no source-flux amplitude parameter is needed.
- Gaussian:
srcsigma=30. The standard deviation is 30 arcsec in the circular profileS(r)=S0*exp(-0.5*(r/30)**2). At a radius of 30 arcsec the surface brightness is about 60.65% of its central value. The full width at half maximum isFWHM=2.35482*srcsigma, so this example has FWHM about 70.6 arcsec. FWHM is a full width across the source, not the radius of the half-maximum contour. - Beta:
srcrc=30. The core radiusrcis 30 arcsec inS(r)=S0*[1+(r/rc)**2]**(-1.5). The beta index is fixed at 2/3; there is no separate beta-index input. Atr=rcthe surface brightness is about 35.36% of its central value. The same numeric value forsrcrcandsrcsigmatherefore describes different profiles; beta also has a more extended outer tail.
Choosing a model and configuring its parameters
- uniform: assume approximately constant brightness over the selected aperture. With limited information this is an explicit approximation, not a measurement of uniform emission.
- gaussian: use when a circular single-peaked Gaussian describes the source morphology over the relevant aperture.
- beta: use when a circular core and outer tail are adequately represented by the fixed beta=2/3 profile; a cluster need not satisfy that assumption.
- image: use a suitable source template for asymmetric, multi-peaked or otherwise poorly represented morphology.
- Use the extraction aperture of the input spectrum. Reuse the DS9
region with
regfile=source.reg, or use the matching embedded FITS REGION. Changing the ARF region does not re-extract the input PHA. - Set the brightness center. For a Gaussian or beta model, supply both
srcxandsrcyas positive FITS 1-based coordinates in the original FXT SKY/physical pixel system to override the default. With both at-1, a region with an includedPOLYGONuses the PHA SPECTRUMRA_PNT/DEC_PNTconverted through the PHA celestial/physical WCS; it does not use the cropped image center. A region without an included polygon keeps the region-derived center, while an exclusion-only polygon does not trigger the pointing default. Missing or invalid pointing coordinates stop automatic center selection with a request for manual values. Manual values override the model-center choice but do not waive other observation metadata required by ARF generation. The pointing center is a coordinate default, not an automatically measured brightness peak. An image model uses its own WCS. - Estimate the shape scale from the source morphology. For a Gaussian
fit that reports FWHM in arcsec, set
srcsigma=FWHM/2.35482; for example, FWHM=120 arcsec givessrcsigma=50.9593. For beta, fit the same fixed-beta profile to the radial surface-brightness distribution and use its core radius assrcrc. Convert a size measured in image pixels with that image's actual WCS scale before passing it to either parameter. Account for background, exposure, vignetting and PSF blurring when estimating source morphology. Prefer fitting the observed counts with these effects included in the image model; the fitted intrinsic width is not the width of the blurred counts image. A core radius obtained with a different free beta index is not interchangeable withsrcrc. The ARF task does not remove these effects from a counts image. - Choose the cutoff explicitly when needed.
r_cut=srccut*srcsigmafor Gaussian andr_cut=srccut*srcrcfor beta.srccutis a dimensionless multiple, not an angle. With width 30 arcsec and the defaultsrccut=5, both profiles are zero beyond 150 arcsec. The extraction region remains a separate selection. If modeled emission should cover a region extending to 300 arcsec from the center, use a cutoff reaching at least that distance, for examplesrcrc=30 srccut=10. Include the farthest vertices when checking an irregular region. The cutoff has a larger effect on the extended beta tail; increase it until the intended aperture is covered and check ARF sensitivity to the assumed morphology. - Use an image for morphology not represented by a circular profile.
Supply a finite, nonnegative relative source-flux-per-pixel FITS image with
celestial WCS. The filename
brightness.fitshas no special meaning; animage.fitsis suitable only if its pixel values have the required meaning. Raw source-plus-background counts are not automatically corrected source brightness. Multiplying every map pixel by the same positive constant does not change the normalized spatial weights. A fitted nonnegative source model is preferable to clipping noisy negative background-subtracted pixels to zero. Bad-pixel or zero-exposure holes do not establish zero intrinsic brightness: model the source there where constrained, and record the uncertainty. Supply map coverage wherever the source model should contribute inside the aperture.
For polygonal apertures or apertures with excluded regions, the model remains
defined on the sky while the region selects which parts enter the ARF.
The task retains fractional boundary pixels and normalizes within the selected
aperture. Do not replace an irregular extraction region with a circle of the
same area. Use srcmodel=uniform when retaining the historical
uniform assumption; inactive Gaussian, beta and map settings are ignored.
Illustrative setup and morphology sensitivity
Suppose an imaging fit gives an intrinsic Gaussian FWHM of 120 arcsec, and the
PHA was extracted from source.reg, a 300-arcsec-radius circle centered
on that source. Then srcsigma=50.9593. With srccut=8 the
model cutoff is about 407.7 arcsec, outside this aperture:
cp source.pha source-gaussian.pha
fxtarfgen specfile=source-gaussian.pha outfile=source-gaussian.arf \
expfile=expo-without_vign.fits regfile=source.reg \
extend=1 psfcor=0 aspcor=0 srcmodel=gaussian \
srcsigma=50.9593 srccut=8
If source.reg instead contains an included POLYGON,
the same Gaussian command with both center parameters left at -1
uses the PHA pointing center from RA_PNT/DEC_PNT after
PHA WCS conversion. To override it with the measured or modeled center, append,
for example, srcx=280.5 srcy=310.5; these are illustrative original
FITS 1-based SKY/physical pixels and must be replaced with the actual center.
For a separately justified beta model, srcrc=60 srccut=8 means a
480-arcsec model cutoff, not a 60- or 480-arcsec extraction aperture. Neither
example is a fitted A1795 result. The default srccut=5 is not a
guarantee that all emission has been included, especially for a beta tail.
The exposure file above is the time-exposure product without vignetting,
with VIGNAPP=F, for the same GTIs as the PHA. This is distinct from
correcting for vignetting while estimating a source-brightness template. A raw
counts/exposure image can still contain background and PSF blurring and is not
automatically an intrinsic source model. For merged products use their validated
response context and atom inputs; attitude weighting is forced as described above.
Recompute ARFs at the best-fit scale and at scales allowed by the imaging uncertainty, or with other defensible source templates. Keep the extraction region, GTIs and calibration settings fixed, give every trial its own PHA copy and output ARF, and inspect both the ARF ratios in the fitted energy band and the resulting spectral parameters. Assess the differences against the precision required by the analysis; there is no universal percentage threshold. A successful run establishes that the inputs are usable, not that the assumed morphology is correct. Retain the fit or template provenance, uncertainty range and comparison results with the science products.
Aperture normalization and PSF limits
With extend=1, PSF correction is disabled. Gaussian, beta and image
are brightness weights, not extended-source PSF convolution kernels. The output
uses SRCNORM=APERTURE for nonuniform models and is normalized within
the selected aperture, including its inclusion/exclusion selection. It does not
extrapolate the total source flux into excluded subregions or outside the aperture,
and does not model photons scattered across those boundaries by the PSF. Changing
srcsigma or srcrc is not a replacement for either correction.
A compact extended source, a small hole in a bright core, or narrow annuli can require PSF mixing that this extended-source path does not supply. A single energy-independent template is also an approximation when the spectrum varies strongly across the source. Evaluate these limitations before interpreting a precise total flux or spatially resolved spectrum.
eROSITA tutorials and further reading
- eSASS DR1 Cookbook,
section 2.10: an introductory extended-source spectrum/ARF/RMF command.
Its
TOPHAT extpars=60example specifies a disk outer radius, not a Gaussian sigma or beta core radius, and is not a universal recommendation. - srctool task manual:
the
exttype,extparsandextmapdefinitions, the extended-source handling discussion, and the compact-source and MAP examples. It distinguishes source extent from the instrumental PSF. - Jeremy Sanders, MPE: eROSITA data analysis of clusters of galaxies: PDF pages 24-30 discuss forward modeling with exposure, PSF and background; page 38 describes source models and the MAP option for bright nearby systems.
These references explain model semantics and analysis choices. They do not make FXT and eROSITA responses interchangeable. In particular, srctool has a compact-source PSF-convolution mode which the current FXT extended-source path does not implement.
PARAMETER SUMMARY
| Parameter | Default / values | Summary |
|---|---|---|
specfile | required | The input spectrum file |
expfile | required when aspcor=0 | The exposure map file |
outfile | required | The output arf file |
aspcor | 0 | Apply attitude weighting (0/1); merged inputs force 1 |
extend | 0 | Extended-source switch: 0 for point-like sources, 1 for extended sources |
srcx | -1 | Point-source x in original 1-based SKY/physical pixels; paired positive srcy overrides automatic response positioning |
srcy | -1 | Point-source y in original 1-based SKY/physical pixels; paired with srcx |
resp_pos | region; centroid or max | Automatic point-source response position when srcx=srcy=-1: shape center/vertex mean, counts centroid, or brightest selected pixel |
psfcor | 1 | Point-source PSF-weighted region and exposure correction; disabled for extend=1 |
psfmodel | dual-beta; legacy also available | PSF correction model; an explicit model enables psfcor unless psfcor is also supplied |
arfcorr | auto; required or none | Time-dependent ARF factor policy: use a matching CALDB factor, require one, or disable the independent query |
evtfile | required when aspcor=1 | The cleaned event file when aspcor=1 |
mkffile | required when aspcor=1 | The MKF attitude file when aspcor=1 |
weight | aspect | Attitude weighting mode: aspect or event |
thetabin | 0.05 | Theta histogram bin width in arcmin; <=0 means no binning |
regfile | Optional DS9/CIAO-style source region file | |
respctx | Merged response context JSON; defaults to FITS RESPCTX | |
clobber | yes | Overwrite existing output file? (yes/no or 1/0; case-insensitive) |
verbose | 1 | Logging verbosity: 0=warning/error, 1=normal info, 2=debug |
mode | ql | Query/learn mode |
srcmodel | uniform | Extended-source brightness model: uniform, gaussian, beta, or image |
srcsigma | 0.0 | Gaussian sigma in arcsec (FWHM/2.35482); positive and finite |
srcrc | 0.0 | Beta core radius rc in arcsec (beta=2/3); positive and finite |
srccut | 5.0 | Cutoff multiple of sigma or rc (not arcsec); positive and finite |
srcmap | Relative source flux-per-pixel image with celestial WCS for srcmodel=image | |
resp_pos | region | Automatic point-source response position: region, centroid, or max |
PARAMETERS
- specfile [file name]
- Name of the input spectrum FITS file. It must be writable because the
SPECTRUMheader is updated withANCRFILE. - expfile [file name]
- Name of exposure FITS file. Required when
aspcor=0. Ignored whenaspcor=1. Merged context-driven input does not require this file, regardless of the requested switch. - outfile [file name]
- Name of output ARF FITS file.
- (aspcor=0) [integer]
- Aspect correction switch. Use 0 for single-observation exposure-map mode, or 1 for attitude weighting. Merged input markers override 0 and require a validated response context.
- (extend=0) [boolean]
- 0 for point like sources, and 1 for extended sources.
- (srcx=-1) [real, SKY pixels]
- Source-center x coordinate in the original FXT SKY/physical pixel system.
Together with
srcy, it sets the point-source position or the center of a Gaussian/beta extended-source model. For these analytic extended models, supply two positive FITS 1-based values to override the default. With both at -1, an includedPOLYGONuses the PHA SPECTRUMRA_PNT/DEC_PNTconverted through the PHA celestial/physical WCS; other region selections retain the region-derived center, and an exclusion-only polygon does not trigger this default. Missing or invalid pointing coordinates require manual values for the model center; other observation metadata required by ARF generation must also be valid. Do not pass RA in degrees or an unconverted cropped-image coordinate. - (srcy=-1) [real, SKY pixels]
- Source-center y coordinate paired with
srcx. The same coordinate-system and default-center rules apply. The pointing center is only a coordinate default, not an automatically measured brightness peak. An image brightness template is located by its celestial WCS rather than shifted to this center. - (resp_pos=region) [string]
- Automatic point-source response position used only when both
srcxandsrcyretain-1. Selectregion(default),centroid, ormax. Circle, ellipse, box and annulus centers are used directly. For an included polygon,regionis the arithmetic mean of its vertices after discarding one duplicate closing vertex.centroidandmaxare computed from non-negative counts inside the selected inclusion/exclusion mask. These coordinates are response estimates; provide the paired positivesrcx/srcyfor the measured source position. - (psfcor=1) [integer]
- Apply PSF correction by default for point-like sources (
extend=0). Setpsfcor=0to disable the correction explicitly. An explicit value overrides the automatic value implied by an explicitly suppliedpsfmodel. This parameter is ignored whenextend=1. - (psfmodel=dual-beta) [string]
- Select
dual-betaorlegacy. A blank value is normalized internally todual-betawithout enabling correction. If either model is explicitly supplied andpsfcoris omitted,psfcor=1is used. Thedual-betamodel uses the observation-time indexed near-axis beta correction and off-axis two-beta path described above. - (arfcorr=auto) [string]
- Choose
autoto apply an exact CALDB ARFCORR factor when one is available,requiredto fail if it is unavailable or out of range, ornoneto disable the independent time-factor lookup. The confirmed factor format isARFCORR1.METHODrecords the calibration recipe rather than restricting selection to a particular source combination. Its nonempty value must agree with the file's CALDB metadata and, when present, the primary header; the actual method is recorded inCORRMETHand HISTORY. Detector, filter, reference-mode, grade, validity and energy-grid checks still apply. FF, PW and TM share the FF reference ARF, grade fractions and time-dependent absorption factor. The observation's readout mode remains unchanged; outputDATAMODErecords it. Calibration products retain their indexedDATAMODE(FF)reference metadata. The confirmed baseline is G0:12 (the original template's G0:4 label was incorrect). For detector A/B, filter 01/02 and FF/PW/TM modes, the indexedGRADECORRfile binds the requested G0, G0:4 or G0:12 selection to that fixed baseline by file, extension and SHA-256. The task reads precomputed dimensionless grade factors; it does not derive grade fractions at runtime. Disabling time correction does not disable grade conversion. Existing grade-specific legacy ARFs are not multiplied by a grade factor again; missing or damaged factors for a G0:12 baseline are fatal. The authoritativePICALVERcard, or the last explicit fxtpical processing record when it is absent, takes precedence over preserved history. Numbered 1.x processing uses T18V1; 2.x and namedfxtpical_<implementation>processing (includingfxtpical_deltae_g13_20261025) use T18V2. Implementation names and date suffixes do not require a whitelist update. PICALVER describes the PI processor, not the CALDB release. An unfamiliar or empty explicit value also uses the current T18V2 selection; the name alone never blocks a response query. CALDB table, grade, validity, energy-grid and bound-baseline checks still apply. Legacy-onlyfxtpical_1.*orCALDB_v1.*provenance retains the historical grade-specific FF response path, also for PW/TM. These legacy monthly ARFs already contain time dependence: withauto, an unmarked legacy base explicitly skips the independent factor and logs the reason;requiredfails. They are never relabeled as uncorrected bases or multiplied by the new factor again. In-scope T18V2 data require an indexed grade factor, even witharfcorr=none. The factor energy grid must exactly equal the static ARF grid. Time factors must be finite and positive; grade factors must be finite in [0,1]. A static SPECRESP must declareARFCORR='NONE'before multiplication. Output headers record the factor version, status, SHA-256 and static base ARF. Static mode records the observation midpoint and interpolation nodes. Aspect mode records the weighted sample epoch andCORRNSMP/CORRNAPP/CORRTMIN/CORRTMAX; its mean factor is diagnostic only. For products declaringVALIDMIN/VALIDMAX, bothauto(default) andrequiredextrapolate beyond the first/last time node using the nearest two nodes' log-factor slope, within the declared physical validity domain andVALIDEND. The task logs the extrapolation and recordsEXTRAPOLATE_FIRST/EXTRAPOLATE_LASTinCORRPOL; aspect mode retainsSAMPLE_WEIGHTEDand records the counts inCORRXFST/CORRXLST. A single-node table declares a constant factor within its domain (CONSTANT). Both modes fail outside the physical domain; FXTB pre/post-heating tables are evaluated independently, with no extrapolation across the heating boundary. No new fit or absorption model is derived by this runtime extrapolation. Legacy products without physical-domain cards retain their historical policy:autoholds the first/last factor outside the nodes. After the inclusiveVALIDENDboundary, the last valid factor is held: at the earlier of the last node andVALIDEND. If the boundary lies between nodes, its log-interpolated value is frozen. The task logs a warning and recordsHOLD_LAST; aspect mode retainsSAMPLE_WEIGHTEDand records held and expired sample counts inCORRHLSTandCORRNEXP. For these legacy products,requiredfails outside the node range or afterVALIDEND. For an eligible uncorrected base, anautolookup skips only a genuine CALDB no-match; damaged calibration data remain fatal. OutputGRDCORR/BASEGRAD/GRDFILE/GRDEXT/GRDHASH/GRDBOUNDcards record grade provenance separately from ARFCORR time provenance.GRDDMOD/GRDBMODrecord the observation and FF grade/base reference modes;CORRDMOD/CORRBMODrecord the corresponding time-factor modes when a time factor is applied. The shared response is a calibration assumption; it does not measure or remove any residual readout-mode dependence. - (evtfile) [file name]
- Name of the cleaned event FITS file. Required when
aspcor=1. The BADPIX extension, when present, is used for detector-footprint filtering. - (mkffile) [file name]
- Name of the MKF attitude FITS file. Required when
aspcor=1. - (weight=aspect) [string]
- Attitude weighting mode when
aspcor=1. Useaspectfor GTI-overlapped MKF interval weighting, oreventfor source-event-time diagnostic weighting. - (thetabin=0.05) [real]
- Theta histogram bin width in arcmin when
aspcor=1. Set to 0 or a negative value to disable binning. - (regfile="") [file name]
- Optional DS9/CIAO-style source region file. It overrides the embedded region in either
mode; its image/physical/sky coordinate declaration is respected.
- (respctx="") [file name]
- Response context JSON for merged products. An explicit path overrides existing
RESPCTX links but still must match the event and atom provenance. Header links
are relative to the FITS file containing them; an explicit path is relative to
the current working directory. Atom event/MKF files remain required even when
an explicit merged MKF is supplied.
When moving a spectrum away from its sidecar, supply the validated new
respctx=path or preserve the relative link. A filename containing "merged" is not a substitute for provenance. - (srcmodel=uniform) [string]
- Extended-source brightness model. Use
uniform,gaussian,beta, orimage. The last three requireextend=1; the default uniform model ignores inactive shape and map parameters and never opens a source map. - (srcsigma=0.0) [real, arcsec]
- Standard deviation of the circular Gaussian source profile. It must be
positive and finite when
srcmodel=gaussian. Usesrcsigma=FWHM/2.35482for FWHM measured in arcsec:srcsigma=30means sigma=30 arcsec and FWHM about 70.6 arcsec. The default zero is a missing-value sentinel, not an automatically fitted width; it is rejected for Gaussian. Ignored for the other source models. - (srcrc=0.0) [real, arcsec]
- Core radius of the fixed-beta (beta=2/3) source profile. It must be positive
and finite when
srcmodel=beta.srcrc=30means rc=30 arcsec; surface brightness at that radius is about 35.36% of the central brightness. Use a fitted or explicitly assumed core radius, not the extraction radius. The default zero is a missing-value sentinel and is rejected for beta. Ignored for the other source models. - (srccut=5.0) [real]
- Positive finite cutoff in units of
srcsigmafor the Gaussian orsrcrcfor the beta profile. The beta profile is fixed to[1+(r/srcrc)**2]**(-1.5). This is a dimensionless multiple:srcrc=30 srccut=5truncates at 150 arcsec. The profile is zero beyond the cutoff even if the extraction region extends farther. Ignored for uniform and image models. - (srcmap) [file name]
- Required only for
srcmodel=image. It is a relative source brightness map in flux PER PIXEL with a celestial WCS. Pixels must be finite and nonnegative; pixels outside the map have zero brightness. The map is not generated automatically. A batch invocation that omits this active parameter stops with a clear required-parameter error. - (clobber=yes) [boolean]
- If 'clobber'=yes and outfile=filename, the file with the same name
will be overwritten, if it exists. Values are normalized case-insensitively:
yes/y/true/1/onenables overwrite andno/n/false/0/offdisables it. Any other token is rejected.
EXAMPLES
-
>fxtarfgen specfile=specfile expfile=expfile outfile=outfile -
>fxtarfgen specfile=source.pi expfile=source.expo outfile=source.arf regfile=source.reg psfmodel=dual-beta -
>fxtarfgen specfile=source.pi expfile=source.expo outfile=source.arf psfmodel=dual-beta psfcor=0 -
>fxtarfgen specfile=source.pi outfile=source.arf aspcor=1 evtfile=cl_evt.fits mkffile=att.mkf weight=aspect psfmodel=legacy -
>fxtarfgen specfile=extended.pi outfile=extended.arf aspcor=1 extend=1 evtfile=cl_evt.fits mkffile=att.mkf regfile=extended.reg weight=aspect psfcor=0 -
>fxtarfgen specfile=extended.pi expfile=expo-without_vign.fits outfile=uniform.arf extend=1 srcmodel=uniform -
>fxtarfgen specfile=extended.pi expfile=expo-without_vign.fits outfile=gaussian.arf extend=1 srcmodel=gaussian srcsigma=12.0 srccut=5.0 regfile=extended.reg -
>fxtarfgen specfile=extended.pi expfile=expo-without_vign.fits outfile=beta.arf extend=1 srcmodel=beta srcrc=18.0 srccut=5.0 regfile=extended.reg -
>fxtarfgen specfile=extended.pi expfile=expo-without_vign.fits outfile=image.arf extend=1 srcmodel=image srcmap=relative_flux_per_pixel.fits regfile=extended.reg
For a merged exposure carrying a valid RESPCTX link, the ordinary command automatically resolves the event/MKF context and uses aspect integration:
fxtarfgen specfile=merged_source.pha expfile=expo_without_vign_merged.fits outfile=source.arf extend=1
For a relocated legacy product, provide a matching context explicitly:
fxtarfgen specfile=merged_source.pha outfile=source.arf respctx=response_context.json extend=1
Off-axis two-beta calibration tables may specify a finite EEF normalization
radius with EEFNORM and EEFUNIT=arcsec. In that case,
both aperture and region-mask integration normalize the enclosed PSF to that
radius, with zero additional contribution outside it. Tables without this
metadata retain integration to infinity. Interpolated off-axis nodes must use
the same normalization radius.
FILTER METADATA
Calibration lookup accepts integer or string FITS FILTER values:
1 and '01' select the same filter. Complete numeric
codes are retained; multi-digit values are never reduced to their last digit.
FILTER=MULTIPLE and invalid markers such as E produce
an explicit error when a single filter is required. Generate responses for
each filter separately before merging. Legacy EEF curves support only
0 (open), 1 (thin), 2 (medium), and 3 (hole); other codes are rejected.
BUGS
SEE ALSO
Manual page updated
2026-11-04
ARF grade selection uses the same exact sets as RMF selection: 0, 0:4, or 0:12. Other declared sets are rejected. A single-file CALDB query that finds distinct files at the same latest validity boundary raises an ambiguity error instead of choosing by filename version.