Simulation of a Resolve Spectrum,
Including the Background Components


Non X-ray and X-ray Background Components

Resolve signals include charged particle events. Most are identified by coincidence with anticoincidence-detector events, pixel-pixel coincidence, or by their pulse profiles and are removed by screening, but some particle events remain in the screened (cleaned) data as noise or so-called non-X-ray background (NXB). The night Earth observations, when the telescope points at the Earth's night surface, provide a good proxy to evaluate this background. The data are compiled in a public database to assess the NXB level during observations.

The Resolve instrument team has been studying NXB data and formulating a model to describe the spectrum. Resolve observation proposers must assess the contribution to justify the proposed observations. This web page explains how to include the NXB component in a spectral simulation. The model does not include a sky X-ray background, such as the cosmic X-ray background (CXB). This page also explains how to include the component.

This plot shows the typical Resolve NXB and CXB spectra obtained under CORTIME ≥ 6. The CXB contributes 20-25% of the NXB between ~3-6 keV and is nearly negligible outside of that band. Proposers using ~5 keV spectral structure of a faint source should consider the contribution.

Resolve NXB spectrum (blue) convolved with the standard v3 NXB RMF (xrism_nxb_v3_rsl_M.rmf) and the CXB spectrum model in Boldt 1987 (green) using the Hp RMF (rsl_Hp_L_2025.rmf) and the GV-closed flat ARF response files (rsl_extflat5_GVC_2025.arf).

The current NXB model assumes Hp event data obtained under CORTIME ≥ 6 from 34 detector pixels, excluding pixel 27 with unpredictable gain variation. The NXB data show no significant pixel-to-pixel variation, so the NXB spectrum of a sub-array region (i.e., a subset of pixels) can be scaled by the ratio of selected pixels to the 34 total pixels.

There are two methods of simulating a spectrum, including the NXB, with Xspec. One is to include the NXB in an input model, and the other is to feed the NXB FITS file on the proposal preparation page. The latter is conventional and straightforward, while the former can be easily extensible to complicated cases. Note that the NXB file is merely a simulation of the NXB model, assuming an extremely long exposure to minimize statistical uncertainty. Therefore, these two methods should provide the same results.

The following example assumes spectral simulation of a point source using the on-axis point source arf. It applies to extended sources if users have an extended source arf, which strongly depends on their spatial distribution. Proposers are thus recommended to use HEASim or another detector simulator to consider spatial mixing data, and the tool can naturally include the NXB or sky background components.

Method 1: Include the NXB in an Input Model

First, you launch Xspec from a command line.

terminal> xspec

This method links each input model component to a response file, and Xspec needs a source spectrum for the response file, so you need to input a dummy source spectrum. Here we use the NXB file provided by the instrument team (rsl_nxb_model_v3_1Bsec.fak). The simulation does not use the spectral information in the source file, so technically, the file can be any ungrouped Resolve spectrum. Then, we input the corresponding RMF (rsl_Hp_L_2025.rmf) and ARF (rsl_pntsrc_GVC_2025.arf) files for a point source and the RMF (xrism_nxb_v3_rsl_M.rmf) for the NXB. So we input two sets of response files.

XSPEC> data 1:1 rsl_nxb_model_v3_1Bsec.fak XSPEC> response 1:1 rsl_Hp_L_2025.rmf XSPEC> arf 1:1 rsl_pntsrc_GVC_2025.arf XSPEC> response 98:1 xrism_nxb_v3_rsl_M.rmf

The first number of each response or arf statement is the model ID, which you assign when inputting each model. Here, we assign 1 to the source model and 98 to the NXB model. Note that the first number of the data command is different: it is the data group number. The detailed explanation of the option is in the Xspec manual and also the NICER SCORPEON page.

We choose a thermal (apec) spectrum at a temperature of 2~keV as a source spectrum. The number after the model command corresponds to the model ID.

XSPEC>model 1:src TBabs*apec 2 0.001 0 0 100000 1e+06 2 0.01 0.008 0.008 64 64 1 -0.001 0 0 5 5 0 -0.01 -0.999 -0.999 10 10 0.005 0.01 0 0 1e+20 1e+24

The NXB model has many parameters. You can download this xrism_nxb_v3_rsl_model_ao.xcm file and load it into Xspec.

XSPEC> @xrism_nxb_v3_rsl_model_ao.xcm

You must load this file after the command "response 98:1 ...", or you will get an error message stating, "XSPEC Error: no corresponding source exists for model source number."

