Subsections


7. Xtend Data Analysis


7.1 Introduction

Xtend inherits data processing architecture from Suzaku XIS. It also has a fundamental data structure similar to other imaging (i.e., non-grating) X-ray CCD instruments, such as Chandra ACIS or XMM-Newton EPIC. Users with experience in X-ray CCD data analysis should be able to analyze Xtend data quickly. One notable difference from the ACIS or EPIC data is that Xtend images show zero-count charge injection rows at regular intervals. Suzaku XISs also used the same technique for observations after 2006, but Xtend images shows these lines more clearly because the satellite attitude is remarkably stable. The Xtend software is designed to automatically account for an efficiency deficit with these rows as well as dead columns or pixels for spectral analysis. This feature alleviates users' burden of managing these aspects in their analysis, allowing them to focus on the core tasks.

The X-ray event detection method does not work when two or more X-ray photons fall in 3$\times$3 pixels in a single exposure. Such events, called photon pileups, distort X-ray detection and energy estimates, which is problematic for the flux and spectral measurements. We consider observations with significant photon pileups Xtend Bright source observations. When Xtend observes a point source with a count rate of $\sim$6.3 cts s$^{-1}$ in the full window mode, about 10% of photons suffer pileups. This threshold is higher when an observation chooses a different CCD mode with a short frame exposure time, so Xtend bright source depends on the CCD observing mode (see Section 6.3.1 in POG). We briefly describe how to analyze photon pileup data in Section 7.7.1.

We strongly encourage users to familiarize themselves with the Xtend detector properties described in Chapter 6 in POG. There are ongoing efforts on the detector response calibration, so please check Section 2 and the XRISM web page for the latest information.


7.2 Cleaned Event File Content

Since the N132D observation (ObsID: 000126000) chose the full window mode for all four CCDs, the pipeline creates one cleaned event file in the xtend/event_cl directory.

xa000126000 xtd_p030000010_cl.evt

Another N132D first light observation (ObsID: 000128000) chose the 1/8 window mode for CCD_ID = 1 & 2, so the pipeline creates one cleaned event file for each observing mode, for a total of two cleaned event files.

xa000128000 xtd_p031100010_cl.evt (CCD_ID = 0 & 1)
xa000128000 xtd_p032000010_cl.evt (CCD_ID = 2 & 3)

An observation that uses the window or window/burst option also has two cleaned event files. See Section 4.3 for the file name convention.


7.3 Additional Screening

The cleaned event file should be suitable for any decent science data analysis, but users can play with additional screening to optimize it for the object of interest. We recommend running some processes on a Unix terminal while the others are after loading data into xselect (Section 7.4.2), partly for historical reasons.


Alleviating Cosmic Echo Events

Xselect or Command line/Soft X-ray source analysis/Temporary Measure

A high-signal cosmic ray event produces a pseudo-cross-talk signal in a paired pixel. This echo signal incorrectly decreases the dark level of the pixel, causing non-X-ray signals after the event to rise above the detection threshold. Xtend falsely detects events from the pixel every frame until a daily dark-level initialization. These events show multiple high-count dots in soft band Xtend images, resembling (extreme) frequent flickering pixels. The instrument team is developing a tool to effectively remove these events. In the meantime, we recommend the following measure.

First, these pixels appear mainly on the outer half segments of each CCD chip, so the area near the aiming point is mostly free from these events. Users who analyze the primary target should be able to choose source and background regions without the cosmic echo pixels. Second, these events appear mostly below 0.4 keV and only a fraction up to $\sim$0.6 keV. Users may ignore data below $\sim$0.6 keV unless their interests are in the very soft X-ray band. The following xselect command excludes data below 0.6 keV and extracts data between 0.6$-$10 keV.

xsel> filter pha_cut 100 1665

Third, users can can effectively remove these events with searchflickpix developed for the flickering pixels. See the following section for usage.


Removing Flickering Pixels

