FXTSoft v2.0 documentation
fxtsrcdet help
Command help for fxtsrcdet in the FXTSoft v2.0 release.
Detect EP-FXT sources with wavelet or maximum-likelihood methods.
- NAME
- USAGE
- WAVDETECT MIGRATION
- DESCRIPTION
- DETECTION METHODS
- MLDETECT BACKEND
- PARAMETERS
- FLAGS
- TUNING GUIDE
- EXAMPLES
- OUTPUT
- NOTES
- SEE ALSO
NAME
fxtsrcdet detects and characterizes sources in EP-FXT images. Select the default CIAO wavdetect-derived wavelet method or eSASS/ermldet-derived maximum-likelihood fitting with detmethod.
USAGE
wavdetect backend (default)
fxtsrcdet imgfile=<image.fits> expofile=<expo.fits|NONE> outfile=<sources.fits> \
regfile=<sources.reg> sigfile=<significance.fits> [options]
mldetect likelihood backend
fxtsrcdet detmethod=mldetect imgfile=<image.fits|A.fits,B.fits> \
expofile=<expo.fits|A_exp.fits,B_exp.fits|NONE> \
outfile=<likelihood_sources.fits> [likelihood options]
For the default backend, CIAO-style aliases are accepted: infile for imgfile, expfile for expofile, and bkginput for bkgfile. The likelihood arguments are documented in the mldetect section below.
WAVDETECT MIGRATION
A CIAO wavdetect command can keep its input, output, threshold, exposure, background, PSF, iteration, logging, and clobber parameter names. The only additional production requirement is an FXT significance calibration available through sigcalfile=AUTO, CALDB, or an explicit file.
fxtsrcdet infile=image.fits outfile=src.fits scellfile=scell.fits \
imagefile=recon.fits defnbkgfile=nbkg.fits regfile=src.reg \
expfile=expo.fits psffile=psfmap.fits \
scales="1 1.41421 2 2.82843 4 5.65685 8 11.3137 16" \
sigthresh=1e-6 bkgsigthresh=0.001 maxiter=2 iterstop=0.0001 \
sigcalfile=AUTO
| Area | Migration behavior | Notes |
|---|---|---|
| Direct parameter names | infile, outfile, scellfile, imagefile, defnbkgfile, regfile, expfile, psffile, bkginput, bkgerrinput, scales, sigthresh, bkgsigthresh, falsesrc, ellsigma, maxiter, iterstop, exptime, expthresh, bkgtime, log, verbose, clobber, and mode are accepted unchanged. | NONE and an empty CIAO file value both mean no optional file. |
| Default scientific path | detmethod=wavdetect, scales="2.0 4.0", sigmamode=ciao, srcclass=all, fxtrecovery=no, and extentcheck=no. | No FXT-only recovery or class filtering is applied unless explicitly enabled. |
| Scale syntax | Whitespace, comma, colon, and semicolon separators are accepted, up to 127 positive scales. A commonly used square-root-of-two progression is 1 1.41421 2 2.82843 4 5.65685 8 11.3137 16. | For commands that must also run through the CIAO 4.16 shell wrapper, use whitespace, comma, or colon. Its C parser accepts semicolons, but the wrapper can interpret them as shell command separators. The 127-scale limit matches MAX_SCALES. |
| HEASoft contract | Shared wavdetect parameters use the same parameter-file types, modes, and release defaults. | sigcalfile and interdir intentionally use FXT installation defaults; FXT-only parameters retain neutral defaults on the comparison path. |
| Significance calibration | sigcalfile=AUTO queries FXT CALDB SRCDETSIGCAL and fails if it is unavailable. | Use sigcalfile=CIAO to explicitly select CIAO wtsimresult.fits. |
| Output naming | A literal . auto-names an output beside the input image; explicit CIAO output filenames are preserved. | sigfile and the extended-source outputs are FXT additions. |
| Intermediate files | interdir is accepted so copied commands parse successfully. | The Python backend does not write the CIAO wtransform/wrecon intermediate stack. |
outputinfix | Used when FXT outputs are set to .. | CIAO uses this mainly for internal stack filenames, so this naming-only behavior is not identical. |
Default wavdetect backend
Use detmethod=wavdetect, or omit the selector. The local wavelet engine writes source cells, significance images, wavdetect-style photometry, and DS9 ellipses.
wavdetect comparison
Use the same image, exposure map, PSF choice, scales, and threshold as CIAO. The release defaults already keep all source classes, disable FXT recovery, and select CIAO significance semantics.
eSASS likelihood fitting
Set detmethod=mldetect for ERBOX, ERBACKMAP, and joint PSF maximum-likelihood fitting. Single-image and same-grid FXTA+FXTB inputs use the likelihood task's own parameters and outputs.
Weak-source recovery
Set fxtrecovery=yes to enable FXT-only residual, multiscale, integrated-basin, and aperture-recovery passes. Inspect FLAGS before using weak recovered sources for science products.
DESCRIPTION
detmethod selects the source-detection method. The default wavdetect value runs the multiscale wavelet path; mldetect runs likelihood fitting. The aliases ciao, erosita, and esass select the corresponding methods.
In detmethod=wavdetect, fxtsrcdet runs a multiscale wavelet search on an image, estimates a detection background, constructs source cells, measures source and background counts, and writes a source table. The default path is the CIAO wavdetect-style wavelet transform and reconstruction path; FXT recovery extensions are disabled unless fxtrecovery=yes.
The two methods keep their own FITS schemas and diagnostics. A likelihood error does not fall back to the wavelet method.
The source position is measured in image coordinates and converted through the image WCS to sky coordinates. Source regions are written as ellipses when the source-cell moments define a stable major axis, minor axis, and rotation angle. The R column stores the displayed ellipse radii.
psffile supplies a PSF-size map for PSF diagnostics, source-cell scale logic, and PSF-related output columns. It does not apply an EEF correction to the main counts and rates, and the main wavdetect-style R/ROTANG output follows source-cell moments rather than a PSF floor.
DETECTION METHODS
| Parameter | Default / values | Purpose |
|---|---|---|
detmethod=wavdetect (default) | Local fxtsrcdet; alias ciao | CIAO 4.16 wavdetect/wtransform/wrecon source-level Python translation with optional FXT recovery. Uses the parameters, FLAGS, source-cell products, and output columns documented on this page. |
detmethod=mldetect | Internal likelihood backend; aliases erosita and esass | eSASS ERBOX local, ERBACKMAP, ERBOX map, and mldetect likelihood fitting with the FXT CALDB PSF. Supports one image or a same-grid FXTA+FXTB pair. |
The command-line value takes precedence over the learned HEASoft value. To change the learned default, use pset fxtsrcdet detmethod=mldetect; restore the release default with pset fxtsrcdet detmethod=wavdetect. mode=ql remains the HEASoft query/learn control and does not select the scientific backend.
Catalogues and diagnostic images are backend-specific. Compare sky positions and matched-source statistics explicitly; do not assume identical column names, likelihood definitions, source-region geometry, or intermediate products.
MLDETECT LIKELIHOOD BACKEND
fxtsrcdet detmethod=mldetect performs blind candidate detection, background reconstruction, and maximum-likelihood characterization with a position-dependent PSF, Cash statistics, and optional extent fitting. The default boxlist=AUTO bkgfile=AUTO autopipeline=esass path runs ERBOX local, ERBACKMAP, ERBOX map, and mldetect likelihood fitting in that order; the likelihood core is based on eROSITA/eSASS ermldet 1.35. autopipeline=fxtsrcdet and fitbackend=legacy are retained only for single-module testing.
The likelihood backend supports only one module or a same-grid FXTA+FXTB pair. Dual-module images must have identical shapes. The tolerances are 1e-4 pixel for CRPIX1/CRPIX2, the equivalent of 1e-4 pixel for CRVAL1/CRVAL2, and CDELT1/CDELT2 use a 1e-8 relative tolerance. It does not reproject or resample inputs. Explicit two-module expofile, maskfile, bkgfile, and psffile values use A,B order; NONE,file mixtures are not allowed. Dual-module input requires autopipeline=esass fitbackend=mldetect.
CALDB likelihood PSF use requires true RA_PNT, DEC_PNT, PA_PNT, and DATE-OBS. The PSF uses the dated TELDEF geometry; the WCS image center is not assumed to be the telescope pointing.
When an image pixel covers more than one detector pixel (|det J| > 1 for the image-to-detector Jacobian), the CALDB PSF is integrated over image-pixel areas with its Jacobian factor. The complete finite projection is normalized before a fit cutout is taken; a cropped kernel retains its enclosed fraction. Automatic background, box-fraction and EEF kernels are limited to the projected CALDB support (with a 128-pixel cap for background and EEF). Wide source-model outputs pad the finite PSF with zeros before extent convolution. An explicit fit kernel larger than the available support is rejected. Transforms with a largest scale above 16 detector pixels per image pixel, or without converged full-support flux integration, fail explicitly; use finer image pixels.
Likelihood processing flow
- Validate the count, exposure, mask, background, and PSF grids for one module or a joint FXTA+FXTB set.
- ERBOX local performs up to three compressed sliding-box searches. ERBACKMAP masks detected sources, fills holes, and estimates the exposure-corrected background. ERBOX map then supplies the default fit candidates.
- The likelihood backend preserves candidate order, groups neighbours, and jointly fits at most
nmaxfitsources withC=2*sum(e-n*log(e)). - Each source is removed and the remainder refitted to obtain
DET_LIKE; sources belowlikeminare pruned. Extent trials calculateEXT_LIKE, and fixed-nuisanceDelta C=1searches estimate errors.
Candidate and automatic-chain parameters
| Parameter | Default / values | Purpose |
|---|---|---|
boxlist | AUTO or FITS table | Use automatic candidates, or an external table with image or sky coordinates. Official summary rows are selected when present. For an external table, coordinate columns are resolved in this order: X/Y, X_IMA/Y_IMA (also accepted as XIMA/YIMA), then RA/DEC. Ordinary external X/Y are native zero-based image coordinates; X_IMA/Y_IMA are one-based FITS/eSASS coordinates and are converted to zero-based positions. A wavdetect SRCDET table is recognized by EXTNAME=SRCDET and CREATOR=fxtsrcdet; its X/Y are one-based and are converted at input. Keep image coordinates on the same image grid; use a table containing only RA/DEC when the candidate table and input image do not share a grid or WCS. |
autopipeline | esass | Selects the ERBOX/ERBACKMAP chain; fxtsrcdet is the regression-only wavelet candidate path. |
boxsize | 4 | ERBOX half-size in original-image pixels. |
boxnruns | 3; 1..3 | Number of compressed ERBOX searches. |
boxlikemin | 6 | Minimum local and map ERBOX likelihood. |
boxmaskfrac | 0.55 | Minimum valid-pixel fraction in an ERBOX aperture. |
bkgscut | 1e-4 | PSF surface cutoff for the ERBACKMAP cheese mask. |
bkgmlmin | 6 | Minimum local-candidate likelihood used for background masking. |
bkgmaxcut | 0.5 | Minimum detector fraction retained after source masking. |
bkgfitmethod | smooth or spline | Selects adaptive Gaussian smoothing or a weighted FITPACK spline. |
bkgsnr | 40 | Target SNR for adaptive background smoothing. |
bkgnfitrun | 3 | Maximum spline fit-and-clip passes. |
bkgexcesssigma | 1000 | Spline residual rejection threshold in statistical sigma. |
bkgnsplinenodes | 36 | Spatial bins per dimension for the spline branch. |
bkgdegree | 2; 1..5 | B-spline degree. |
bkgsmoothflag | yes | Choose automatic smoothing knots; no uses fixed boundary knots. |
bkgsmooth | 30 | Minimum Gaussian sigma for smooth, or FITPACK smoothing value for spline. |
The autopipeline=fxtsrcdet compatibility path applies the same one-based-to-zero-based conversion to its in-memory wavdetect candidates before mldetect fitting. This conversion is limited to recognized wavdetect SRCDET products and that internal compatibility boundary; ordinary external X/Y tables remain zero-based.
PSF and maximum-likelihood fit parameters
| Parameter | Default / values | Purpose |
|---|---|---|
psfmodel | CALDB, GAUSS or COMPOSITE | Selects the position-dependent FXT CALDB PSF, an explicit Gaussian model, or the count response of a frozen set of observations. |
psfcontext | NONE | Required JSON imaging-response context for COMPOSITE; contains the reference spectrum, observation selections, calibration identities and hashes of the bound image products. Other PSF modes reject this parameter. |
energy | 1000 eV | Energy used to resolve the FXT CALDB PSF. |
detnam | AUTO | Detector name from the image header or an explicit A/B value. |
filter | AUTO | Energy filter from the image header or an explicit CALDB filter name. |
psfinterp | nearest or linear | CALDB spatial interpolation with boundary clamping. |
psfsigma | 2.0 pixels | Fixed sigma for psfmodel=GAUSS; an explicit sigma map overrides it locally. |
likemin | 8 | Minimum per-source detection likelihood after null-model refitting. |
extlikemin | 6 | Minimum likelihood for accepting non-zero extent. |
fitposition | yes | Fit subpixel source positions after the external candidate coordinates have been converted to the internal zero-based image convention; no keeps those converted positions fixed and fits rates only. |
fitextent | yes | Run extent trials. no fixes an external extent when supplied and disables two-stage splitting. |
extentmodel | beta, gauss, or gaussian | PSF-convolved extent profile. |
extmin | 1.5 pixels | Minimum tested extent. |
extmax | 40 pixels | Maximum tested extent. |
nmaxfit | 3 | Maximum simultaneous sources in one fit group. |
multrad | 15 | Neighbour-grouping control; the POINTING branch retains the upstream scutrad path. |
cutrad | 15 | Cash-statistic fit radius; values below 1 use the upstream EEF-radius control path. |
fitbackend | mldetect | Runs the mldetect likelihood core based on eROSITA/eSASS ermldet 1.35; legacy is intended only for single-module testing. |
fitmaxiter | 50 | Maximum finite-difference Levenberg-Marquardt iterations. |
nmulsou | 2 | Maximum split components per input source. |
twostage | yes | Start splitting after an extent trigger; disabled when fitextent=no. |
splitthresh | no | Apply a source-property threshold before splitting; requires nmulsou >= 2. |
splitthreshval | 30 | Inclusive split threshold. |
splitthreshcol | LIKE, RATE, or SCTS | Physical quantity used by the split threshold; significance scores are not substituted. |
psfthreshold | 0.15 | Minimum in-mask PSF containment fraction. |
maskthreshold | 0 | Minimum valid geometric-pixel fraction in each fit circle. |
extlike_slope | 0,0 | Intercept and slope a,b for max(extlikemin, a + b * extent). |
Likelihood products
| Parameter | Default | Contents |
|---|---|---|
localboxoutfile | NONE | Single 33-column SRCLIST from ERBOX local; requires automatic eSASS candidates and background. |
boxoutfile | NONE | Single 33-column SRCLIST from ERBOX map. |
diagnosticfile | NONE | Single FXT diagnostics table with Cash statistic, fit status, and seed provenance. |
bkgoutfile | NONE | ERBACKMAP background count image for each module. |
cheesemask | NONE | ERBACKMAP source mask for each module. |
srcmap | NONE | Fixed background plus best-fit source model for each module. |
residfile | NONE | Residual for each module: image - (background + source_model), equivalent to image - srcmap. |
Dual-module srcmap, residfile, bkgoutfile, and cheesemask values accept either two A,B paths or one . for generated module-specific names. outfile accepts one table path; localboxoutfile, boxoutfile, and diagnosticfile also accept one table path. The final 49-column SRCLIST records per-source and per-image likelihood, rate, position, extent, valid model fraction (MASKFRAC), and nearest fitted-source distance (DIST_NN, in image pixels). The summary MASKFRAC is the total valid model integral divided by the total model integral across images; image rows use their own ratio. A source without a neighbour has DIST_NN=NaN. Fit and error status (FIT_STATUS, ERR_STATUS) are available only in the optional diagnosticfile. Image products and diagnostics retain ERBOX, ERBACKMAP, PSF, and mldetect provenance.
For mldetect, omitted outfile and regfile default to ., producing <image>_mlsrc.fits and <image>_mlsrc.reg beside the input image. Every output parameter accepts case-insensitive NONE or an empty string to disable that product. For example, regfile=NONE or regfile="" suppresses the region file. The default clobber=yes overwrites existing requested outputs on repeated runs; specify clobber=no to reject them before processing. Backend defaults are independent of learned wavdetect PFILE values; wavdetect retains clobber=no.
The backend fails when input grids differ, CALDB PSF data cannot be resolved, or a requested automatic compatibility path lacks its significance calibration. Failed source groups emit warnings and processing continues when other groups remain valid. An empty or fully pruned candidate set produces a valid empty catalogue.
Unavailable floating values are recorded as NaN, including physical fluxes, hardness ratios, off-axis angle, vignetting, on-time, and aperture photometry. Exposure and EEF are available in active image-band rows; their uncomputed summary slots and inactive-image measurements remain NaN. The integer compatibility columns RAWX, RAWY, TM_NR, and APE_CTS retain their FITS format and use TNULL=-2147483648 for missing values. OWNER=0 denotes no survey ownership; eROSITA sky ownership is not assigned to EP-FXT sources. Negative fit-error sentinels are not converted into valid sky uncertainties; consult ERR_STATUS in diagnosticfile for error status. Count rates are not reported as calibrated physical fluxes.
WAVDETECT PARAMETER SUMMARY
The table below describes the default wavelet engine. The likelihood-only controls are documented in the preceding mldetect section.
| Parameter | Default / values | Summary |
|---|---|---|
detmethod | wavdetect | Backend selector: wavdetect/ciao or mldetect/erosita/esass |
imgfile | required | Input counts image FITS file |
expofile | NONE | Input exposure map FITS file or NONE |
infile | NONE | CIAO-style alias for imgfile |
expfile | NONE | CIAO-style alias for expofile |
outfile | . | Output source-table FITS file |
regfile | . | Output DS9 region file |
sigfile | . | Output local-wavelet-score diagnostic map; not Gaussian sigma or a false-positive probability. |
scellfile | NONE | Optional source-cell label image FITS file or NONE |
imagefile | NONE | Optional source-only image FITS file or NONE |
defnbkgfile | NONE | Optional detection background FITS file or NONE |
psffile | NONE | Optional PSF-size map from fxtpsfmap; used for source-region sizing and PSF scale selection. Main counts/rates are not EEF-corrected. |
extoutfile | NONE | Optional extended-source table FITS file or NONE |
extregfile | NONE | Optional extended-source DS9 region file or NONE |
bkgfile | NONE | Optional background-map FITS file or NONE |
bkginput | NONE | CIAO-style alias for bkgfile |
maskfile | NONE | Optional detection-mask FITS file or NONE |
scales | 2.0 4.0 | Detection scales in image pixels; whitespace, comma, colon, and semicolon separators are accepted. Square-root-of-two intermediate scales such as 1,1.41421,2,2.82843,4 are preserved as supplied. Semicolons are unsafe in the CIAO 4.16 shell wrapper. |
sigthresh | 1e-06 | Detection significance threshold; CIAO 4.16 accepts values in [0, 0.1], [0.9, 1.0], or [1.64, 6.5) |
expmin | 0.0 | Optional FXT absolute exposure floor; 0 disables it |
corrtype | mexhat | Detection kernel type: mexhat; gauss is incompatible with required significance calibration |
bkgradius | 2.5 | Background annulus inner-radius factor |
falsesrc | -1.0 | Allowed false sources per scale; <=0 disables adaptive thresholding |
bkgsigthresh | 0.001 | Background-cleansing threshold; sigma if >1 else probability, with the same CIAO 4.16 valid domain as sigthresh |
sigmamode | ciao | Sigma calculation mode: ciao keeps wavdetect-aligned behavior; effarea applies the experimental effective-area correction |
expthresh | 0.1 | CIAO-style relative exposure threshold after exposure-map normalization |
ellsigma | 3.0 | Ellipse scaling for fxtsrcdet source-pixel R/ROTANG output |
maxiter | 2 | Maximum source-cleansing iterations; the CIAO 4.16 implementation effectively caps positive values at two passes |
iterstop | 0.0001 | Fractional stopping threshold for cleansing-mask changes; CIAO 4.16 performs zero passes when this is exactly 1 |
srccoverage | 0.8 | Minimum valid-pixel fraction in the source support |
bkgcoverage | 0.6 | Minimum valid-pixel fraction in the background support |
residualsigthresh | 3.5 | Residual-pass detection threshold; sigma if >1 else one-sided probability |
residualfalsesrc | -1.0 | Residual-pass false-source rate per scale; <=0 disables adaptive thresholding |
residualscalemax | 3.0 | Maximum scale used by the residual weak-source pass |
fxtrecovery | no | Enable fxtsrcdet-only weak-source recovery passes outside CIAO wavdetect semantics (yes/no) |
srcclass | all | Primary source-table class: point, extended, or all |
exptime | 0.0 | Exposure time in seconds. Without an exposure map, a positive explicit value takes priority; otherwise read positive finite EXPOSURE, then EXPTIME, from the image header. Missing valid exposure is an error. With an exposure map, output rates retain the count-weighted source-cell exposure convention. |
bkgtime | 0.0 | Livetime in seconds for a predetermined background map; 0 means match exposure |
outputinfix | Optional infix used when output filenames are set to '.' | |
sigcalfile | AUTO | Required significance calibration file; AUTO and CALDB require FXT CALDB SRCDETSIGCAL, CIAO explicitly selects wtsimresult.fits, NONE is rejected |
interdir | . | Accepted for CIAO wavdetect compatibility; no intermediate stack is written |
bkgerrinput | no | CIAO-style switch; yes reads DataModel block 2 of bkginput, normally FITS extension 1 in a standard two-image file. |
log | no | Write fxtsrcdet.log as well as stdout (yes/no) |
verbose | 1 | Logging verbosity: 0=warning/error, 1=normal info, 2=debug |
clobber | no | Overwrite existing outputs (yes/no) |
extentcheck | no | Enable srcextent-style extended-source post-check (yes/no) |
extentthresh | 5.0 | Minimum extent significance for confirmed extended sources |
extentmincounts | 15 | Minimum source counts for extent classification |
extentpsfblur | 0.0 | Additional PSF sigma blur in image pixels for extent classification |
PARAMETERS
Frontend backend selection
| Parameter | Default / values | Purpose |
|---|---|---|
detmethod | wavdetect; wavdetect/ciao or mldetect/erosita/esass | Selects the independent scientific engine before either task parser runs. The selector itself is not forwarded. |
The remaining detailed parameter sections apply to detmethod=wavdetect. The preceding mldetect section defines the likelihood-specific controls and constraints.
Input and primary output files
| Parameter | Default / values | Purpose |
|---|---|---|
imgfile | Required, or use infile | Input image FITS file. Pixel values are treated as image counts. |
infile | NONE | CIAO-style alias for imgfile. |
expofile | NONE, or use expfile | Input exposure map. Exposure is used for valid-pixel masking, relative exposure filtering, and rate estimates. |
expfile | NONE | CIAO-style alias for expofile. |
outfile | . | Main source-table FITS output. A value of . selects the task default name, optionally with outputinfix. |
regfile | . | DS9 region output for the main source table. |
sigfile | . | FXT local-wavelet-score diagnostic map, with dimensionless BUNIT=1; not a calibrated Gaussian-significance image. |
Optional diagnostic products
| Parameter | Default / values | Purpose |
|---|---|---|
scellfile | NONE | Writes a source-cell label image when a filename is supplied. |
imagefile | NONE | Writes a source-only image built from detected source cells. |
defnbkgfile | NONE | Writes the detection background map used by the wavelet search. |
extoutfile | NONE | Writes a separate extended-source FITS table. |
extregfile | NONE | Writes a DS9 region file for the extended-source table. |
Calibration, mask, and background inputs
| Parameter | Default / values | Purpose |
|---|---|---|
psffile | NONE | Optional PSF-size map, normally produced by fxtpsfmap. With no PSF map, accepted source cells follow the wavdetect no-PSF convention: PSF_SIZE=0 and PSFRATIO=inf. |
bkgfile | NONE | Optional predetermined background map. When absent, fxtsrcdet estimates the detection background internally. |
bkginput | NONE | CIAO-style alias for bkgfile. |
bkgerrinput | no; yes/no | If yes, reads background-count errors from CIAO DataModel block 2 of bkginput. In the standard two-image FITS layout this is FITS extension 1 (Astropy HDU index 1). |
maskfile | NONE | Optional detection mask. Nonzero pixels are valid for detection. |
sigcalfile | AUTO; AUTO, CALDB, CIAO, or file path | Required significance calibration table. AUTO and CALDB require FXT CALDB SRCDETSIGCAL and fail if it is unavailable. CIAO explicitly selects wtsimresult.fits. NONE is rejected. |
Detection and statistics controls
| Parameter | Default / values | Purpose |
|---|---|---|
scales | 2.0 4.0 | Wavelet scales in image pixels. Whitespace, comma, colon, and semicolon separators are accepted; at most 127 positive values may be supplied. The list is used as supplied, including square-root-of-two intermediate scales such as 1 1.41421 2 2.82843 4 5.65685 8 11.3137 16. Prefer the first three separators for cross-running commands because CIAO 4.16 can treat semicolons as shell separators before its C parser sees them. |
sigthresh | 1.0e-6 | Per-pixel detection probability threshold before adaptive and calibration adjustments. The CIAO 4.16 source accepts [0, 0.1], [0.9, 1.0], and [1.64, 6.5); values in the intervening gaps are rejected. |
falsesrc | -1.0 | Allowed false detections per scale. Values <=0 disable adaptive thresholding. |
bkgsigthresh | 1.0e-3 | Background-cleansing threshold. Values greater than 1 are interpreted as sigma and values below 1 as probability; the accepted numeric domain is the same discontinuous CIAO 4.16 domain documented for sigthresh. |
sigmamode | ciao; ciao/effarea | Gaussian sigma convention. ciao keeps the current wavdetect-aligned behavior. effarea enables the experimental effective-area variance correction for testing and should not be used for strict wavdetect comparisons unless explicitly requested. |
expmin | 0.0 | Optional FXT-only absolute exposure floor before relative normalization. The neutral default leaves CIAO expthresh as the active exposure cut. |
expthresh | 0.1 | CIAO-style relative exposure threshold after exposure-map normalization. |
corrtype | mexhat | Wavelet kernel used for detection. The required significance calibration is for Mexican-hat correlations. gauss is rejected because its unit-sum smoothing has a different normalization; Gaussian thresholds require separate calibration. sigcalfile=NONE remains unsupported. |
bkgradius | 2.5 | Inner-radius factor for the local background annulus around a source cell. |
ellsigma | 3.0 | Scale factor for the source-cell moment ellipse written to R and ROTANG. |
maxiter | 2 | Positive integer limit on source-cleansing iterations during background estimation; zero is rejected, as in CIAO 4.16. A value of 1 permits one pass, while values of 2 or more are effectively capped at two passes by the preserved CIAO 4.16 implementation. Early stopping can reduce this count. This is separate from the likelihood optimizer's fitmaxiter and output NITER. |
iterstop | 1.0e-4 | Fractional stopping threshold for changes in the cleansing mask. The exact CIAO 4.16 value 1 selects zero passes; values below 1 retain the normal positive-pass behavior. |
Source classification and recovery
| Parameter | Default / values | Purpose |
|---|---|---|
srcclass | all; point, extended, all | Selects which source class is written to the primary outfile. The default applies no FXT-only class filter to the wavdetect path. |
fxtrecovery | no; yes/no | Enables FXT-only weak-source recovery passes. Leave disabled for strict wavdetect-style comparisons. |
srccoverage | 0.8 | Minimum valid-pixel fraction inside the source support. |
bkgcoverage | 0.6 | Minimum valid-pixel fraction inside the local background support. |
residualsigthresh | 3.5 | Residual-pass threshold used only when fxtrecovery=yes. Values greater than 1 are interpreted as sigma; values from 0 to 1 as probability. |
residualfalsesrc | -1.0 | Residual-pass false-source rate per scale. Values <=0 disable adaptive residual thresholding. |
residualscalemax | 3.0 | Largest wavelet scale allowed in the residual weak-source pass. |
Runtime and compatibility controls
| Parameter | Default / values | Purpose |
|---|---|---|
exptime | 0.0 | With expfile, source rates use the count-weighted exposure-map seconds in the final source cell. Without a map, use a positive explicit value, or read positive finite EXPOSURE followed by EXPTIME from the image header. If neither is valid, the task reports missing exposure and asks for an exposure map or positive exptime. FXT does not silently assume one second. |
bkgtime | 0.0 | Livetime in seconds for a predetermined background map. A value of 0 means the background already matches the source exposure; a positive value scales the background and its absolute error by exptime/bkgtime, as in CIAO wtransform. |
outputinfix | Empty string | Optional infix used when output filenames are set to .. |
interdir | . | Accepted for CIAO wavdetect command-line compatibility. fxtsrcdet does not write a CIAO intermediate stack. |
log | no; yes/no | Writes fxtsrcdet.log in addition to stdout. |
verbose | 1; 0-2 | Logging verbosity: 0=warning/error, 1=normal info, 2=debug. |
clobber | wavdetect: no; mldetect: yes | Overwrite existing output files when yes; preserve them and report an error when no. |
mode | ql | HEASoft query/learn behavior. This parameter does not select the scientific backend; use detmethod. |
FLAGS
This section applies to detmethod=wavdetect. FLAGS is a bit mask, and multiple conditions may be combined in one row. Likelihood catalogues instead use their documented fit and error status columns.
| Bit value | Meaning | Typical use |
|---|---|---|
1 | Low coverage or edge warning. | Check source and background support before photometric use. |
4 | Close neighbor or merged-neighbor condition. | Inspect crowded fields and close double candidates. |
8 | Extended-like source cell. | Compare with srcclass and optional extended-source outputs. |
16 | Near an extended-like source. | Review compact sources projected on diffuse emission. |
32 | Residual-image recovery. | FXT recovery path; disabled when fxtrecovery=no. |
64 | Persistent multiscale recovery. | FXT recovery path for weak candidates seen across scales. |
128 | Integrated basin recovery. | FXT recovery path based on integrated source-cell support. |
256 | Correlation-only recovery. | FXT recovery path; requires review in structured backgrounds. |
512 | Sparse aperture recovery. | FXT recovery path for isolated weak-source aperture tests. |
TUNING GUIDE
For CIAO wavdetect-style comparisons
Use identical image binning, exposure map, scales, sigthresh, background input, and PSF choice. The defaults srcclass=all, fxtrecovery=no, extentcheck=no, sigmamode=ciao, and expmin=0 keep FXT-only filtering and recovery outside the comparison path. Either provide the same PSF map to both tasks or set psffile=NONE in both runs.
For eSASS/mldetect likelihood runs
Set detmethod=mldetect, keep autopipeline=esass and fitbackend=mldetect, and use the default likemin=8 unless the validation protocol requires another threshold. The scientific chain follows eSASS source semantics while replacing the eROSITA PSF interface with the position-dependent FXT CALDB PSF.
For FXT weak-source searches
Enable fxtrecovery=yes and tune residualsigthresh, residualfalsesrc, and residualscalemax for the field. The recovery flags identify which rows came from the extra FXT passes. In diffuse fields, inspect scellfile, imagefile, and defnbkgfile before treating recovered weak sources as final detections.
For region-size review
The primary displayed region is controlled by the source-cell moment ellipse and ellsigma. PSF_SIZE, PSF_SCALE, and PSFRATIO diagnose PSF-scale behavior, but the main R/ROTANG region does not grow solely because a PSF map is present.
EXAMPLES
Basic source detection
fxtsrcdet imgfile=image.fits expofile=expo.fits outfile=src.fits \
regfile=src.reg sigfile=sig.fits scales=2,4 sigthresh=1e-6 clobber=yes
mldetect likelihood backend
fxtsrcdet detmethod=mldetect imgfile=image.fits expofile=expo.fits \
boxlist=AUTO bkgfile=AUTO autopipeline=esass \
psfmodel=CALDB energy=1000 fitbackend=mldetect fitmaxiter=50 \
boxoutfile=erbox.fits bkgoutfile=erbackmap.fits \
cheesemask=cheese.fits outfile=src_ml.fits regfile=src_ml.reg \
srcmap=model.fits residfile=residual.fits likemin=8 \
fitextent=yes clobber=yes
External candidates and fixed Gaussian PSF
fxtsrcdet detmethod=mldetect imgfile=image.fits expofile=exposure.fits \
boxlist=seeds.fits bkgfile=background.fits psfmodel=GAUSS \
psfsigma=2.0 outfile=mlsrc.fits fitextent=no nmulsou=1 clobber=yes
Same-grid FXTA+FXTB joint fit
fxtsrcdet detmethod=mldetect imgfile=a_image.fits,b_image.fits \
expofile=a_exp.fits,b_exp.fits maskfile=a_mask.fits,b_mask.fits \
bkgfile=AUTO psfmodel=GAUSS psffile=a_psf.fits,b_psf.fits detnam=A,B \
autopipeline=esass fitbackend=mldetect \
srcmap=. residfile=. bkgoutfile=. cheesemask=. \
outfile=ab_mlsrc.fits regfile=ab_mlsrc.reg clobber=yes
Composite response for a coadded image
See the composite context and response guide (Chinese) for the input schema, context exporter and calibration provenance.
fxtsrcdet detmethod=mldetect imgfile=coadd.fits expofile=coadd_expo.fits \
boxlist=seeds.fits bkgfile=frozen_background.fits \
psfmodel=COMPOSITE psfcontext=imaging_context.json \
fitbackend=mldetect fitextent=no twostage=no nmulsou=1 splitthresh=no \
outfile=composite_sources.fits srcmap=composite_model.fits \
residfile=composite_residual.fits clobber=yes
This mode fits point sources with a fixed reference spectrum and constant flux across the constituent observations. It accepts one image or one image for each of FXTA and FXTB on a common grid; the two detector fluxes are independent, while positions are shared. Supply the exact counts, exposure and frozen background products bound by the context and explicit candidate positions. Automatic candidates/backgrounds, extension fitting, two-stage fitting, repeated source passes, threshold splitting, the legacy optimizer and PSF-size maps are not supported. Omit energy; the spectrum is defined by the context.
The response integrates the observation components in expected-count space. The exposure image defines the valid analysis pixels and is not multiplied into this response again. Detector acceptance and the final fit mask have different roles. Finite calibration support is retained when a stamp or fit region is cropped. The model is conditional on the supplied spectrum, background and calibrations; coadding is not generally equivalent to retaining the observation labels in a joint likelihood.
wavdetect-style comparison table
fxtsrcdet infile=image.fits expfile=expo.fits outfile=src_all.fits \
regfile=src_all.reg sigfile=sig_all.fits scellfile=scell_all.fits \
imagefile=image_all.fits defnbkgfile=defnbkg_all.fits psffile=NONE \
scales="1 1.41421 2 2.82843 4 5.65685 8 11.3137 16" \
sigthresh=1e-6 srcclass=all sigcalfile=AUTO \
fxtrecovery=no clobber=yes
Detection with an FXT PSF map
fxtpsfmap expo.fits psfmap.fits 1.5 0.393 clobber=yes
fxtsrcdet imgfile=image.fits expofile=expo.fits outfile=src_psf.fits \
regfile=src_psf.reg sigfile=sig_psf.fits psffile=psfmap.fits \
scales=1,2,4,8 srcclass=all sigcalfile=AUTO fxtrecovery=no clobber=yes
FXT weak-source recovery on structured background
fxtsrcdet imgfile=image.fits expofile=expo.fits outfile=src_recovery.fits \
regfile=src_recovery.reg sigfile=sig_recovery.fits srcclass=all \
fxtrecovery=yes residualsigthresh=3.0 residualfalsesrc=2.0 \
residualscalemax=4.0 scellfile=scell_recovery.fits clobber=yes
OUTPUT
Outputs are backend-specific. The common frontend preserves the selected task's filenames, FITS schema, exit status, and diagnostics rather than converting them to a common catalogue format.
wavdetect backend source table
| Column group | Meaning | Notes |
|---|---|---|
X, Y, RA, DEC | Source centroid in image and sky coordinates. | X and Y are double precision. |
X_ERR, Y_ERR, RA_ERR, DEC_ERR | Position uncertainty estimates. | For wavdetect, RA_ERR and DEC_ERR follow CIAO 4.16: transform both (X,Y) and (X+X_ERR,Y+Y_ERR) through the WCS and take the absolute coordinate differences in degrees, wrapping RA across 0/360 degrees. This simultaneous positive displacement is the CIAO column convention, rather than propagation of a two-dimensional covariance. It does not alter the centroid or the likelihood backend's error definitions. |
SCALE, CORREL_VALUE, CORREL_THRESH, CORREL_MARGIN | Detection scale, wavelet correlation and its actual calibrated threshold at the detection peak; margin is correlation minus threshold. | For calibrated detections, compare CORREL_VALUE with CORREL_THRESH. A missing correlation threshold is NaN. Optional FXT residual, integrated-basin and aperture recovery candidates without calibrated correlation diagnostics have NaN in all three correlation fields; their internal count proxies are not exported as correlation values. This comparison is not a Gaussian-sigma significance. |
WAVELET_SCORE, SCORE_THRESH | Internal local-wavelet diagnostic score and its score-side threshold; optional FXT recovery may use a source-cell score. | SIGMA and THRESHOLD_VALUE retain the same values as deprecated compatibility aliases. These are not the calibrated correlation detection criterion and must not be used as a 3-sigma/5-sigma source cut. |
COUNTS, BKG_COUNTS, NET_COUNTS, rates, and errors | Source, background, and net photometry. | Main counts and rates are not divided by PSF EEF. |
R_SRC, R_BKG_IN, R_BKG_OUT | Equivalent circular source radius and background annulus radii. | Useful for quick aperture-scale checks. |
SHAPE, R, ROTANG | Displayed source-region shape and ellipse geometry. | R contains the major and minor ellipse radii. ROTANG is the major-axis angle from image +X toward +Y, in degrees modulo 180. A stable half-angle formula avoids the native CIAO eigenvector cancellation; affected non-circular ellipses can therefore differ from CIAO's fallback angle. Exactly circular moments retain the 90-degree convention. |
ELL_MAJOR, ELL_MINOR, ELL_PA, CELLAREA, NPIXSOU | Source-cell moment and area diagnostics. | These describe the reconstructed source support used to build the displayed region. |
PSF_SIZE, PSF_SCALE, PSFRATIO, PSF_EEF, COUNTS_EEF, NET_EEF | PSF and EEF diagnostics. | With psffile=NONE, accepted cells record PSF_SIZE=0 and PSFRATIO=inf. |
MULTI_CORREL_MAX, FXT_MULTI_CORREL_COUNT | Correlation-maximum diagnostics. | MULTI_CORREL_MAX flags more than one maximum in the source cell at the effective detection/PSF scale, following the wavdetect output convention; it is zero for the no-PSF and FXT recovery paths. FXT_MULTI_CORREL_COUNT retains the broader FXT maximum count, which can include other scales and does not define the binary CIAO-compatible flag. |
SRC_CLASS, FLAGS | Source classification and quality/recovery bit mask. | Use with srcclass and the flag table above when filtering catalogs. |
Likelihood backend products
With detmethod=mldetect, outfile is the eSASS-style maximum-likelihood source catalogue. It records per-source and per-image likelihood, rate, position, extent, fit-status, and error-status fields. Optional products include ERBOX source lists, ERBACKMAP backgrounds and cheese masks, fitted source models, residual images, and joint FXTA+FXTB products. The mldetect section above defines their parameters and constraints.
For psfmodel=COMPOSITE, SRC_RESPONSE is the authoritative photometry table, joined to SRCLIST by SRC_ID, ID_INST and ID_BAND. IMAGE_ID starts at zero in the sorted detector image order and DETNAM disambiguates a single FXTB input. REF_FLUX is photon flux in the normalization band declared in RSP_CONTEXT, in ph cm−2 s−1; its uncertainty is conditional on the fixed model. No A/B flux sum is reported.
G0 and GD are the reference and accepted response integrals over the complete finite calibration support, in cm2 s. GFIT applies the fixed statistical mask and GBOX applies only the fit rectangle. Thus MODEL_CTS_FIT = REF_FLUX * GFIT and MODEL_CTS_DET = REF_FLUX * GD. The reference/detected circular EEFs and response/reference mask fractions are separate columns. Legacy ML_CTS, ML_RATE, ML_EXP, ML_EEF and ML_FLUX fields have no identical meaning in this mode and are NaN. Model/residual images and catalogues carry the frozen context hash; the catalogue also embeds the context JSON.
wavdetect headers and region files
The source-table header records the region and cell construction choices, including PSFUSED, REGMETH, REGFLOOR, and CELLMETH. These comments describe the fxtsrcdet path used in the run, including whether a PSF file was available for PSF-size and scale logic.
The DS9 region file follows the main source table. It writes ellipse regions for rows with stable moment geometry, using the table R and ROTANG values.
Optional image outputs
For wavdetect output, SRC_SIGNIFICANCE follows the CIAO source-cell convention: NET_COUNTS / (1 + sqrt(BKG_COUNTS + 0.75)). It measures net counts relative to the Gehrels background error; at low counts it is not an exact Gaussian tail significance. The detection probability control is sigthresh (or falsesrc) through the calibrated correlation threshold. See the CIAO output reference and detection theory.
When requested, sigfile stores the FXT local-wavelet diagnostic score, marked by SIGTYPE and dimensionless BUNIT=1; its pixels are not Gaussian sigma or detection probabilities. scellfile stores source-cell labels; imagefile stores a source-only image; and defnbkgfile stores the detection background map. These products are intended for verification and comparison plots.
NOTES
For detmethod=wavdetect, sigcalfile=AUTO is the production setting and requires the FXT CALDB SRCDETSIGCAL entry. Use sigcalfile=CIAO only when an explicit CIAO wtsimresult.fits comparison is intended.
Set fxtrecovery=no when the goal is strict comparison with CIAO wavdetect. Set fxtrecovery=yes only when the FXT-specific recovery rows are wanted and the recovery flags will be reviewed. These controls are not consumed by detmethod=mldetect.
fxtsrcdet is a modified Python source-level translation of CIAO 4.16 wavdetect, wtransform, and wrecon, rather than an independent behavioral reimplementation. CIAO is developed by the Chandra X-ray Center / Smithsonian Astrophysical Observatory. This derivative component is distributed under GPL-3.0-or-later and retains the CIAO 4.16 SAO notice. The installed fxtsrcdet package includes NOTICE_CIAO, LICENSE.SAO, and the complete GPLv3 text in COPYING. See the CIAO license page and the GNU GPLv3.
The likelihood backend contains a source-level Python port of eROSITA eSASS erbox 1.15, erbackmap 1.17, ermldet 1.35, and referenced eroio/cal routines. The upstream releases are GPL-2.0-or-later, and the combined FXT likelihood component is distributed under GPL-3.0-or-later. Its installed package includes NOTICE_EROSITA with archive hashes, source correspondence, modifications, and non-endorsement text, plus the complete GPLv3 text in COPYING.
The help text describes the command-line interface and the output semantics. Scientific filtering thresholds should still be checked against the local background, exposure map, and source-cell products for the observation being processed.
SEE ALSO
fxtimage, fxtexpogen, fxtpsfmap, fxtpsfgen, fxteefgen, CIAO wavdetect, eROSITA eSASS ermldet.
Manual page updated
2026-11-04