A User's Guide to NICER Data & Analysis (DEPRECATED)
Please note that the information on this page is considered deprecated as of July 2022.
Much of the information is considered out of date. We will continue to maintain
the existing page as a reference for previous users of the software. However, for
new users, we recommend that you consult the following page:
It is strongly recommended that, before starting analysis of NICER data, new users review the NICER Mission Guide for an overview of the mission, the instrument subsystems, and the data file structure. The NICERDAS ToosletNICERDAS is a set of NICER-specific tools distributed with HEASoft version 6.24 or later. NICERDAS includes the following tools:
NICERDAS uses the HEASARC CALDB to access calibration data. NICER Data Reduction using NICERDASStandard Data Reduction Steps:
nicerl2: A script which runs the filtering, calibration and merging of NICER events. This wrapper script calls nicercal + nimaketime + nicermergeclean. If users are interested in doing pulse searches or other detailed timing studies, the NICER event files produced by nicerl2 can be corrected to the solar system barycenter using the barycorr task. See the discussion below for more information about using barycorr with NICER data. After data have been cleaned and calibrated (using nicerl2, for example), science products (time-filtered events, spectra and/or lightcurves) can be extracted using xselect. Using nicerl2The nicerl2 task (that is, nicer-L-2, not nicer-twelve) applies standard NICER-recommended calibration processes to an entire NICER observation, as well as standard screening. This is a high level task that calls multiple sub-tasks as a convenience to the user. It performs the following standard "Level2" processing steps.
Please see the help files for these individual tasks for more information about what they do and how they can be used. Main task parameters: indir [filename] Input directory name. The directory should be a single NICER observation directory, which in turn contains xti/{events_uf,events_cl,hk,auxil} subdirectories. ufdir = "xti/event_uf" [filename] Subdirectory containing per-MPU "uf" event files, which are the input to the task. This directory name is relative to the observation directory. cldir = "xti/event_cl" [filename] Subdirectory where the output files as listed above are placed. This directory name is relative to the observation directory. ufafile = "$CLDIR/ni$OBSID_0mpu7_ufa.evt" [filename] Name of the master "ufa" event file to be created. Use the variables "$CLDIR" for the output directory name, and use "$OBSID" for the observation ID number. clfile = "$CLDIR/ni$OBSID_0mpu7_cl.evt" [filename] Name of the master "cl" event file to be created. Use the variables "$CLDIR" for the output directory name, and use "$OBSID" for the observation ID number. mkfile = "auxil/ni$OBSID.mkf" [filename] Name of the MKF filter file, to be used as input, relative to the observation directory. Use the variables "$CLDIR" for the output directory name, and use "$OBSID" for the observation ID number. Examples:
prompt> nicerl2 indir=1706221428 clobber=YES The input directory is a NICER observation number 1706221428. The output files are placed in the observation directory, in the cleaned event directory, i.e.: 1706221428/xti/event_cl/ Note that you should be in the root directory which contains the NICER data directory 1706221428. Running the Tools SeparatelyIf you want more control of the data reduction, you may want to run the nicercal, nimaketime, and nicermergeclean separately, rather than running the nicerl2 task. Step 1: run nicercalnicercal applies standard NICER-recommended calibration processes to an entire NICER observation (in a standard NICER observation ID directory structure, and thus works on an entire observation directory. The default screening is to remove over-shoot and under-shoot events (since they cannot be calibrated) but to keep X-ray events and forced triggers An example of using nicercal to apply NICER calibration to data to observation 1706221428. prompt> nicercal indir=1706221428 outdir='$INDIR/xti/event_cl' clobber=YES The input directory given above (indir) is a NICER observation directory which contains data from observation id 1706221428. The output files are placed in the observation directory under 1706221428/xti/event_cl/ni1706221428_0mpu*_ufa.evt. (Note that single quotes are used to prevent $INDIR from being expanded by the Unix shell.) The default calibrations files are taken from CALDB (Note that the NICER CALDB can be installed locally or the HEASARC CALDB can be accessed remotely by the user.) Step 2: run nimaketimeNICER has a task named "nimaketime" which applies recommended screening criteria. prompt> nimaketime infile="$obs/auxil/ni${obsroot}.mkf" outfile="$obs/auxil/standard.gti" The output of nimaketime is a Good-Time Interval (GTI) file which users can use downstream (here named standard.gti); nimaketime does not apply the GTIs to the events data. Note that $obs is the observation directory name and $obsroot is the observation number. Type fhelp nimaketime to see what kind of screening is applied. nimaketime can apply the following screening criteria. The exact filtering string is also given in quotes after each item.
Step 3: run nicermergecleanUp until this point, data are kept on a per-MPU basis. The data must be merged and cleaned using the task nicermergeclean. First, create a list of the individual event lists from all 7 MPUs: prompt> ls $obs/xti/event_cl/ni${obsroot}_0mpu[0-6]_ufa.evt > ufalist.lis Then, run nicermergeclean using the list of individual MPU event files as input: prompt> nicermergeclean infiles=@ufalist.lis \
The nicermergeclean task is a high-level task that merges data from multiple NICER MPU slices, and applies standard screening. It is equivalent to running the tasks nimpumerge (for merging MPU data) and nicerclean (for applying screening). An input to the task is a set of several MPU event files, which have been calibrated but not finely screened. These are typically named niNNNNNNNNNN_0mpuN_ufa.evt, where the "ufa" indicates unscreened but calibrated data. The output of the task is a single merged and screened event file, which is typically named niNNNNNNNNNN_0mpu7_cl.evt, where the "cl" indicates a cleaned event file. Here "mpu7" means all MPUs, numbered 0-6, have been merged into one file designated as "mpu7." Another input to the task is a GTI (good time interval) file which contains the desired screening good time intervals. Note that nicermergeclean does not by itself create a GTI file, but rather uses one created externally by the user. The NICER team recommends to use nimaketime first to create a GTI file using standard screening criteria before running nicermergeclean. This task runs the following lower-level NICER tasks to complete its work.
In addition to applying good time screening, the nicerclean task also applies per-event screening based on event type and pulse height range. See the documentation for nicerclean for more information. By default, events with pulse invariant (PI) pulse heights above 20 (i.e. 200 eV and above). This can be changed using the pirange parameter. For example, use pirange=35:1000 to select events with nominal pulse heights in the range 0.35 - 10.00 keV. When trumpetfilt=YES, nicermergeclean performs standard filtering to exclude background events using the event PI_RATIO column. This is known as "trumpet filtering" since the PI vs PI_RATIO cloud looks like a trumpet. See the help for nicerclean for more information: prompt> fhelp nicerclean Specific Examples: merge per-MPU data from multiple observationsCreate a list of the UFA files from obsid 1234567890, using these commands on the Unix command line: prompt> ls 1234567890/xti/event_cl/ni1234567890_0mpu[0-6]_ufa.evt > ufalist.lis This creates a file, ufalist.lis, which contains a list of all the UFA files from all the MPUs from OBSID 1234567890 Then append the UFA files from OBSIDS 1111111111: prompt> ls 1111111111/xti/event_cl/ni1111111111_0mpu[0-6]_ufa.evt >> ufalist.lis Then use the ufalist.lis as input to nicermergeclean to merge the data from the 2 OBSIDS: prompt> nicermergeclean infiles=@ufalist.lis \ If you want to apply time screening, then you will need either:
Merging MPU-Merged Data (MPU7 files) from Different ObservationsIf you have multiple OBSIDs for a given target, it's possible to merge the mpu7_ufa files from each OBSID to create a combined event file for all the observations of the target.
Selecting data with XSELECTYou can then use the HEASoft xselect package to generate data products from the screened, merged events data. For example: prompt> xselect Barycentering Photon Arrival TimesYou can apply barycentering to NICER data using the HEASoft barycorr command. prompt> barycorr infile=orig.evt outfile=bary.evt \
Background CorrectionAs noted above, NICER events can include various background components in addition to the good science events. These background components are usually minimized through standard event selection and cleaning, but residual background events may remain in even "clean" science data. This residual background should be modeled and subtracted from NICER lightcurves &/or spectra for X-ray source analysis. Non-cosmic background contamination can be most readily seen at low energies, E < 0.3 keV and at high energies, E > 6.0 keV, depending on observation conditions.
Residual backgrounds should be modeled and subtracted from NICER lightcurves &/or spectra for X-ray source analysis. Tools have been developed for this purpose, and are available from the NICER Background Estimator Tools page. The NICER CALDBThe NICER caldb can be accessed using standard HEASoft caltools. We can also use the HEASARC pycaldb package (experimental) to examine and explore the NICER CALDB. Using quzcif with the NICER CALDBA standard quzcif call would be prompt> quzcif NICER XTI - - MPU_GAIN now now - Found: ftp://heasarc.gsfc.nasa.gov/caldb/data/nicer/xti/bcf/gain/nixtiflightpi20170601v001.fits 1 Last Updated: October 23, 2019 |