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

FXTSoft v2.0 documentation

fxtsrcdet help

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

← Back to Command Reference

Detect EP-FXT sources with wavelet or maximum-likelihood methods.

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
AreaMigration behaviorNotes
Direct parameter namesinfile, 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 pathdetmethod=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 syntaxWhitespace, 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 contractShared 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 calibrationsigcalfile=AUTO queries FXT CALDB SRCDETSIGCAL and fails if it is unavailable.Use sigcalfile=CIAO to explicitly select CIAO wtsimresult.fits.
Output namingA 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 filesinterdir is accepted so copied commands parse successfully.The Python backend does not write the CIAO wtransform/wrecon intermediate stack.
outputinfixUsed 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

ParameterDefault / valuesPurpose
detmethod=wavdetect (default)Local fxtsrcdet; alias ciaoCIAO 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=mldetectInternal likelihood backend; aliases erosita and esasseSASS 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

  1. Validate the count, exposure, mask, background, and PSF grids for one module or a joint FXTA+FXTB set.
  2. 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.
  3. The likelihood backend preserves candidate order, groups neighbours, and jointly fits at most nmaxfit sources with C=2*sum(e-n*log(e)).
  4. Each source is removed and the remainder refitted to obtain DET_LIKE; sources below likemin are pruned. Extent trials calculate EXT_LIKE, and fixed-nuisance Delta C=1 searches estimate errors.

Candidate and automatic-chain parameters

ParameterDefault / valuesPurpose
boxlistAUTO or FITS tableUse 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.
autopipelineesassSelects the ERBOX/ERBACKMAP chain; fxtsrcdet is the regression-only wavelet candidate path.
boxsize4ERBOX half-size in original-image pixels.
boxnruns3; 1..3Number of compressed ERBOX searches.
boxlikemin6Minimum local and map ERBOX likelihood.
boxmaskfrac0.55Minimum valid-pixel fraction in an ERBOX aperture.
bkgscut1e-4PSF surface cutoff for the ERBACKMAP cheese mask.
bkgmlmin6Minimum local-candidate likelihood used for background masking.
bkgmaxcut0.5Minimum detector fraction retained after source masking.
bkgfitmethodsmooth or splineSelects adaptive Gaussian smoothing or a weighted FITPACK spline.
bkgsnr40Target SNR for adaptive background smoothing.
bkgnfitrun3Maximum spline fit-and-clip passes.
bkgexcesssigma1000Spline residual rejection threshold in statistical sigma.
bkgnsplinenodes36Spatial bins per dimension for the spline branch.
bkgdegree2; 1..5B-spline degree.
bkgsmoothflagyesChoose automatic smoothing knots; no uses fixed boundary knots.
bkgsmooth30Minimum 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

ParameterDefault / valuesPurpose
psfmodelCALDB, GAUSS or COMPOSITESelects the position-dependent FXT CALDB PSF, an explicit Gaussian model, or the count response of a frozen set of observations.
psfcontextNONERequired 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.
energy1000 eVEnergy used to resolve the FXT CALDB PSF.
detnamAUTODetector name from the image header or an explicit A/B value.
filterAUTOEnergy filter from the image header or an explicit CALDB filter name.
psfinterpnearest or linearCALDB spatial interpolation with boundary clamping.
psfsigma2.0 pixelsFixed sigma for psfmodel=GAUSS; an explicit sigma map overrides it locally.
likemin8Minimum per-source detection likelihood after null-model refitting.
extlikemin6Minimum likelihood for accepting non-zero extent.
fitpositionyesFit 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.
fitextentyesRun extent trials. no fixes an external extent when supplied and disables two-stage splitting.
extentmodelbeta, gauss, or gaussianPSF-convolved extent profile.
extmin1.5 pixelsMinimum tested extent.
extmax40 pixelsMaximum tested extent.
nmaxfit3Maximum simultaneous sources in one fit group.
multrad15Neighbour-grouping control; the POINTING branch retains the upstream scutrad path.
cutrad15Cash-statistic fit radius; values below 1 use the upstream EEF-radius control path.
fitbackendmldetectRuns the mldetect likelihood core based on eROSITA/eSASS ermldet 1.35; legacy is intended only for single-module testing.
fitmaxiter50Maximum finite-difference Levenberg-Marquardt iterations.
nmulsou2Maximum split components per input source.
twostageyesStart splitting after an extent trigger; disabled when fitextent=no.
splitthreshnoApply a source-property threshold before splitting; requires nmulsou >= 2.
splitthreshval30Inclusive split threshold.
splitthreshcolLIKE, RATE, or SCTSPhysical quantity used by the split threshold; significance scores are not substituted.
psfthreshold0.15Minimum in-mask PSF containment fraction.
maskthreshold0Minimum valid geometric-pixel fraction in each fit circle.
extlike_slope0,0Intercept and slope a,b for max(extlikemin, a + b * extent).

