Manually Extracting a NICER SpectrumReturn to: Analysis Threads | Analysis Main Page
OverviewOne of the basic operations of any NICER scientific analysis is extracting a spectrum. This thread describes how to extract a basic NICER spectrum, without any corrections or adjustments. Read this thread if you want to: Extract a NICER spectrum. Last update: 2022-10-26 IntroductionSpectroscopy is a fundamental pillar of most X-ray data analysis projects An X-ray spectrum provides information about the X-ray target that usually cannot be found by any other means. Thus, extracting a spectrum is a fundamental task that almost all NICER users will need to do. This thread describes how to extract a basic NICER spectrum from a NICER event file. Please beware that this task is a basic building block and does NOT perform most of the recommended steps for spectral analysis, including response generation, and various corrections and adjustments to NICER spectral data. The NICER team highly recommends that the high level product task nicerl3-spect be used to extract spectra since generates all auxiliary products such as responses and backgrounds. PrerequisitesHere is what is needed:
Extract a SpectrumExtract a spectrum with the following command.
niextspect infile=ni1234567890_0mpu7_cl.evt \
outfile=myspectrum.pha
where
Upon completion, niextspect will produce the named spectrum. However, no auxiliary files are produced. Specifying Additional Time Filtering (GTI)
If you have an existing cleaned event file but want to specify additional
temporal filtering using a GTI file, you can specify a temporal filter
on the command line using the timefile parameter. For example,
Using XSELECT to Extract SpectrumPreviously, the NICER team recommended that scientists use XSELECT to extract spectra. This method is still supported, although it is not the first recommendation. Please see the Creating NICER Spectra with XSELECT thread for more information. Next Steps: Loading Data into XSPEC
We can load our spectrum into XSPEC to see what it looks like. Here
is a sample command session history:
The result is a plot like the following. Next StepsAlthough we have presented this step here, please consider using the nicerl3-spect high level spectral pipeline task, which does all NICER-recommended steps.
In addition to extracting a spectrum, one will have to
consider response generation,
background generation;
and applying systematic error,
quality flags
and bin grouping
|