Command line/If necessary/Temporary Measure

The flickering pixels occasionally show event signals without actual X-ray or particle events, adding noise to the data (see Section 6.4.3 in POG). The HEASoft tool searchflickpix searches pixels with abnormally high event rates and records the events as flickering pixel events in a file with the ".fpix" extension. The tool xtdflagpix feeds this file and flags the STATUS [10] bit of events detected on a flickering pixel or the STATUS [20] bit detected next to a flickering pixel. The Xtend pipeline is designed to run these tools sequentially to remove the events.

However, the current automated algorithm detects many false positive signals for bright sources, incorrectly removing true X-ray events at the PSF cores. Therefore, the current Xtend pipeline (HEASoft 6.34) runs searchflickpix, but does not remove events using the result. The XRISM team is studying the best method to remove flickering pixels with pipeline processing. Meanwhile, the team introduces a temporary method to eliminate the flickering and cosmic echo events while minimizing false positive events in the appendix of the Quick-Start guide, which can be downloaded from the following web page.

https://heasarc.gsfc.nasa.gov/docs/xrism/analysis/quickstart/index.html


Excluding High Particle Background Periods

Xselect/Depending on source flux or science goal

Particle background in low Earth orbits is roughly inversely correlated to the geomagnetic cut-off rigidity or COR. Excluding low COR intervals may improve the signal-to-noise ratio of relatively faint sources, with a sacrifice of exposure time. If the background contribution is not negligible, users may study the dependence of COR on the signal quality.

The standard screening does not exclude low COR intervals. The HK file, xa000126000 .ehk, collects four different COR values during the observation (COR, COR2, COR3, CORTIME). CORTIME is the latest available table, and should best reflect the COR condition on XRISM orbit. The following command on xselect select only the CORTIME$>$8 interval.

xsel> select mkf "CORTIME.gt.8" mkf_name=xa000126000 .ehk
mkf_dir=path/to/ehk/directory

A caveat is that users cannot use the command's prompt mode for this selection; they must type all the command option on an xselect command line. Typing only xselect> select mkf automatically launches the "FIND MKF" task, which searches for an mkf file in the specified filter file directory. However, the XRISM mkf files (xaOBSID .mkf) do not contain the COR information, so xselect returns an error not finding the COR column.


Applying Barycentric Correction

Command line/Pulse search

With the timing resolution of 0.5$-$4 sec (0.1-sec accuracy for burst mode observations), Xtend is good for searching moderately fast X-ray pulses. For the study, users should convert the event arrival time to the solar system barycenter time system using the following command.

term> barycen xa000126000xtd_p0300000a0_cl.evt
xa000126000xtd_p0300000a0_bc_cl.evt xa000126000.orb 81.2596 -69.6441
orbext=ORBIT

Users must specify the orbext hidden option at ORBIT because the default value, PAR_ORBIT, does not work for XRISM data. Users must set the precise target position in the RA and DEC options to get the best timing information for the target.


Relaxing Screening Criteria

Command line (xapipeline)/Expert use only

If users understand Xtend data well and want to relax the screening criteria in Table 5.2 or extract data under a different condition, they may rescreen data with xapipeline with appropriate options. In this case, a run starting from stage 2 (entry_stage=2) saves processing time (see Section 5.5).


7.4 Extracting Products with Xselect

Xselect is the primary tool for extracting Xtend data products. It can filter events with areas, times, energies, or event flags and use the filtered events to create images, light curve and spectra.


7.4.1 Loading Event Data

Go to the analysis/ directory, start a new xselect session, and read an Xtend cleaned event file with science data:

xsel> read events xa000126000xtd_p0300000a0_cl.evt .

It may ask if the new mission name is XRISM. If so, return for responding yes.

Users can feed multiple event files by connecting event file names with commas. This operation is convenient for making a combined image of different observation modes (e.g., CCD_ID =1&2 with a 1/8 window mode plus CCD_ID = 2&3 with the full window mode). However, it mixes up the GTI information, so users should load event files separately for producing light curves or spectra.