Likelihood products

ParameterDefaultContents
localboxoutfileNONESingle 33-column SRCLIST from ERBOX local; requires automatic eSASS candidates and background.
boxoutfileNONESingle 33-column SRCLIST from ERBOX map.
diagnosticfileNONESingle FXT diagnostics table with Cash statistic, fit status, and seed provenance.
bkgoutfileNONEERBACKMAP background count image for each module.
cheesemaskNONEERBACKMAP source mask for each module.
srcmapNONEFixed background plus best-fit source model for each module.
residfileNONEResidual 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.

ParameterDefault / valuesSummary
detmethodwavdetectBackend selector: wavdetect/ciao or mldetect/erosita/esass
imgfilerequiredInput counts image FITS file
expofileNONEInput exposure map FITS file or NONE
infileNONECIAO-style alias for imgfile
expfileNONECIAO-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.
scellfileNONEOptional source-cell label image FITS file or NONE
imagefileNONEOptional source-only image FITS file or NONE
defnbkgfileNONEOptional detection background FITS file or NONE
psffileNONEOptional PSF-size map from fxtpsfmap; used for source-region sizing and PSF scale selection. Main counts/rates are not EEF-corrected.
extoutfileNONEOptional extended-source table FITS file or NONE
extregfileNONEOptional extended-source DS9 region file or NONE
bkgfileNONEOptional background-map FITS file or NONE
bkginputNONECIAO-style alias for bkgfile
maskfileNONEOptional detection-mask FITS file or NONE
scales2.0 4.0Detection 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.
sigthresh1e-06Detection significance threshold; CIAO 4.16 accepts values in [0, 0.1], [0.9, 1.0], or [1.64, 6.5)
expmin0.0Optional FXT absolute exposure floor; 0 disables it
corrtypemexhatDetection kernel type: mexhat; gauss is incompatible with required significance calibration
bkgradius2.5Background annulus inner-radius factor
falsesrc-1.0Allowed false sources per scale; <=0 disables adaptive thresholding
bkgsigthresh0.001Background-cleansing threshold; sigma if >1 else probability, with the same CIAO 4.16 valid domain as sigthresh
sigmamodeciaoSigma calculation mode: ciao keeps wavdetect-aligned behavior; effarea applies the experimental effective-area correction
expthresh0.1CIAO-style relative exposure threshold after exposure-map normalization
ellsigma3.0Ellipse scaling for fxtsrcdet source-pixel R/ROTANG output
maxiter2Maximum source-cleansing iterations; the CIAO 4.16 implementation effectively caps positive values at two passes
iterstop0.0001Fractional stopping threshold for cleansing-mask changes; CIAO 4.16 performs zero passes when this is exactly 1
srccoverage0.8Minimum valid-pixel fraction in the source support
bkgcoverage0.6Minimum valid-pixel fraction in the background support
residualsigthresh3.5Residual-pass detection threshold; sigma if >1 else one-sided probability
residualfalsesrc-1.0Residual-pass false-source rate per scale; <=0 disables adaptive thresholding
residualscalemax3.0Maximum scale used by the residual weak-source pass
fxtrecoverynoEnable fxtsrcdet-only weak-source recovery passes outside CIAO wavdetect semantics (yes/no)
srcclassallPrimary source-table class: point, extended, or all
exptime0.0Exposure 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.
bkgtime0.0Livetime in seconds for a predetermined background map; 0 means match exposure
outputinfix Optional infix used when output filenames are set to '.'
sigcalfileAUTORequired 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
bkgerrinputnoCIAO-style switch; yes reads DataModel block 2 of bkginput, normally FITS extension 1 in a standard two-image file.
lognoWrite fxtsrcdet.log as well as stdout (yes/no)
verbose1Logging verbosity: 0=warning/error, 1=normal info, 2=debug
clobbernoOverwrite existing outputs (yes/no)
extentchecknoEnable srcextent-style extended-source post-check (yes/no)
extentthresh5.0Minimum extent significance for confirmed extended sources
extentmincounts15Minimum source counts for extent classification
extentpsfblur0.0Additional PSF sigma blur in image pixels for extent classification

PARAMETERS

Frontend backend selection

ParameterDefault / valuesPurpose
detmethodwavdetect; wavdetect/ciao or mldetect/erosita/esassSelects 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

ParameterDefault / valuesPurpose
imgfileRequired, or use infileInput image FITS file. Pixel values are treated as image counts.
infileNONECIAO-style alias for imgfile.
expofileNONE, or use expfileInput exposure map. Exposure is used for valid-pixel masking, relative exposure filtering, and rate estimates.
expfileNONECIAO-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

