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
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
Use either nicersaafilt=YES or saafilt=YES, but not both.
- nicersaafilt=YES. Excludes times within SAA as defined by NICER_SAA. This is a NICER-specific definition of the SAA stored in CALDB.
The NICER_SAA contour is smaller than the standard SAA contour, but has been customized for NICER's environment.
- saafilt=NO. When YES, excludes times within the generic SAA defined by prefilter.
The SAA contour is larger (more conservative) than NICER_SAA, and may be useful for faint targets where conservative screening is desired.
This is "no" by default because normally you do not need to apply both the generic and NICER-specific screening.
Pointing and On-Target Tracking
These options select times when NICER is on-target and tracking a target above the horizon.
- trackfilt=YES. Excludes times when NICER is not in target tracking mode.
"(ATT_MODE==1 && ATT_SUBMODE_AZ==2 && ATT_SUBMODE_EL==2)"
This is on by default to select data when NICER is tracking a target.
- ang_dist=DIST. Excludes times when the angular distance between the target and NICER's boresight is greater than DIST.
"(ANG_DIST < DIST)"
The pointing constraint is currently DIST=0.015 (within 0.9 arcmin of target). This may need to be loosened on rare occassions when pointing is compromised.
See "DEALING WITH OFFSET POINTING" below for more information about offset pointing.
- st_valid=YES. Excludes time when star tracker solution is not valid.
"(ST_VALID == 1)"
This option was added in nimaketime version 1.4, and will exclude times when the NICER tracking system estimated that it was on-target
but the star tracker did not provide valid solution. The NICER team generally recommends the screening cut.
- elv=MINELV. Excludes times when the distance to the earth limb is less than MINELV.
"(ELV > MINELV)"
The default elevation constraint is MINELV=15 degrees. This was changed from 30 degrees in version 1.3 and earlier. The primary reason
to use this constraint is to avoid absorption and fluorescence by Earth's atmosphere and optical loading by reflected light.
- br_earth=MIN_BR_EARTH. Exclude times when distance to the bright earth is less than MIN_BR_EARTH.
"(BR_EARTH > MIN_BR_EARTH)"
The default bright earth constraint is MIN_BR_EARTH=30 degrees. This was changed to 30 from 40 degrees in version 1.3 and earlier.
The primary reason to use this constraint is to avoid optical loading by reflected light.
Background and Detector Performance
These options select for reduced background and optical loading and
ensure that at least some detectors are enabled.
- cor_range=A-B. Specify a range of magnetic cut-off rigidity (COR) to accept (in GeV/c). This can be used for filtering of high background regions. You can use the notation cor_range="A-" to specify a minimum but no maximum, cor_range="-B" to specify a maximum but no minimum, and the default cor_range="-" accepts all CORs.
"(COR_SAX > A && COR_SAX < B)"
NICER background is generally correlated with the geomagnetic location of the observatory, and lower numbers indicate higher background. By default
the NICER team does not have a recommended COR range, but instead uses overshoot cuts (see below).
- min_fpm=MIN_FPM. Specify a minimum number of enabled detectors.
"(NUM_FPM_ON > MIN_FPM)"
The default value for this is MIN_FPM=7. This was changed from 38 in versions 1.3 and earlier. The reason for this
cut is to ensure that at least some detectors are enabled, and exclude times when the full array was off.
- underonly_range=A-B. Excludes times when undershoot count rate is out of range A-B counts per second per FPM.
"(FPM_UNDERONLY_COUNT > A && FPM_UNDERONLY_COUNT < B)"
NICER's performance, especially the energy gain scale, is affected by optical loading. Reduce optical loading effects by
reducing the default range 0-500 to a smaller range (0-50 is optimal). This option was added in version 1.4
- overonly_range=A-B. Excludes times when overshoot count rate is out of range A-B counts per second per FPM.
"(FPM_OVERONLY_COUNT > A && FPM_OVERONLY_COUNT < B)"
NICER's background level is correlated with "overshoots", which are saturating particle detections. The default
range of 0-1.5 will exclude most strong background flare-ups. Note that this cut is applied in addition to overonly_expr.
This option was added in version 1.4.
- overonly_expr=EXPR. Excludes times when FPM_OVERONLY_COUNT exceeds EXPR. EXPR is any maketime expression using
columns from the filter file.
"(FPM_OVERONLY_COUNT < EXPR)"
This applies additional screening based on environment-specific conditions, using columns from the filter file. The
was heuristically determined by the NICER team to exclude most background flares in different geomagnetic conditions.
This option was added in version 1.4.
Note that the name OVERONLY_NORM is taken from the maximum value of overonly_range (or 1.0 if
no maximum was given).
DEALING WITH OFFSET POINTING
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.
ADDITIONAL GEOGRAPHIC SCREENING
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
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
- SAACONT - standard NICER contour
- SAACONTLARGE1 - enlarged NICER contour
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
- (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
- (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
- (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
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).