The model in this file is the same as in xrism_nxb_v3_rsl_model.xcm on the NXB spectral models page but with the model ID 98 for convenience. Note that the v3 model includes the parameter 82 for scaling with active pixels. So, if you want to use a sub-pixel array, enter the number of Resolve pixels for simulation in this parameter.

By typing the following commands, you can dump (the current setup) and view it in a plot. XSPEC> show all XSPEC> setplot device /xw XSPEC> setp e XSPEC> setplot com r x 1.7 12.0 XSPEC> setplot com r y 1e-4 0.2 XSPEC> plot ldat
Simulation model (Apec + NXB).
Then, simulate a spectrum for a 200 ksec exposure with the fakeit command. You should get a source spectrum file named rsl_tbabsapec_nxb_model_v3.fak. XSPEC>fakeit Use appropriate probability distribution to randomize fake data? (y): Input optional fake file prefix: Fake data file name (PLT> col 5 on 1.fak): rsl_tbabsapec_nxb_model_v3.fak Exposure time, correction norm, bkg exposure time (1.00000e+09, 1.00000, 1.00000): 200000, 1.0, 0.0
Simulated spectrum of the apec + NXB model for 200 ksec. The spectrum is binned with the command: XSPEC> setplot rebin 15 60.

Method 2: Input the NXB File as Background

You launch xspec and input a spectral model. Here, we assume the same spectral model as the previous method.

terminal> xspec XSPEC>model 1:src TBabs*apec 2 0.001 0 0 100000 1e+06 2 0.01 0.008 0.008 64 64 1 -0.001 0 0 5 5 0 -0.01 -0.999 -0.999 10 10 0.005 0.01 0 0 1e+20 1e+24

Then, run the fakeit command with the NXB file in the argument.

XSPEC>fakeit rsl_tbabsapec_nxb_model_v3.fak For fake spectrum #1 response file is needed: rsl_Hp_L_2025.rmf ...and ancillary file: rsl_pntsrc_GVC_2025.arf Use appropriate probability distribution to randomize fake data? (y): Input optional fake file prefix: Fake data file name (rsl_Hp_L_2025.fak): rsl_tbabsapec_nxb_model_v3_bgdsbt.fak Exposure time, correction norm, bkg exposure time (200000., 1.00000, 200000.): 200000, 1.0, 5e7

This method produces a source and a background file: rsl_tbabsapec_nxb_model_v3_bgdsbt.fak and rsl_tbabsapec_nxb_model_v3_bgdsbt_bkg.fak. You can make a net spectrum with these files after subtracting the background.

Background-subtracted spectrum of the apec + NXB model for 200 ksec. The spectrum is binned with the command: XSPEC> setplot rebin 15 60.

Adding X-ray Background or Foreground Sources to the Model

You can also add surrounding point sources or extended foreground or background sources to the model and assess their contributions. Their models must be linked to the corresponding response files for simulation, so you must input the files and models in the same way as in Method 1.

The following procedure shows how to include the standard CXB model. The CXB emission can be considered uniform, so we use the flat response rsl_extflat5_GVC_2025.arf. We assign the model ID 100 to the CXB model. Again, we use the NXB background file as a dummy source file.

XSPEC> data 1:1 rsl_nxb_model_v3_1Bsec.fak XSPEC> response 1:1 rsl_Hp_L_2025.rmf XSPEC> arf 1:1 rsl_pntsrc_GVC_2025.arf XSPEC> response 98:1 xrism_nxb_v3_rsl_M.rmf XSPEC> response 100:1 rsl_Hp_L_2025.rmf XSPEC> arf 100:1 rsl_extflat5_GVC_2025.arf After you input the source and NXB models as in method 1, type the following command for the CXB model. The absorption is an arbitrary value. model 100:cxb_5 TBabs*powerlaw 0.1 0.001 0 0 100000 1e+06 1.29 0.01 -3 -2 9 10 5.13345e-05 0.01 0 0 1e+20 1e+24

This Xspec log shows the setup obtained with these commands. Run the fakeit command to obtain a simulated source spectrum. If you want a simulated background spectrum, remove the NXB-related commands and feed the NXB file in the fakeit argument as in Method 2.



Any questions regarding the XRISM GO program can be submitted to our XRISM helpdesk. You can access our helpdesk by using HEASARC's Feedback form, or click the "HELP" icon to the left.

B