EP-FXT Science Data Center / Users GuideFXTSoft and CALDB v2.0 release · 2026-11-06
Analysis Guide
Data reduction
Start with the Level 1 event files described in Data Files. Calibrate and screen them to produce Level 2 event files, then extract images, spectra, and light curves. The cleaned events can be reused while the calibration and screening choices remain unchanged. Reprocess the original inputs when a relevant software or CALDB update changes the calibration.
The following example uses optional symbolic links to shorten the filenames. You may use the original filenames directly. Start in the fxt/event directory:
ln -s fxt_a*uf* fxta-ori.fits
ln -s fxt_b*uf* fxtb-ori.fits
cd ../hk
ln -s *hk* hk.fits
ln -s *mkf* mkf.fits
cd ../../auxil
ln -s *att* att.fits
ln -s *orb* orb.fits
cd ../fxt/event
Method 1: FXTSoft batch reduction. The fxtchain task runs the standard calibration and screening sequence. Replace input_obs with the observation directory and reduced_obs with the output directory:
fxtchain indir=input_obs outdir=reduced_obs
Method 2: explicit FXTSoft and HEASoft steps. Run the individual tasks below to inspect intermediate products or apply custom screening.
The following example produces a Level 2 event file for FXTA:
fxtcoord updates the SKY coordinate of each event using the latest calibration file and recalculates the GTI of events based on the event file and attitude file
For TM mode, correct event times and readout positions before energy calibration. FF and PW data skip this step. Replace SOURCE_RA and SOURCE_DEC with the target coordinates in degrees:
Extract images, spectra, and light curves from this filtered event file. Intermediate files may be removed after the products have been checked.
GTI Checking
Inspect a light curve of the full field for background flares that remain after GTI screening:
xselect
> Enter session name >[EP] EP # session name, will be the prefix of later output
> set datadir .
> read events fxta-clean.fits
> set datamode FF/PW/TM # when the mode are not recognized correctly.
> set binsize 20
> show status
> extract curve
> plot curve
PGPLOT file/type: /xw # set the display device as X window
PLT> device lc.eps/CPS # switch the output device to a color PS file: lc.eps
PLT> plot
PLT> quit
> save curve lc.fits clobber=yes # save curve data with a fits file
> quit
Figure 1: Light curve of the field.
For command syntax and additional timing-filter examples, see the NASA HEASARC XSELECT User's Guide. Exclude intervals affected by background flares before further analysis.
Point source
Use XSELECT to extract a point-source image, spectrum, and light curve from the cleaned event file (fxta-clean.fits). The resulting products can be analyzed with XRONOS, XIMAGE, and XSPEC. The examples below describe region selection, pile-up checks, response generation, and timing corrections.
There are 5 main steps to create high-level products:
Extract images, spectra, and light-curves.
Pileup estimation.
Generate the exposure map.
Create RMF and ARF files for this source.
Barycentric Correction.
FF & PW modes
FF and PW are imaging modes with similar initial processing. Photons can arrive during CCD readout as well as during integration. These Out-of-Time (OoT) events are assigned incorrect RAWY positions and therefore incorrect position-dependent CTI corrections. The OoT fraction depends on the observing mode; see OoT events for the image-correction procedure and its limitations.
When a cleaned event file such as fxta-clean.fits is available, use the explicit XSELECT route below. It remains the reference route for custom regions and specialized screening.
Extracting light curve & spectrum Use XSELECT's filter command to select energy, region, or time intervals, and clear to remove a filter. Create products with extract and write them with save. Event grades. Use grades 0–12 for the standard selection, or apply a grade selection appropriate to the analysis. Region filtering. In XSELECT, run extract image followed by plot image to open the field in DS9. Draw a circular source region and save it as source.reg. A radius of 1 arcmin is a starting point. Choose the aperture using the PSF and encircled energy fraction for the module, energy, and off-axis angle, and account for aperture losses in the ARF. Draw the background region in a source-free area away from the OoT trail and save it as back.reg. In XSELECT, use filter region source.reg or filter region back.reg to select the corresponding events. Energy filtering. For a band-limited image or light curve in XSELECT, convert the energy limits to PI channels with fxte2pi. The commands fxte2pi 2.0 10.0 and fxte2pi energy=2.0,10.0 give the same limits for the 2–10 keV band:
PI value for EP-FXT at 2.0 keV: 274
PI value for EP-FXT at 10.0 keV: 925
Use filter pha_cutoff 274 925 for the image or light curve. Event-based imaging can also use the calibrated ENG column. Extract spectra over the full PI range so that their channels match the response matrix. Time filtering. There are three ways to set the time filter in XSELECT: select an interval with filter time cursor, enter its start and stop with filter time UT, filter time SCC, or filter time MJD, or select intervals from a GTI file with filter time file filename. The default time resolution of the light curve is 1 second. Method 1: FXTSoft light-curve background correction (recommended). For source and background light curves extracted with identical time filters and bin sizes, the official fxtlccorr task creates the background-corrected net light curve:
With alpha=AUTO, a unique matching record in scaling_manifest is used when that file is supplied; otherwise the input BACKSCAL and EXPOSURE values determine the scale. A numeric alpha can also be supplied. The input bins must align exactly: fxtlccorr does not interpolate or rebin and does not apply exposure or vignetting correction. Method 2: HEASoft light-curve arithmetic. The external lcmath task provides the corresponding generic arithmetic route when its scaling parameters are set explicitly. The following FF session extracts source and background spectra over the full channel range, then applies the 2–10 keV channel selection to both light curves.
xselect
> Enter session name >[xsl]
xsl > read event fxta-clean.fits
> Enter the Event file dir >[./]
> Reset the mission ? >[yes]
xsl:EP-FXTA-FF > extract all
xsl:EP-FXTA-FF > plot image
xsl:EP-FXTA-FF > filter region source.reg
xsl:EP-FXTA-FF > extract spectrum
xsl:EP-FXTA-FF > save spectrum source.pha
xsl:EP-FXTA-FF > clear region
xsl:EP-FXTA-FF > filter region back.reg
xsl:EP-FXTA-FF > extract spectrum
xsl:EP-FXTA-FF > save spectrum back.pha
xsl:EP-FXTA-FF > clear region
xsl:EP-FXTA-FF > filter region source.reg
xsl:EP-FXTA-FF > filter pha_cutoff 274 925
xsl:EP-FXTA-FF > extract curve
xsl:EP-FXTA-FF > save curve source.lc
xsl:EP-FXTA-FF > clear region
xsl:EP-FXTA-FF > filter region back.reg
xsl:EP-FXTA-FF > extract curve
xsl:EP-FXTA-FF > save curve back.lc
xsl:EP-FXTA-FF > exit
> Save this session? >[no]
Earth contamination can cause sharp count-rate increases near GTI boundaries. Inspect these intervals and exclude affected times from the analysis.
Figure 2: FF image with source (green circle) and background (cyan circle) regions.Figure 3: Light curve extracted from the FF source region.
Pile-up estimation Point sources with a count rate above the critical value produce severe pile-up in the central region of the Point Spread Function (PSF). In this case, there is a significant probability that two or more soft X-ray photons are registered as a single higher-energy photon (i.e. energy pile-up) of higher pattern type (i.e. pattern pile-up). A quick estimate can be obtained with the online simulation tool (Filter & Window Mode Evaluation(https://epfxt.ihep.ac.cn/simulation)). Two complementary imaging-mode checks are documented below: pattern migration, similar to the method used for XMM-Newton EPIC data(https://www.cosmos.esa.int/web/xmm-newton/sas-thread-epatplot), and photon loss inferred from the observed PSF shape, similar to the Swift/XRT procedure(https://www.swift.ac.uk/analysis/xrt/pileup.php).
Pattern-migration method. Apply the task fxtplotgrade on the filtered source event file, source.evt, to inspect the observed versus expected pattern distribution. The default display-only form does not save a PNG:
fxtplotgrade evtfile=source.evt show=yes
Omitting outfile (or using outfile=NONE) suppresses PNG output for that invocation, even if PFILES contains a learned output name. To save a PNG, specify the output file explicitly:
The second positional form fxtplotgrade evtfile.fits grade also saves the plot as grade.png. The figure plots grade fractions as a function of event energy. Reference curves follow the last recognizable processing version in the EVENTSHISTORY cards, in append order: T18V1 for legacy processing and T18V2 for current processing. If HISTORY has no recognizable version, T18V2 is used. The selected reference must be available in CALDB or its matching .dat file. Figure 4 shows an example of observation affected by pile-up. In order to reduce pile-up, the filtered event file is extracted from an annular region. As can be seen in Figure 5, the pile-up effect becomes negligible after excising the core of the PSF. Figure 4: Pattern distribution from fxtplotgrade, showing pile-up.Figure 5: Pattern distribution after excluding the bright core; the pile-up signature is negligible.
PSF-shape method. This method compares the observed radial profile with a model fitted to the unaffected outer wings. For the FXTA example below, copy the detector-specific XIMAGE model pair, fxta_psf_2beta.dat and fxta_psf_2beta.cod, from CALDB with fxtpsfmdcopy model=2beta det=fxta. The 2beta model is the default; this example requires the matching detector model pair in the installed CALDB. The model choice is written explicitly so that it can be checked against the observed profile. For FXTB, use det=fxtb, DETNAM=FXTB, and the corresponding fxtb_psf_2beta.dat/fxtb_psf_2beta.cod files. The installed fxtpsf command is a deprecated compatibility alias that uses the same implementation and parameter file as fxtpsfmdcopy. It emits a deprecation warning on every invocation and will be removed in a future release; use fxtpsfmdcopy in all new procedures.
fxtpsfmdcopy model=2beta det=fxta outdir=. clobber=yes
ximage
> CHMDB/ADD/TEL=EP/INST=FXT/DETNAM=FXTA/KEY=psffile/VALUE=fxta_psf_2beta.dat
> read fxta-clean.fits
> cpd /xtk
> disp
> back
> psf/cursor
> col off 1 2 3 4 6
> rescale x 30
> model fxta_psf_2beta.cod
> fit
> rescale
> p
Figure 6: The PSF plot. The model and data diverge below about 20 arcsec. The software XIMAGE is called to read and plot the filtered event or image file generated by XSELECT. The mean background level (counts per pixel) over the entire image is estimated with the task back. The user should zoom into the source of interest, run the command psf/cursor, click in the centre of the source and where the PSF fades into the background. This opens an interactive plot window with panels showing both the Encircled Energy Function and the PSF. Run col off 1 2 3 4 6 to turn off all datasets except the cyan points, which are then fitted by the PSF model. Because pile-up mostly affects the PSF centre, fit the model to the outer wings and extrapolate it inward to determine where the data and model diverge (Figure 6). This estimates the size of the bright core that should be excluded.
Both methods are applicable to imaging-mode (FF and PW) data. The loss of counts caused by using an annulus can be estimated with the PSF correction by setting psfcor=1 in fxtarfgen when generating the Ancillary Response File.
fxtexpogen
Generates the exposure map, accounting for detector pixels that did not collect usable data. It requires the event file and the MKF file from the fxt/hk directory. This command generates two exposure maps: one without vignetting correction and one with vignetting correction applied. The exposure map without vignetting correction can be identified by the addition of the field -without_vign in the output file name. In v2.0, fxtexpogen also documents optional effective-area scaling (area_scale=yes) and clustering parameters (use_clustering, ra_threshold, and pa_threshold) that can accelerate long calculations while preserving the exposure-map geometry. Example:
The v2.0 fxtpsfmap task generates a PSF-size map directly from an exposure map for a given energy and enclosed energy fraction (EEF). The output image has the same geometry as the exposure map and records the PSF radius in arcseconds at each position. If the filter is not supplied explicitly, the task can read it from the FITS header. Example:
fxtarfgen This command creates the Ancillary Response File (ARF) for the extracted spectrum, taking into account the exposure map generated by the task fxtexpogen and, when requested, the Point Spread Function (PSF) correction. For a point-like source (extend=0), set psfcor=1 when the selected region does not contain the full PSF, for example for a small or annular region; this correction is not limited to piled-up sources. With extend=0 psfcor=1, the point-source PSF is integrated against the live source-region mask for each exposure or attitude sample, so region and detector losses are PSF- and exposure-weighted. With psfmodel=legacy, the current release uses the CALDB beta model inside about 3 arcmin of the optical axis and tabulated CALDB EEF curves at larger off-axis angles. With psfmodel=dual-beta, it uses the indexed CALDB beta model near the axis and the indexed off-axis two-beta extensions at larger angles. Supplying either model enables PSF correction unless an explicit psfcor value overrides it. If neither psfmodel nor psfcor is supplied, the default model is dual-beta while psfcor=0, so no PSF aperture correction is applied. For extended sources (extend=1), these point-source PSF settings are ignored; see the extended-source guide below. The input exposure map for static ARFs should normally be the file with suffix -without_vign.
creates the Redistribution Matrix Files (RMF) for a given spectrum.
Example:
fxtrmfgen specfile=source.pha outfile=source.rmf
Method 1: HEASoft spectrum grouping. First run fxtarfgen and fxtrmfgen so that ANCRFILE and RESPFILE are present, and ensure that BACKFILE is set when a background spectrum is used. Group the spectrum with the standard HEASoft grppha command:
grppha infile=source.pha outfile=source_grouped.pha \
comm='group min 10 & exit' clobber=yes
Method 2: HEASoft response metadata. The same grppha command can group the spectrum and attach response and background metadata in one step. Associate the source spectrum with its background, RMF, and ARF before fitting in XSPEC. The example groups to at least 10 counts per bin; this is an illustrative grouping choice, not a guarantee that χ2 statistics are appropriate. Choose the grouping and fit statistic for the count level and background treatment (see the XSPEC guidance on low-count spectra).
xspec
>cpd /xw
>data source.pi
>setplot energy
>ignore bad
>ignore 0.0-0.5
>ignore 10.0-**
>show rate
>plot ldata
>model tbabs*powerlaw
>fit 100
>plot ldata del
>flux 0.5 10.0
>quit
TM mode
TM mode provides high time resolution for bright sources. The steps below start from the cleaned event file (fxta-clean.fits):
Extracting light curve & spectrum Use XSELECT's filter command to select energy, region, or time intervals, and clear to remove a filter. Create products with extract and write them with save. Event grades. Use grades 0–12 for the standard selection, or apply a grade selection appropriate to the analysis. Region filtering. Extract an image from the event file read in xselect with extract image. Plot the image with plot image, which invokes ds9. TM mode preserves only one imaging dimension. A rectangular box about 3 arcmin long and 1 arcmin wide can be used for the source, with a source-free rectangle of the same width for the background. Find the observation roll angle in the event-file header as PA_PNT, or as 270∘-PA_PNT. Do not use a circle or annulus for TM extraction. Create both region files with ds9 and apply them in xselect with filter region source.reg. The default light-curve time resolution is 1 second; higher resolutions are also available. Method 1: FXTSoft light-curve background correction (recommended). For source and background light curves extracted with identical time filters and bin sizes, the official fxtlccorr task creates the background-corrected net light curve:
With alpha=AUTO, a unique matching record in scaling_manifest is used when that file is supplied; otherwise the input BACKSCAL and EXPOSURE values determine the scale. A numeric alpha can also be supplied. The input bins must align exactly: fxtlccorr does not interpolate or rebin and does not apply exposure or vignetting correction. Method 2: HEASoft light-curve arithmetic. The external lcmath task provides the corresponding generic arithmetic route when its scaling parameters are set explicitly. Energy filtering. For the 0.5–2.5 keV light curves in this example, fxte2pi 0.5 2.5 returns:
PI value for EP-FXT at 0.5 keV: 73
PI value for EP-FXT at 2.5 keV: 328
Apply filter pha_cutoff 73 328 to both light curves after extracting the spectra over the full PI range. Time filtering. There are three ways to set the time filter in XSELECT: select an interval with filter time cursor, enter its start and stop with filter time UT, filter time SCC, or filter time MJD, or select intervals from a GTI file with filter time file filename. The following session also saves the source-region event file for barycentric correction.
xselect
> Enter session name >[xsl]
xsl > read event fxta-clean.fits
> Enter the Event file dir >[./]
> Reset the mission ? >[yes]
xsl:EP-FXTA-TM > set datamode TM
xsl:EP-FXTA-TM > extract all
xsl:EP-FXTA-TM > plot image
xsl:EP-FXTA-TM > filter region source.reg
xsl:EP-FXTA-TM > extract events copyall=yes
xsl:EP-FXTA-TM > save events fxta-source.evt
xsl:EP-FXTA-TM > extract spectrum
xsl:EP-FXTA-TM > save spectrum source.pha
xsl:EP-FXTA-TM > clear region
xsl:EP-FXTA-TM > filter region back.reg
xsl:EP-FXTA-TM > extract spectrum
xsl:EP-FXTA-TM > save spectrum back.pha
xsl:EP-FXTA-TM > clear region
xsl:EP-FXTA-TM > filter region source.reg
xsl:EP-FXTA-TM > filter pha_cutoff 73 328
xsl:EP-FXTA-TM > extract curve
xsl:EP-FXTA-TM > save curve source.lc
xsl:EP-FXTA-TM > clear region
xsl:EP-FXTA-TM > filter region back.reg
xsl:EP-FXTA-TM > extract curve
xsl:EP-FXTA-TM > save curve back.lc
xsl:EP-FXTA-TM > exit
> Save this session? >[no]
Figure 7: TM image with source (green rectangle) and background (cyan rectangle) regions.Figure 8: Light curve of the TM field.
fxtexpogen
Generates the exposure map from the event file and the MKF file in fxt/hk, accounting for detector pixels that did not collect usable data. Example:
PSF correction is not available for TM data. Keep psfcor=0 in this mode.
fxtrmfgen
creates the Redistribution Matrix Files (RMF) for a given spectrum. Example:
fxtrmfgen specfile=source.pha outfile=source.rmf
Associate the source spectrum with its background, RMF, and ARF before fitting in XSPEC. The example groups to at least 10 counts per bin; this is an illustrative grouping choice, not a guarantee that χ2 statistics are appropriate. Choose the grouping and fit statistic for the count level and background treatment (see the XSPEC guidance on low-count spectra).
fxtbary
applies barycenter correction to FXT event data files before a precise timing analysis. Example:
FXT's 1° field of view and low instrumental background support observations of diffuse objects, including supernova remnants, superbubbles, Galactic plasma, nearby galaxies, and galaxy clusters. Extended sources often have low surface brightness and may span several pointings. Their images require pixel masking and exposure corrections before scientific analysis. This section covers image extraction, masking, vignetting correction, and, when needed, smoothing and mosaics.
FXTSoft provides image extraction and arithmetic through fxtimage, exposure maps through fxtexpogen, and reprojection and mosaics through fxtimgmerge. The examples below pair these tools with HEASoft/FTOOLS alternatives. CIAO(https://cxc.cfa.harvard.edu/ciao/) and Astropy(https://www.astropy.org) provide additional image-analysis tools.
Analysis methods. In this section, Method 1 uses FXTSoft 2.0 tools and Method 2 uses HEASoft/FTOOLS. Both use the same screened event and exposure products. Starting from a clean event file, Method 1 proceeds as follows:
Extract the count image with fxtimage mode=bin.
Create the exposure maps with fxtexpogen.
Create the OoT event list with fxtootest and bin it with fxtimage mode=bin.
Subtract the OoT image with fxtimage mode=oot.
Build the particle spectrum and image with fxtbkggen and fxtbkgmap.
Subtract the particle image with fxtimage mode=sub.
Run fxtimage mode=rate on the net-count image for exposure thresholding, masking, and rate calculation.
The same scientific order applies to Method 2; only the image arithmetic and threshold commands differ. The dedicated background and mosaic tasks are retained because fxtimage does not replace background modeling or cross-observation reprojection.
Image extraction
An X-ray event file lists the arrival time, detector position, energy information, and grade of each recorded event. An image is a two-dimensional histogram of the selected events. FXT provides three coordinate pairs: RAWX/RAWY in detector readout coordinates, DETX/DETY in detector coordinates, and X/Y in sky coordinates. Each module has one CCD, and the RAW and DET coordinates differ by one pixel in their origins:
DETX = RAWX + 1; DETY = RAWY + 1.
The SKY plane maps X and Y to equatorial coordinates and is normally used for science images. The RAW/DET plane has 384×384 pixels; the default SKY image has 600×600 pixels, each subtending approximately 9.66″. Figure 9 compares the coordinate planes.
Figure 9: M87 first-light images: FXTA (left) and FXTB (right), in SKY (top) and RAW/DET (bottom) coordinates. Bad pixels are masked.
Start from the screened event file for each FXT module. Use ENG, the event energy in keV, to select an imaging band; use PI rather than ENG when extracting a spectrum. The examples below extract a 0.4–7.0 keV count image from fxta-clean.fits. Method 1 (FXTSoft 2.0). The fxtimage task bins the filtered events directly:
Method 2 (original HEASoft/FTOOLS route). The original ftcopy command is retained for users who want to inspect the binning expression explicitly(https://heasarc.gsfc.nasa.gov/lheasoft/ftools/ftools_subpacks.html):
Images can also be extracted interactively with XSELECT and displayed in SAOImage DS9.
Exposure map: pixel masking and vignetting correction
An exposure map records the usable exposure at each sky pixel, including pointing motion, pixel masks, and optionally vignetting. Dividing a count image by the matching exposure map corrects these spatial variations. With area_scale=yes, the map also includes effective area and has units of cm2 s rather than seconds; the resulting rate units are described below.
Pixel masking
Detector defects and edge effects can distort an image. Mask the affected pixels in both the event selection and exposure calculation. The main cases are:
Bad pixels: The calibration includes one bad column in FXTA and several bad pixels in both modules. fxtbadpix flags the affected locations and records them in a FITS extension. Bad pixels also affect reconstructed 3×3 event islands in their neighborhood, extending the flagged region by two pixels. The screened event file produced by fxtchain excludes these events.
Detector edge: The readout electronics do not record events at RAWX=0 or RAWX=383. Event reconstruction can overestimate counts at RAWX=1, 382 and RAWY=0, 383 (Figure 9). Incomplete 3×3 event islands also affect grades in the two adjacent rows or columns; mask these edge regions.
Shading: A light-blocking board protects the frame-store area but also shades nearby detector pixels. In both modules the effective area begins to decrease around RAWY≈20 and is almost zero at RAWY=1 (bottom panels of Figure 9). The workflow below masks this region with edgecovermask.
Vignetting correction
The effective area generally decreases away from the optical axis, with an energy-dependent change called vignetting. A matching exposure map accounts for this variation when converting the count image to a rate image.
Common exposure-map step. By default, the CCD edge and bad pixels are automatically masked and exposure maps with and without vignetting correction (filename with a suffix “-without_vign”) are created at the same time. Such an example is Figure 10. Applying the parameter edgecovermask, pixels with RAWY<20 affected by the shading, and two rows/columns on the detector edge will be masked in the exposure map as well. The exposure map can be created by the script fxtexpogen with a given effective area:
In v2.0, the parameter area_scale can be used to multiply the on-axis effective area into the exposure map if it is set as “yes”. This changes the unit of the exposure map from “s” to “cm2 s”, and also takes the difference in the effective area between FXTA and FXTB into consideration. For long observations, fxtexpogen can also speed up the calculation by grouping similar attitudes with use_clustering=yes; the parameters ra_threshold and pa_threshold control the clustering tolerance.
Method 1: FXTSoft workflow (recommended). For routine vignetting correction, the official FXTSoft task fxtimage uses the existing count or net-count image and exposure map from the common exposure-map step; it does not replace fxtexpogen. Set mode=rate to write the rate image together with thresholded count, exposure, and mask products:
If OoT or particle-background subtraction was skipped, the raw count image fxta-0.4-7.0-cts.fits can be supplied as imgfile instead. Run this rate step only after all required count-space subtraction.
Method 2: explicit FTOOLS workflow. The commands below apply the same 15% exposure threshold and show each intermediate product. Use the net-count image after the required background subtractions, or substitute the raw count image if those subtractions were skipped.
Dividing the count map by the exposure map produces a vignetting-corrected count rate map. Both methods preserve the same exposure-unit convention: an exposure map in seconds gives count/s, while area_scale=yes gives an area-time exposure and count/(cm**2*s). If the exposure-map file is present but its BUNIT is missing or blank, the FXTSoft method treats it as seconds, emits a warning, and writes a HISTORY record. It rejects scaled or otherwise unsupported BUNIT values and does not process a missing exposure-map file.
The edge depressions in the unvignetted exposure maps (Figure 10) reflect pointing motion. The modules have different effective areas and vignetting profiles.
Figure 10: Exposure maps at 4 keV: FXTA (top) and FXTB (bottom), without (left) and with (right) vignetting. Bad pixels are masked.
Background Noise
Instrumental background, stray light, and OoT events contaminate the recorded image. They require different treatments: model the components supported by the tools below, and exclude regions where the residual contamination makes the intended analysis unreliable.
OoT events
Photons arriving during CCD readout are assigned incorrect RAWY positions. In Full Frame mode, the readout lasts about 0.1152 ms and OoT events account for about 0.23% of the recorded events (see FXT Modes). A bright source can therefore produce a trail along its detector columns. Where observation planning permits, choose a roll angle that keeps the diffuse target away from those columns. Generate a modeled OoT event list with fxtootest; this step is common to both routes:
Method 2 (original HEASoft/FTOOLS route). Use the same SKY bin edges as the count image so that the two inputs to ftimgcalc have identical image geometry.
On a common grid, fxtimage mode=sub with bscale=0.0023 gives the same numerical subtraction. Use mode=oot to retain the OoT-specific alignment handling and output history. Subtract OoT counts before applying vignetting correction.
OoT events are modeled, not identified individually. Avoid spectroscopy of an extended source strongly contaminated by a nearby source's OoT trail: subtracting a modeled spectrum does not fully account for the associated uncertainties.
Pile-up introduces another uncertainty. The simulated OoT list is derived from the observed events, which may already be piled up, whereas the short readout interval makes the actual OoT events much less affected. The simulation can then underestimate the OoT count rate. Image subtraction does not remove this limitation for spectroscopy of a contaminated diffuse source.
In the upper panels of Figure 11, the arcs may be stray light, and some residuals may be caused by pile-up.
Figure 11: Raw counts, simulated OoT counts, and OoT-subtracted images (left to right), for a point source (top) and an extended source (bottom).
Stray light
FXT normally focuses photons after two mirror reflections, but photons from a bright source outside the field can reach the detector after a single reflection. The resulting stray light can form arcs or knots across the image (Figure 12), even when the source lies several degrees away. Exclude affected regions, especially for spectroscopy; the current workflow does not provide a reliable stray-light subtraction model.
Figure 12: Smoothed 0.4–7.0 keV images of stray light from the off-field Crab Nebula. The arcs and knots are not celestial sources.
Instrument background
The instrumental background has a relatively flat spectrum, particularly above 2 keV, and can dominate faint diffuse emission. Its roughly uniform detector distribution becomes artificially brighter near the edges after vignetting correction if it is not subtracted first (Figure 13). The updated CALDB v2.0 package will also provide blank-sky reference observations in its root bkg/ directory for background studies. The fxtbkggen workflow below estimates the instrumental particle background from FSA spectra using the calibration templates under bcf/bkgmodel/. The complete CALDB package includes blank-sky reference observations in data/ep/fxt/bcf/bkg/blanksky.tar.gz. To estimate the instrumental background for the observation itself, use each module's FSA data with fxtbkggen:
fxtbkggen infile=fxta_fsa.pi outfile=fxta_bkg.pi
The spectrum can be converted into a particle-background image with fxtbkgmap using the non-vignetted exposure map produced by fxtexpogen:
fxtimage only performs arithmetic subtraction using an existing particle map; it does not replace fxtbkggen/fxtbkgmap particle-spectrum and particle-map modeling. Particle subtraction precedes vignetting correction. The non-vignetted exposure map is used only to construct the particle map; apply the vignetting-corrected exposure map later to the net counts.
Figure 13: Vignetting-corrected blank field before instrumental-background subtraction.
Smoothing
Smoothing can make extended-source structure easier to see. Use smoothed images for display, not for quantitative analysis. Method 1 (FXTSoft 2.0).
Method 2 (original HEASoft workflow). HEASoft provides the scripts fgauss, fboxcar, and fadapt. The first two smooth the picture on a fixed scale while the latter applies adaptive smoothing. The native fxtimage route covers fixed-kernel Gaussian and box smoothing; fadapt remains an external adaptive option and is not equivalent to the native fixed-kernel operations.
RGB image
To check the photon distribution in different energy ranges, we can assign different colors to the photons of different energies for easy viewing. Here we withdraw three images from different band ranges: 0.3-1 keV as the soft band, 1-3 keV as the middle band, while 3-5 keV as the hard band.
Method 1: FXTSoft band extraction. The official fxtimage task can create the three band images directly from the cleaned event file:
Method 2: XSELECT band extraction. Extract the same soft, middle, and hard bands with XSELECT. The command fxte2pi 0.3 1.0 3.0 5.0 gives PI limits 38, 150, 378, and 560 for the following example; do not assume a fixed 10 eV channel width.
xselect
> Enter session name >[EP] EP # session name, will be the prefix of later output
> set datadir .
> read events evt-a-cl.fits
> set datamode FF/PW/TM # when the mode are not recognized correctly.
> filter time file gti.fits
> set binsize 1.
> filter pha_cutoff 38 150
> extract image xysize=601 xybinsize=1 xcenter=300.5 ycenter=300.5 copyall=yes
> save image evt_soft.im
> clear pha_cutoff
> filter pha_cutoff 150 378
> extract image xysize=601 xybinsize=1 xcenter=300.5 ycenter=300.5 copyall=yes
> save image evt_mid.im
> clear pha_cutoff
> filter pha_cutoff 378 560
> extract image xysize=601 xybinsize=1 xcenter=300.5 ycenter=300.5 copyall=yes
> save image evt_hard.im
> quit
With the images of different bands, a false-color image can be created by either route.
Figure 14 shows a three-color, vignetting-corrected, adaptively smoothed M87 image from four observations with different filters. Count rates depend on effective area, so combining modules or filters without matching exposure corrections can leave artifacts near the FXTA bad column or the detector edges. Stacking can improve the signal-to-noise ratio when the images and exposure maps are combined consistently. The faint patterns at the lower left and lower right may reflect differences between the modules' effective areas.
Figure 14: M87 first-light image, vignetting-corrected, stacked, and adaptively smoothed. Red: 0.4–0.7 keV; green: 0.7–1.1 keV; blue: 1.1–2.3 keV. The color scale is logarithmic.
Mosaic
Usually, more than one observation would be mosaicked or stacked to extend the imaging area or raise the signal-to-noise ratio. Method 1 (FXTSoft 2.0). The fxtimgmerge task places multiple count images and their matching exposure maps on a common sky WCS, sums each product, and can optionally write the merged count-rate image. The image and exposure-map lists must use the same order and energy band. For example, FXT-A and FXT-B can be combined with:
Effective area differs between filters and modules, so the same source can have different count rates. Generate every input exposure map with fxtexpogen using the same area_scale setting and the same exposure-unit convention; fxtimgmerge rejects mixed conventions. Use area_scale=yes to include the on-axis effective area when combining modules or filters. The outrateimg BUNIT is count/s for exposure maps in seconds and count/(cm**2*s) for maps in cm2 s. Only the latter is an effective-area-normalized rate.
Method 2 (original CIAO workflow). If CIAO is preferred, its reproject_image_grid task can reproject and combine images on a common sky grid. Use method=sum for count images (and count-based background maps, if needed) and method=average for exposure maps when regridding. Reproject and combine the count images separately from the exposure maps before calculating the merged count-rate image:
rate=(Σ cts-Σ bkg)/(Σ exp)
The count or net-count images and the exposure maps are merged separately before division. The fxtimage task does not replace fxtimgmerge for construction of a cross-observation common WCS, reprojection, and merging.
Point-source detection and masking
Point sources should be identified before quantitative analysis of diffuse emission.
Method 1: FXTSoft point-source detection. The official FXTSoft task fxtsrcdet accepts a counts image and its matching exposure map, and writes a FITS source table, a DS9 region file, and a significance map. For the 0.4–7.0 keV images created above, a basic point-source run is:
Method 2: CIAO point-source detection. An external alternative is the official CIAO wavdetect task, which can be used when a CIAO-compatible wavelet workflow is required:
Figure 15 uses 3C 273 observation 13600005907: FXTB in Full Frame (FF) mode, filter 02, 0.4–7.0 keV, and a nominal exposure of 2205.2 s. With srcclass=point and sigcalfile=AUTO, the catalogue contains 13 candidate detections.
The ellipses use the source-table fields X, Y, R, and ROTANG; the corresponding DS9 region file is a public output. The nearest detection to the target is SRC_ID 7, with an offset of about 3.2′′ and significance 128.4944. These are detection diagnostics, not an independent astrometric calibration.
Figure 15: fxtsrcdet detections in 3C 273. Ellipses mark candidate sources; the red cross marks the detection nearest the target. The right panel lists the eight highest-significance detections.
The value sigcalfile=AUTO requires a matching SRCDETSIGCAL entry in the configured FXT CALDB and fails if it is unavailable. Use sigcalfile=CIAO only for an explicit CIAO comparison. Inspect the source table, significance map, and DS9 regions together before masking: compact features embedded in structured diffuse emission can require manual adjustment. The reviewed point-source regions can then be excluded consistently from count and background products before smoothing, mosaicking, or measuring the extended emission. Point-source fluxes can be estimated with the extraction and response methods described in the Point source section.
Method 1: FXTSoft source masking and filling. After reviewing the source table and regions, the official fxtregmaskfill task can create source and valid-analysis masks and fill the masked regions with a local Poisson estimate:
The fxtregmaskfill task does not support excluded DS9 regions. Its Poisson fill is stochastic, so the result is not expected to be byte-identical to CIAO. In structured diffuse emission, detections and the final masking regions still require manual review.
Spectral analysis
For extended-source spectra, use the explicit DS9/XSELECT response workflow below. Select the source and background regions with DS9/XSELECT, generate the extended-source ARF with fxtarfgen extend=1, create the RMF with fxtrmfgen, and use grppha to attach response metadata and group the spectrum.
Spectra extraction
Select the source and background regions in DS9 and save them as source.reg and bck.reg. Use these files to extract the spectra in XSELECT. Caution: do not apply an energy-channel filter during spectrum extraction. Retain the full channel range so that the spectrum matches its response files.
xselect
> Enter session name >[EP] EP # session name, will be the prefix of later output
> set datadir .
> read events evt-a-cl.fits
> set datamode FF/PW/TM # when the mode are not recognized correctly.
> filter time file gti.fits
> filter region source.reg
> extract spectrum
> save spectrum fxta.pi
> clear region
> filter region bck.reg
> extract spectrum
> save spectrum fxta_bck.pi
> quit
Response file generation
Then we can calculate the corresponding Ancillary Response File (ARF) with the command fxtarfgen. For an extended-source spectrum, the response must use the same extraction aperture as the input PHA and an explicit brightness assumption. The baseline below retains the default uniform-brightness model:
Each variant below starts from a separate PHA copy because fxtarfgen updates the supplied PHA's ANCRFILE; do not run morphology comparisons sequentially against one PHA.
Reuse exactly the region used to extract fxta.pi, including excluded holes. If the PHA contains the matching FITS REGION, an explicit regfile is not needed; do not replace an irregular region by an area-equivalent circle. The static expfile has a different role from a source-brightness image: for aspcor=0 it should be the no-vignetting exposure map (for example, the -without_vign product with VIGNAPP=F), because fxtarfgen applies vignetting itself. A vignetting-corrected image used to estimate morphology is not an expfile. Products carrying MERGED=T or ASPREQ=T force attitude weighting; this static expfile recipe does not disable it. For merged inputs, follow the response-context and merge instructions in the fxtarfgen help.
The current fxtarfgen also accepts the supported headerless CIAO/DS9 region convention. Sexagesimal positions or explicit h/d units are inferred as celestial FK5/J2000, whereas plain numeric positions retain the physical-coordinate default. Add an explicit fk5 or icrs directive when the frame matters, and include angular units on sizes for inferred sky regions. This is a supported subset of CIAO/DS9 syntax, not a general region-language implementation.
Choosing the spatial model. srcmodel=uniform is the default assumption, appropriate when the source brightness is approximately constant across the selected aperture. A circular gaussian can describe a smooth, centrally concentrated source; a beta profile has a core and longer outer tail. These are assumptions to check against imaging, not automatic choices based on the object name. The gaussian and beta models require positive, finite, explicitly selected widths; there is no universal 30 or 60 arcsec value, and fxtarfgen does not fit a width. Every number in the examples below is illustrative, not a best-fit result for A1795 or any other particular observation.
For a Gaussian, srcsigma is the intrinsic-model standard deviation in arcsec: srcsigma=FWHM/2.35482. Thus an illustrative intrinsic FWHM of 120 arcsec gives srcsigma=50.9593. Estimate the morphology first, with background, exposure, vignetting, and PSF blurring accounted for; a width measured directly from a raw counts image is not necessarily an intrinsic width.
For a beta model, srcrc is the core radius in arcsec and the profile is fixed to S(r)=S0*[1+(r/srcrc)**2]**(-1.5), corresponding to beta=2/3. There is no free beta-index parameter. A core radius fitted with a different beta in the literature is therefore not interchangeable with srcrc.
For Gaussian and beta models, supply both srcx and srcy as positive FITS 1-based coordinates in the original FXT SKY/physical pixel system to set the brightness center. These are not RA/Dec in degrees or cropped-image array indices. With both left at -1, an included POLYGON uses the PHA SPECTRUM RA_PNT/DEC_PNT, converted through the PHA celestial/physical WCS. This default is the observation pointing, not a measured brightness peak or the cropped image center. Missing or invalid pointing coordinates require manual center values; other observation metadata required by ARF generation must still be valid.
Without an included polygon, the center is derived from the region; an exclusion-only polygon does not trigger the pointing default. The uniform model and image-model WCS behavior are unchanged, and the PHA extraction region still determines which sky pixels enter the ARF. For an included polygon in source.reg, the examples above use the pointing default. To override it, append, for example, srcx=280.5 srcy=310.5, replacing these illustrative values with the actual center.
Irregular morphology and image templates. Use srcmodel=image when a circular Gaussian or beta profile is not defensible. Fit a source-only morphology after accounting for background, exposure, vignetting, and PSF effects; for an irregular or complex source, a nonnegative fitted template is preferable to a raw-count image. The srcmap input must be a celestial-WCS FITS image of finite, nonnegative relative source flux PER PIXEL. It is source brightness only, not raw counts, a background image, an exposure map, or a net-count image with negative pixels. Negative net-count pixels are not silently clipped. Bad-pixel or no-exposure holes are not evidence that the intrinsic source brightness is zero; model those regions rather than encoding an unjustified zero. The map must cover the modeled aperture, since pixels outside the map have zero brightness.
All current extend=1 modes use one energy-independent brightness template, normalize it over the selected extraction aperture, and keep point-source PSF correction disabled. Nonuniform-model ARFs record SRCNORM=APERTURE. No full extended-source PSF convolution is applied: small holes, narrow annuli, and compact structures are not repaired by an EEF/PSF factor, and no total flux is extrapolated into excluded subregions or outside the aperture. Multiplying every map pixel by the same positive amplitude does not change the normalized ARF.
Cutoff and sensitivity checks. srccut is a dimensionless cutoff multiple, with default 5. The cutoff radius in arcsec is srccut*srcsigma for a Gaussian or srccut*srcrc for a beta model. Choose srccut so that the intended emission reaches the aperture edge; the beta profile has a longer tail. The Gaussian example above reaches about 407.7 arcsec. For illustration, srcrc=60 srccut=8 reaches 480 arcsec while an independently selected extraction region might extend only 300 arcsec. These are analysis choices, not measurements of A1795. Vary widths over the imaging confidence range and other defensible morphology choices, then compare the ARFs in the fitted energy band and compare the resulting spectral parameters or fluxes. Make a copy of the input PHA before each comparison because fxtarfgen updates its ANCRFILE. There is no universal fixed pass threshold; report the sensitivity and the reason for the adopted model.
Related tutorials. The following official eROSITA materials are useful method references, not claims of instrument equality or full eSASS-algorithm equivalence: the eSASS cookbook, Section 2.10 (where exttype=TOPHAT extpars=60 specifies a 60-arcsec disk outer radius, not a Gaussian sigma or beta core radius); the eSASS srctool manual, “extpars”, “Extended source handling”, and “Examples”; and the Jeremy Sanders MPE lecture, pp. 24–30 and p. 38, which summarizes forward modeling, source models, and MAP use for bright nearby systems with PSF convolution disabled. Use the FXT parameter names and normalization rules above when running fxtarfgen.
The RMF files could be generated with the command fxtrmfgen
For another morphology, replace the uniform PHA, ARF, and RMF filenames below with the corresponding paired files. We could then link the spectrum and its response files with the command grppha as below.