niphaquality adds QUALITY flags to a NICER spectrum based on a user-defined set of ranges.
The user specifies a set of ranges that should be "noticed", similar to XSPEC's notice command. These ranges are translated into a column called QUALITY in the spectrum file. A value of QUALITY=0 indicates good quality.
Thie parameter noticerange is a comma-separated list of ranges of the form a:b,c:d,e:f and so on. The channels that are considered good are a through b (inclusive), c through d, e through f, and so on. Please note that NICER channels start with 0 and each PI bin is equal to 10 eV. So for example noticerange="22:200,250:800" indicates to notice channel ranges 22-200 (inclusive) and 250-800, which is equivalent to 0.22-2.0 keV and 2.5-8.0 keV.
The QUALITY column is set by default to a value of 1. The quality flag, following the OGIP standard, can have the following values.
0 | good |
1 | defined bad by software |
2 | defined dubious by software |
5 | defined bad by user |
-1 | reason for bad flag unknown |