nimaketime - Create standard NICER screening GTI


nimaketime infile outfile ...


The nimaketime task creates a GTI file for event screening based on standard NICER screening criteria.

nimaketime does not actually screen events; rather it creates a GTI file that can be used to screen events using a task like extractor or niextract-events

nimaketime is a helper script that can construct a filtering expression for you. You can also run maketime yourself with the same expressions.

nimaketime allows you to input one or more GTIs to be combined with "AND" (intersection) merging. This allows you to bring in previous screening to be combined with the nimaketime screening. You can also give a custom filtering expression to be applied to the .mkf file which is not provided by nimaketime.


nimaketime can apply the following screening criteria. The exact filtering string is also given in quotes next to each item.


The following options are used for screening out times when NICER passes through the South Atlantic Anomaly (SAA). The SAA is a source of very high background and may also distort the NICER energy scale calibration.

Use either nicersaafilt=YES or saafilt=YES, but not both.

Pointing and On-Target Tracking

These options select times when NICER is on-target and tracking a target above the horizon.

Background and Detector Performance

These options select for reduced background and optical loading and ensure that at least some detectors are enabled.


Occasionally, NICER performs offset pointing to avoid a contaminating spoiler target. This may also occassionally occur if the incorrect target coordinates were used and/or a preliminary target position was used for initial observations.

In that case, the standard ang_dist=NNNN filtering criterium may not return any valid data. This is because the offset pointing location is more than the specified amount (default 0.015 deg = 54 arcsec).

If the goal is to get some data, regardless of whether the data is high quality or on-axis, then using the following filtering expression:

   nimaketime ... ang_dist=180 expr="ANGSEP(RA,DEC,#RA_NOM,#DEC_NOM)<0.015"
This expression will accept pointing within 54 arcseconds of the nominal pointing direction rather than the nominal target direction. The value of 0.015 can be increased to a larger amount if necessary.


Users may wish to apply additional screening criteria based on geographic position. Since this can be difficult, nimaketime provides some shorthand capability for geographic screening.

The screening should be the form of a region file, and on the command line as latlonregfile=filename.reg. The region file should in the format of a standard spatial region file, and specify the contour of good or bad data. The region file should specify longitude in the range SAT_LON=-180 to SAT_LON=+180; this is done to allow easy filtering of the South Atlantic Anomaly (SAA), which crosses SAT_LON==0.

Note that this screening will be applied in addition to the other screening criteria listed above. If you want to avoid double-screening of SAA, you may want to set nicer_saa=NO and saa=NO.

Users can also use standard regions that are located in NICER CALDB. Currently there are two named regions in CALDB:

Specify a CALDB contour using latlonregfile=CALDB:SAACONT or latlonregfile=CALDB:SAACONTLARGE1.

If the sense of the region file should be inverted to keep good data, then use latlonreginvert=YES. This is true for SAA filtering.

For example, for enlarged SAA region filtering, use the following options:

  nimaketime ... latlonregfile=CALDB:SAACONTLARGE1 latlonreginvert=YES nicer_saa=NO


infile [filename]
Input prefilter (.mkf) file name.
outfile [filename]
Output GTI file name.
(nicersaafilt = "YES") [boolean]
Apply NICER_SAA filtering. See above.
(saafilt = "NO") [boolean]
Apply SAA filtering. See above.
(trackfilt = "YES") [boolean]
Apply pointing tracking filtering. See above.
(onlytrackfilt = "NO") [boolean]
If no, then only apply trackfilt=YES and disregard all other types of filtering. This is intended only for internal pipeline bookkeeping and not recommended for general scientist usage.
(st_valid = "YES") [boolean]
Require star tracker valid solution?
(ang_dist=0.015) [real]
Apply ANG_DIST filtering (degrees). ANG_DIST must be less than this value. The default of 0.015 degrees is 54 arcseconds. See above for more information.
(elv=15) [real]
Apply ELV filtering (degrees). ELV must be greater than this value. See above.
(br_earth=30) [real]
Apply BR_EARTH filtering (degrees). BR_EARTH must be greater than this value. See above.
(cor_range="*-*") [string]
Apply COR_SAX filtering (GeV/c). Specify a range A-B. See above.
(underonly_range="0-500") [string]
Apply undershoot count rate range per module. Specify a range A-B. See above.
(overonly_range="0-1.5") [string]
Apply overshoot count rate range per module. Specify a range A-B. See above.
(overonly_expr="1.52*OVERONLY_NORM*COR_SAX**(-0.633)") [string]
Apply curve-base overshoot filtering as an expression. See above.
(min_fpm=7) [integer]
Apply NUM_FPM_ON filtering. See above.
(ingtis="NONE") [string]
Apply additional GTI filters. If you have done external filtering and produced a GTI file, you can merge with the maketime GTI. Either a comma-separated list of files or an @filelist.lis file. All GTIs (including the maketime GTI) are combined using "AND" (intersection) merge. A value of "NONE" indicates no additional GTI filtering.
(expr="NONE") [string]
Apply additional maketime expressions, beyond the standard criteria. This should be a standard maketime filtering expression that evaluates to true when conditions are good. A value of "NONE" indicates to use only the standard filtering.
(latlonregfile="NONE") [string]
Apply an additional geographic screening as described above. Use "NONE" to skip this step, or "CALDB:name" to query CALDB for region named "name".
(latlonreginvert=NO) [boolean]
If NO, then the region file encloses good data. If YES, then the region file should enclose bad data.
(outexprfile="NONE") [string]
nimaketime will write its filtering expressions to this file so that the user can inspect them, or to use them in downstream processing. A value of "NONE" indicates to not save the filtering expressions.
(cleanup="YES") [boolean]
If yes, then clean up temporary files. If no, temporary files remain. This is typically for debugging.
(clobber = NO) [boolean]
If the output file already exists, then setting "clobber = yes" will cause it to be overwritten.

(chatter = 2) [integer, 0 - 5]
Amount of verbosity of the task. For chatter=0, no output is printed. For chatter=5, debugging output is printed.

(history = YES) [boolean]
If history = YES, then a set of HISTORY keywords will be written to the header of the specified HDU in the output file to record the value of all the task parameters that were used to produce the output file.


1. Apply standard NICER screening criteria.

  nimaketime ni1706260815.mkf good.gti 

This example will supply standard screening as detailed above. 2. Apply more custom screening

  nimaketime ni1706260815.mkf good40.gti elv=40 ang_dist=0.005 ingtis=extra.gti

This example applies the standard screening criteria, with the exceptions that the minimum ELV elevation is set to 40 degrees, the maximum angular distance is set to 0.005 degrees, and a user-supplied GTI is supplied in extra.gti (which is merged with "AND" merging with the maketime GTI).


niprefilter, maketime


Apr 2019