7.4.2 Making Additional Screenings

Type xselect commands in Section 7.3 after loading event data for additional screenings.


7.4.3 Extracting Images

The following commands create a 0.5$-$10 keV SKY image.

xsel> set image sky
xsel> filter pha_cut 83 1665
xsel> extract image
xsel> saoimage

Users can make images in any energy band by changing the filter pha_cut command options. The Energy$-$PI relation is:

PI = 166.7 $\times$ Energy_in_keV

Users can also look up the Energy $-$ PI relation in the EBOUND extension of an Xtend rmf file. To make an image in the DET coordinates, change the first command to

xsel> set image det

To save the image, type:

xsel> save image N132D_xtd_sky_020100.img

Finally, remove the PI filter for the latter analysis if necessary.

xsel> clear pha_cutoff


7.4.4 Defining the Source and Background Regions

Users define source and background regions for extracting light curves and spectra. The easiest way is to use the ds9 image viewer launched internally from xselect or launch ds9 directly on a UNIX command line (see Section 3.3). The arf generator xaarfgen supports the analysis in the SKY coordinates for Xtend, so it would be convenient to define a region in the SKY coordinates.

To define a region on ds9, click the "edit" tab, the "region" tab, and left-click on the image, then, a region shape appears. The default shape is a circle, but users can choose various shapes through the Region $>$ Shape pull-down menu. The shape's size, angle, and other property parameters can be adjusted interactively or from a menu that pops up with clicking the shape. Here, we define a source region with a 1.4 arcmin radius circle centered at the source peak, which includes 80% of photons from a point source (see Figure 4.15 in POG).

To save the region in a file, click the bar Region $>$ Save selection, and choose "format: ds9" and "coordinate System: physical". Then xselect can load the file for a region selection. Check the ds9 web page7.1for the basic ds9 usage. A caveat is that xselect does not recognize the outer FOV boundary, so users must always define a region enclosure. The corresponding background is obtained best from a source-free region near the source. The background-extraction region should be significantly larger than the source region to collect enough statistics. Once users find a good background region, they can save the region file like the source region and feed it to xselect to extract a background light curve or spectrum.

If the source is extended over the Xtend FOV or the data have no appropriate source-free region, the tool xtdnxbgen can estimate non-X-ray background using night Earth observations. See section 7.6 for details.

We here name the extracted source and background regions at N132D_xtd_src.reg and N132D_xtd_bgd.reg, respectively.


7.4.5 Extracting Light Curves

The following example extracts a 500-second bin light curve in the 0.5$-$10 keV band. The "xsel> set binsize" command sets the binning time of the light curve.

First, we extract a source light curve by filtering the source region. Viewing the extracted image with the saoimage command ensures that the region filter is correctly applied. The command "xsel> plot curve" shows the extracted light curve.

xsel> filter pha_cutoff 83 1665
xsel> set binsize 500.0
xsel> filter region N132D_xtd_src.reg
xsel> extr "image curve" (or extr all)
xsel> saoimage
xsel> plot curve

Users can define a time filtering window from the light curve for spectrum or image analysis. Please see section 7.5 in the xselect manual for details.

We can save the source light curve with the following command.

xsel> save curve N132D_xtd_src_b128.lc

We clear the source region filter and make the background region filter to extract a background light curve.

xsel> clear region
xsel> filter region N132D_xtd_bgd.reg
xsel> extr "image curve" (or extr all)
xsel> saoimage
xsel> plot curve
xsel> save curve N132D_xtd_bgd_b128.lc

The FTOOLS lcmath is a handy tool for subtracting the background light curve from the source light curve. The tool requires a scaling factor for the source and background regions. Users can find the areal scales of these regions with the BACKSCAL keyword in spectra extracted from the same regions. Users can make in-depth light curve analysis using Xanadu tools such as lcurve.

