Manual Background EstimationReturn to: Analysis Threads | Analysis Main Page
OverviewNICER is subject to a varying charged particle environment at the high-inclination ISS orbit, which traverses regions of trapped charged particles near the South Atlantic Anomaly and the regions near the north and south poles (the ``polar horns''). Charged particle background is most noticeable at high energies. At low energies NICER background is dominated by optical light contamination at low sun angles and an instrumental noise peak which produces excess events at energies of <0.4 keV. This thread discusses the steps needed to estimate background manually. Read this thread if you want to: Estimate Background for a NICER Observation Manually
Last update: 2024-07-19 IntroductionPlease note that this page discusses generating background manually using various NICER tools. The NICER team recommends using the nicerl3-spect tool to generate background automatically for any of the three listed background model types. The ISS orbit takes NICER through a wide range of geomagnetic latitudes each with its own background characteristics. At high latitudes, the background is dependent on space weather and the variability of the Sun. Individual observations thus have different background levels that must be understood to maximize the science return. To calibrate the background, NICER observes blank sky background fields used which were used by RXTE (Jahoda et al. 2006) and also a few select locations near some of NICER's long term and faint MSPs. These data form a database for two different and independently developed background modeling tools. NICER includes three background modeling tools within the NICERDAS software system. The background models included are:
PrerequisitesBefore you begin this thread, you must have a complete NICERDAS and calibration environment installed. Please use the Settting Up a NICER Analysis Environment thread if you need further help. Please note that as of HEASoft 6.31, all three background models and auxiliary files are included within NICERDAS and NICER's CALDB. There is no need for any separate downloads or installations. Instructions for legacy installations are included at the bottom of this thread. The nibackgen3C50 Model: Initial StepsFor this example we'll use the NICER observation with OBSID 2010100101. We'll assume you have downloaded these data to /path/to/mynicerdata/2010100101. Manually Extracting 3C50 Background
To estimate a 3C50 background spectrum for this observation
using nibackgen3C50, do the following:
The obsid parameter is used as the observation directory name, which should be located in rootdir. The gainepoch parameter specifies the gain used to generate the background model. When it is set to AUTO, it is determined automatically from your data. The bkgidxdir and bkglibdir parameters are set to CALDB to refer to NICER Calibration Database. nibackgen3C50 will then extract a gross (source+background) spectrum from the specified OBSID, and create a background spectrum. By default these files are created in the current working directory. The created files have default names:
Alternate Output File Names
The names of the output files can be adjusted using the totspec and
bkgspect parameters. For example to place the files in
/path/to/my/nicerdata/2010100101 with the names ni2010100101_*.pi, use:
Explicit Input Event FilesBy default nibackgen3C50 uses the NICER standard observation directory layout to find the cleaned event file ("CL" file) and the unfiltered event file ("UFA" file) as inputs to the task. This can be convenient if you have used the standard processing, but inconvenient if you have created NICER event files in a different manner, or with different file names. To use non-standard event files as inputs, use the ufafile and clfile parameters.
For example,
if your event files are kept in /results/ni2010100101_ufa.evt and
/results/ni2010100101_cl.evt, you can use the following command line:
OBSOLETE: Running nibackgen3C50 StandaloneThe 3C50 model is included in HEASoft 6.31 and NICER CALDB. You can still download and install the tool separately, but this method is now OBSOLETE. Please beware that the standalone tool will not necessarily be updated in the future. Download the nibackgen3C50 file from the Background Estimator Tools page and install it by following the installation instructions After standalone installation, the 3C50 auxiliary files will be installed in a separate reference directory location. We will refer to this location as /path/to/3c50referencefiles.
An example of running the standalone-downloaded tool:
Manually Extracting Space Weather BackgroundAgain we will assume you have your NICER environment already set up. The Space Weather background model is now included in NICERDAS 10 (HEASoft 6.31 and higher). If not, please see the Settting Up a NICER Analysis Environment thread if you need further help. The Space Weather also requires that the geomagnetic Kp value be included in the filter file, which the default if you use HEASoft 6.31 or higher. Again for this example we'll use the NICER observation with OBSID 2010100101. We'll assume you have downloaded these data to /path/to/mynicerdata/2010100101. We'll assume you've created this spectrum and written it to disk at /path/to/mynicerdata/spectra/ni2010100101.pha. If you need help extracting a spectrum, please see the Complete Spectral Product (nicerl3-spect) thread. You will also need your filter file and cleaned event list.
To estimate a background spectrum for this observation
using the Space Weather model, do the following.
Alternate usage (nibkgestimator)
When the Space Weather model was published as a separate download, a
Python tool named nibkgestimator was available. This tool is still
available for legacy applications and is run the same way. Here is an
example:
Please see the detailed instructions on the Background Estimator Tools page for additional usage examples. Manually Extracting a SCORPEON Background EstimateThe SCORPEON model is a background model for NICER data. The model is unique in that it embodies contributions from many physically-motivated components. These include sky-related components such as the cosmic X-ray background (CXB), local hot bubble (LHB) and galactic halo; and also non X-ray background components such as cosmic rays (COR), South Atlantic Anomaly (SAA), trapped electrons (TREL), precipitating electrons (PREL), low energy storm-related electrons (LEEL), and so on. The two SCORPEON software tasks available are,
All of the required tools and auxiliary files to use SCORPEON are included within NICERDAS 10 (HEASoft 6.31 or higher).
We will again assume the user is processing observation 2010100101. It is
best to change into the product directory when running SCORPEON:
We'll assume you've created a spectrum and written it to disk at ni2010100101.pha. If you need help extracting a spectrum, please see the Complete Spectral Product (nicerl3-spect) thread. You will also need your filter file and cleaned event list.
To estimate a SCORPEON background model for this spectrum, do the following,
niscorpspectmod will produce an estimated background model script. Please note that the output is an XSPEC script and not a background file. This script will be used within XSPEC. Load SCORPEON Background Model Into XSPECSince the default SCORPEON output is a background model usable within XSPEC, you need to load this model.
First, you need to start XSPEC
Next, load your data like you normally would within XSPEC.
Now, activate the SCORPEON background model for this spectrum with
the following statements:
At this point you can define the model for your source. The
background model will appear as a separate trace. For example, if you
use the plot ldata command, the result will look like this:
As an example you can define your model as,
Extracting a SCORPEON Background File (not Model)While a background model provides the analyst with maximum flexibility, in some cases a background file is required. SCORPEON supports this option as well. A "file" output will product a static background file that most XSPEC users are accustomed to, but it will not be adjustable. This is most suitable for users that can't adapt to the complexity of the fully fittable SCORPEON model, or need to exchange data with other non-XSPEC users. Settings "bkgmodeltype=scorpeon bkgformat=file" (for more details see niscorpeon).
To estimate a SCORPEON background file for this spectrum, do the following,
In this case outfile is a background file, and not spectrum.
To use the resulting file within XSPEC, you can use the following commands.
Other SCORPEON TopicsThe SCORPEON model has other capabilities, such as writing its scripts in Python. For more information, please see the Complete Spectral Product (nicerl3-spect), SCORPEON Overview, and niscorpeon pages. Related Topics
OBSOLETE: Installing 3C50 and Space WeatherBoth the 3C50 and Space Weather background models were originally provided as separate downloads. Both the software and the auxiliary files were to be downloaded and installed separately. The NICER team no longer recommends the separate-download option for either 3C50 or Space Weather. Use the versions included within NICERDAS / HEASoft 6.31 instead. For legacy purposes please refer to the Background Estimator Tools for installation information. Modifications
|