ParameterDefault / valuesPurpose
scellfileNONEWrites a source-cell label image when a filename is supplied.
imagefileNONEWrites a source-only image built from detected source cells.
defnbkgfileNONEWrites the detection background map used by the wavelet search.
extoutfileNONEWrites a separate extended-source FITS table.
extregfileNONEWrites a DS9 region file for the extended-source table.

Calibration, mask, and background inputs

ParameterDefault / valuesPurpose
psffileNONEOptional 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.
bkgfileNONEOptional predetermined background map. When absent, fxtsrcdet estimates the detection background internally.
bkginputNONECIAO-style alias for bkgfile.
bkgerrinputno; yes/noIf 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).
maskfileNONEOptional detection mask. Nonzero pixels are valid for detection.
sigcalfileAUTO; AUTO, CALDB, CIAO, or file pathRequired 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

ParameterDefault / valuesPurpose
scales2.0 4.0Wavelet 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.
sigthresh1.0e-6Per-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.0Allowed false detections per scale. Values <=0 disable adaptive thresholding.
bkgsigthresh1.0e-3Background-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.
sigmamodeciao; ciao/effareaGaussian 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.
expmin0.0Optional FXT-only absolute exposure floor before relative normalization. The neutral default leaves CIAO expthresh as the active exposure cut.
expthresh0.1CIAO-style relative exposure threshold after exposure-map normalization.
corrtypemexhatWavelet 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.
bkgradius2.5Inner-radius factor for the local background annulus around a source cell.
ellsigma3.0Scale factor for the source-cell moment ellipse written to R and ROTANG.
maxiter2Positive 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.
iterstop1.0e-4Fractional 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

ParameterDefault / valuesPurpose
srcclassall; point, extended, allSelects which source class is written to the primary outfile. The default applies no FXT-only class filter to the wavdetect path.
fxtrecoveryno; yes/noEnables FXT-only weak-source recovery passes. Leave disabled for strict wavdetect-style comparisons.
srccoverage0.8Minimum valid-pixel fraction inside the source support.
bkgcoverage0.6Minimum valid-pixel fraction inside the local background support.
residualsigthresh3.5Residual-pass threshold used only when fxtrecovery=yes. Values greater than 1 are interpreted as sigma; values from 0 to 1 as probability.
residualfalsesrc-1.0Residual-pass false-source rate per scale. Values <=0 disable adaptive residual thresholding.
residualscalemax3.0Largest wavelet scale allowed in the residual weak-source pass.

Runtime and compatibility controls

ParameterDefault / valuesPurpose
exptime0.0With 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.
bkgtime0.0Livetime 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.
outputinfixEmpty stringOptional infix used when output filenames are set to ..
interdir.Accepted for CIAO wavdetect command-line compatibility. fxtsrcdet does not write a CIAO intermediate stack.
logno; yes/noWrites fxtsrcdet.log in addition to stdout.
verbose1; 0-2Logging verbosity: 0=warning/error, 1=normal info, 2=debug.
clobberwavdetect: no; mldetect: yesOverwrite existing output files when yes; preserve them and report an error when no.
modeqlHEASoft 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 valueMeaningTypical use
1Low coverage or edge warning.Check source and background support before photometric use.
4Close neighbor or merged-neighbor condition.Inspect crowded fields and close double candidates.
8Extended-like source cell.Compare with srcclass and optional extended-source outputs.
16Near an extended-like source.Review compact sources projected on diffuse emission.
32Residual-image recovery.FXT recovery path; disabled when fxtrecovery=no.
64Persistent multiscale recovery.FXT recovery path for weak candidates seen across scales.
128Integrated basin recovery.FXT recovery path based on integrated source-cell support.
256Correlation-only recovery.FXT recovery path; requires review in structured backgrounds.
512Sparse 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 groupMeaningNotes
X, Y, RA, DECSource centroid in image and sky coordinates.X and Y are double precision.
X_ERR, Y_ERR, RA_ERR, DEC_ERRPosition 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_MARGINDetection 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_THRESHInternal 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 errorsSource, background, and net photometry.Main counts and rates are not divided by PSF EEF.
R_SRC, R_BKG_IN, R_BKG_OUTEquivalent circular source radius and background annulus radii.Useful for quick aperture-scale checks.
SHAPE, R, ROTANGDisplayed 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, NPIXSOUSource-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_EEFPSF and EEF diagnostics.With psffile=NONE, accepted cells record PSF_SIZE=0 and PSFRATIO=inf.
MULTI_CORREL_MAX, FXT_MULTI_CORREL_COUNTCorrelation-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, FLAGSSource 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