Finally, remove the PI and region filter for further reduction if necessary.

xsel> clear pha_cutoff
xsel> clear region


7.4.6 Extracting Spectra

The following example extracts Xtend source and background spectra. Again, we recommend viewing the image to check if the region filter is correctly applied.

xsel> filter region N132D_xtd_src.reg
xsel> extr "image curve"
xsel> saoimage
xsel> save spec N132D_xtd_src.pi

We clear the region filter and make the background region filter to extract a background spectrum.

xsel> clear region
xsel> filter region N132D_xtd_bgd.reg
xsel> extr "image curve"
xsel> saoimage
xsel> save spec N132D_xtd_bgd.pi

Users who want to perform time-resolved spectral analysis load a time filter before extracting a spectrum.

xsel> filter time file N132D_xtd_sn.fits

They may keep the time filter made with the light curve analysis. See the xselect time filter manual for details.

Check that the BACKSCAL values in the source and background spectral files are consistent with the ratio of the source and background regions. Use fv to see the header keyword values, or fkeyprint and type,

term> fkeyprint N132D_xtd_src.pi BACKSCAL

to show the BACKSCAL value.


7.5 Generating Response Files


7.5.1 Making an RMF file

The HEASoft XRISM tool, xtdrmf, generates Xtend rmf files. Here is a command example.

term> punlearn xtdrmf
term> xtdrmf N132D_xtd_src.pi N132D_xtd_src.rmf


7.5.2 Make an ARF file

This process is the same as the Resolve arf generation, except for a few differences. Users first make an exposure map with xaexpmap.

term> punlearn xaexpmap
term> xaexpmap ehkfile=xa000126000.ehk gtifile=xa000126000xtd_p030000010_cl.evt
pixgtifile=NONE instrume=XTEND badimgfile=xa000126000xtd_p030000010.bimg
outfile=N132D_xtd.expo outmaptype=EXPOSURE delta=20.0 numphi=1

The second step is to calculate the effective X-ray collecting area of the target with xaarfgen. The result depends strongly on the X-ray source's spatial distribution and position on the detector plane. Xaarfgen can, in principle, handle any X-ray sources in the sky, but that, in turn, means that users need to input multiple parameters to the tool. Below, we introduce examples of a point source and an extended source. Please see Section 6.5.2 for a detailed explanation of how Xaarfgen works.


Point Source

The following command shows an example for a point source (sourcetype=POINT).

term> punlearn xaarfgen
term> xaarfgen xrtevtfile=rayt_N132D_xtd_ptsrc.fits 
source_ra=81.2596 source_dec=-69.6441 telescop=XRISM instrume=XTEND 
emapfile=N132D_xtd.expo regmode=RADEC regionfile=N132D_xtd_src.reg 
sourcetype=POINT rmffile=N132D_xtd_src.rmf erange="0.3 15.0 0 0" 
outfile=N132D_xtd_ptsrc.arf numphoton=600000 minphoton=100 
teldeffile=CALDB qefile=CALDB contamifile=CALDB obffile=CALDB 
fwfile=CALDB gatevalvefile=CALDB onaxisffile=CALDB onaxiscfile=CALDB 
mirrorfile=CALDB obstructfile=CALDB frontreffile=CALDB 
backreffile=CALDB pcolreffile=CALDB scatterfile=CALDB imgfile=NONE 
seed=7 clobber=yes mode=h


Extended source: IMAGE mode

Whereas the PSF of Xtend is similar to that of Resolve, its large FOV and lower spectral resolution (meaning less subtle spectral features to be mixed) somewhat alleviates the spatial-spectral mixing (SSM) problem. However, there may be cases in the analysis of extended sources where users still want (or need) to take this effect into account. The SSM strategies to adopt here as the same as for Resolve, and are further detailed in the POG. Likewise, extended source users can choose to generate an Xtend ARF based on a Chandra (or XMM-Newton) input image. Generating Xtend arfs in IMAGE mode is done with xaarfgen using the same syntax as for the Resolve example above (see Section 6.5.2):

