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 studied NXB data obtained during the commissioning and early PV observations and formulated a model to describe the spectrum that has been used successfully in the published PV-phase results. Resolve observation proposers must assess the contribution to justify the proposed observations. This web page instructs how to include the NXB component in a spectral simulation. The model does not include a sky X-ray background like the cosmic X-ray background (CXB). This page instructs how to include the component, too.

This plot shows the typical NXB and CXB spectral models with Resolve. 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 faint sources should consider the contribution.

Resolve NXB spectrum (blue) convolved with the diagonal response matrix and the CXB spectrum model in Boldt 1987 (green) using the Hp rmf and the GV-closed flat arf response files (rsl_extflat5_GVC_2025.arf).

The current NXB model assumes Hp event data obtained from 34 detector pixels, excluding pixel 27 with unpredictable gain variation. The NXB data do not show a significant pixel-to-pixel variation, so the NXB spectrum of a sub-array region, i.e., a subset of pixels, can be the number ratio of selected pixels over 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 to input a response file to Xspec, you need to input a source spectrum by design. Of course, you do not have one yet, so you input the NXB file as a dummy. The simulation does not use the spectral information in the source file, so technically, the file can be any ungrouped Resolve spectrum. Then, you input the corresponding response and ARF files. The NXB model is for the diagonal matrix, newdiag60000.rmf, so you input two sets of response files.

XSPEC> data 1:1 rsl_nxb_model_v1_1Bsec.fak XSPEC> response 1:1 rsl_Hp_L_2025.rmf XSPEC> arf 1:1 rsl_pntsrc_GVC_2025.arf XSPEC> response 98:1 newdiag60000.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 rsl_nxb_model_v1_cyc2.xcm file and load it into Xspec.

XSPEC> @rsl_nxb_model_v1_cyc2.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 rsl_nxb_model_v1.mo on NXB spectral models page but with a few minor modifications for convenience. The model in this file assigns the model to model ID 98. It also has an additional constant parameter at nxb1:57, which multiplies the entire model for pixel number normalization. For example, if you use only 17 detector pixels, input 0.5 (= 17/34) into this parameter.

XSPEC> newpar nxb1:57 0.5 We do not change this parameter here. 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, rsl_tbabsapec_nxb_model_v1.fak. XSPEC>fakeit Use counting statistics in creating fake data? (y): Input optional fake file prefix: Fake data file name (rsl_nxb_model_v1_1Bsec.fak.fak): rsl_tbabsapec_nxb_model_v1.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_nxb_model_v1_1Bsec.fak For fake spectrum #1 response file is needed: rsl_Hp_L_2025.rmf ...and ancillary file: rsl_pntsrc_GVC_2025.arf Use counting statistics in creating fake data? (y): Input optional fake file prefix: Fake data file name (rsl_Hp_L_2025.fak): rsl_tbabsapec_nxb_model_v1_bgdsbt.fak Exposure time, correction norm, bkg exposure time (1.00000e+09, 1.00000, 1.00000e+09): 200000, 1.0, 5e7

This method produces a source and a background file: rsl_tbabsapec_nxb_model_v1_bgdsbt.fak and rsl_tbabsapec_nxb_model_v1_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.

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_v1_1Bsec.fak XSPEC> response 1:1 rsl_Hp_L_2025.rmf XSPEC> arf 1:1 rsl_pntsrc_GVC_2025.arf XSPEC> response 98:1 newdiag60000.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