nicer.NicerFileSet
Locate and load the files that make up one NICER observation.
Classes
|
The event, GTI, filter and housekeeping data for one NICER ObsID. |
- class nicer.NicerFileSet.NicerFileSet(args)[source]
Bases:
objectThe event, GTI, filter and housekeeping data for one NICER ObsID.
On creation, the standard files are found in the observation directory, the filter file and GTIs are read (with
TIMEZEROapplied), and an event table is built from the merged unfiltered (ufa) event files. The event table has itsTIMEcolumn renamed toMETand is sorted by time. GTIs shorter than 16 s are discarded unlessargs.keithis set.- Parameters:
args (argparse.Namespace) -- Options, normally from
nicerql.py. The attributes used areobsdir(ObsID directory),sps(SPS housekeeping file, or None to look for one),useftools(merge and filter the events with FTOOLS),applygti(GTI file to apply, or None),gtirows(rows of the GTI table to keep, or None),keith(keep short GTIs),object(override theOBJECTkeyword, or None),basename(output base name, or None to use the ObsID) andfilterbinsize(bin size in seconds for the binned overshoot rate). The orbit file found is stored inargs.orb.
- evfiles, ufafiles, uffiles
Cleaned (
*mpu7_cl.evt), merged unfiltered (*mpu7_ufa.evt) and per-MPU unfiltered (*mpu?_uf.evt) event files.
- mktable
Contents of the filter file.
- Type:
- llinterp
Interpolator for the spacecraft latitude and longitude.
- gtitable
Good time intervals, with a
DURATIONcolumn.- Type:
- etable
The events.
- Type:
- ovbintable
Binned overshoot rate (see
getbinnedovershoots()).- Type:
astropy.table.Table or None
- Raises:
Exception -- If no cleaned event files are found or no events remain.
- createetable()[source]
Read and stack the events from the merged unfiltered event files.
TIMEZEROis added to the event times.- Returns:
astropy.table.Table -- The event table (also stored as
self.etable).
- sortmet()[source]
Rename the
TIMEcolumn toMET, sort the events by time and set the exposure.EXPOSUREin the table metadata is set to the total GTI duration, andOBJECTis replaced ifargs.objectwas given.
- getbinnedovershoots()[source]
Make a binned overshoot-rate table from the filter file.
This is only done when the base name ends in
_prefilt:fcurvebinsFPM_OVERONLY_COUNTfrom the filter file inargs.filterbinsizesecond bins, writingbasename_ovbin.fits, and the result is read intoself.ovbintable. Otherwiseself.ovbintableis set to None. Requires HEASoft.
- writebkffile()[source]
Write a
.bkfFITS file of rates that are useful for background filtering.The file has the overshoot and undershoot rates, bad-ratio event rate, count rates in several energy bands (above 13 keV, below 0.25 keV, 0.25-2 keV and 2-8 keV) and spacecraft latitude and longitude, all binned on the housekeeping time grid.
This needs the
hkmet,hkovershoots,hkundershoots,eventovershootsandeventbothshootsattributes, which are not set when the object is created.