term> punlearn xaarfgen
term> xaarfgen xrtevtfile=raytrace_N132D_xtd_img.fits source_ra=81.2596
    source_dec=-69.6441 telescop=XRISM instrume=XTEND
    emapfile=N132D_xtd.expo regmode=RADEC regionfile=N132D_xtd_src.reg 
    sourcetype=IMAGE imgfile="/path/to/my_chandra_image.img" 
    rmffile=N132D_xtd_src.rmf erange="0.3 18.0 0.3 10.0" 
    outfile=N132D_xtd_img.arf numphoton=600000 minphoton=100 
    qefile=CALDB contamifile=CALDB gatevalvefile=CALDB 
    onaxisffile=CALDB onaxiscfile=CALDB mirrorfile=CALDB obstructfile=CALDB
    frontreffile=CALDB backreffile=CALDB pcolreffile=CALDB scatterfile=CALDB
    mode=h

Of course users should not forget to use instrument=XTEND and to change the input files (emapfile, imgfile, etc.) and other parameters (erange, etc.) accordingly.

These runs are appropriate for sources that are close to on-axis. The number of photons in runs of xaarfgen (the parameter numphoton) needs to be larger for larger off-axis angles, but note that the statistics are not Poissonian.


7.6 Generating Non X-ray Background Spectra

Since Xtend has a huge field of view, background data for a point source or a moderately extended source can be obtained from a nearby source free region. However, if a source is extended beyond the FOV, the background must be estimated from other datasets.

The XRISM team collects data during the night Earth observations when Xtend detects only particle events. Earlier studies show that the particle (non-X-ray) background is well correlated with the cut-off rigidity value, so the XRISM tool xtdnxbgen sorts the night Earth data out with the COR values and weights them to match the COR distribution during the source observations.

A provisional version of this database was used during the PV phase and is being made available to GOs. Links to pages describing how to access the database and use rslnxbgen and how to model the background can be found at

https://heasarc.gsfc.nasa.gov/docs/xrism/analysis/index.html

The NXB spectra have multiple emission lines and a continuum structure beyond the X-ray-sensitive energy range (see POG Fig. 6.4). These structures can be evident particularly in extended source spectra which tend to be faint. The NXB data do not include sky background such as cosmic X-ray background, local hot bubble, or solar wind charge-exchange emission, so users need to evaluate their contributions to the data.


7.7 Bright Source Analysis


7.7.1 Photon Pile-ups

The XRISM mirror PSF has a sharp core and a long tail (ref: X-ray Mirror PSF). Although a bright source has many pileup events in its PSF core, it has significantly fewer in its tail. So, users can take a source region without its PSF core for a pileup-free spectrum or light curve. The PSF core exclusion removes most events, but since such sources are bright, the remaining region should still have significant amounts of events for analysis.

Figure 7.1 simulates the pileup fraction of a crab-like point source for various core exclusion radii. This figure allows users to find an appropriate exclusion radius for their source flux, Xtend mode, and tolerable pileup fraction. The flux measurement with such a source region is sensitive to the accuracy of the source position. The Xtend image can shift by $\sim$5 arcseconds with the instrument's base plate temperature (BP_TEMP), but this shift is not considered in conversion to the SKY coordinates. The effect would be minor in most cases, but users are advised to assess the significance for their analysis.

Figure 7.1: Xtend Pile-up fraction of a point source with a Crab spectrum for a source region excluding its PSF core. The x-axis shows the core exclusion radius in the unit of pixels. The blue dashed lines denote a 10% pile-up (Yoneyama et al. 2024, SPIE Proc. 13093, 130935Y).
\begin{figure}\centering
\includegraphics[width=\textwidth]{Figure/Yoneyama2024SPIE_XrismXtendPileupFig2.pdf }
\end{figure}