-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
To get started with autoNICER, you'll want to establish a location on your machine that you want store NICER data (If you do not already have one).
Navigate to this location from your terminal and this will be your working directory. You should call autoNICER from this directory by typing autonicer
.
Please ensure that the drive on your machine has enough disk memory as NICER datasets can be quite large (>25GBs) and will create some temporary files throughout the data reduction, so also make sure to leave yourself some extra room!
-
Call autoNICER
autonicer
-
You will be prompted to enter the name of the source object you wish with to query the
nicermastr
catalog for. Enter the name of the source you wish to retrieve data for. (the following uses PSR_B0531+21 as an example)Target: PSR_B0531+21
Quick Tip: If you are encountering issues with the source name resolving, ensure the following at the HEASARC archive (https://heasarc.gsfc.nasa.gov/db-perl/W3Browse/w3browse.pl):
- The source name resolves in the browse search (Enter the source name in the search box @ the link above and make sure it doesn't give you an error)
- When issuing the search query at the link above make sure NICER has observed the source you wish to pull data for, and make sure that data is publicly available.
Note: In some cases the api will take a few days to update once an OBSID dataset becomes publicly available.
-
Next you will be prompted to set the barycenter, compression, and logging options that will apply to each NICER dataset you retrieve and reduce. All are set with a simple y/n and the default values if nothing is entered are in square brackets.
Apply Bary-Center Correction: [y] Compress XTI files (.gz): [y] Write Output Log: [n]
If file compression is selected all ufa.evt files will be compressed into gzips.
If the output log option is selected, a .csv file will be written out and will record the full path to either the barycenter corrected mpu7_cl.evt file or the non-barycenter corrected mpu7_cl.evt file (depending on whether a barycenter correction was performed or not).
If a barycenter correction is performed the non-barycenter corrected mpu7_cl.evt file will also be gzipped
Additionally it is useful to point out that the all settings except for logging are able to be set from the command line using the following command line arguments
--src
[string] - sets the target source
--bc
[True] - sets the barycenter correction setting to yes
--compress
[True] - sets the compression setting option to yes
If you elect to use the command line to establish your settings then there is no option for logging
If at any point you want to check your settings from the autoNICER prompt you can enter
settings
to have your settings displayed
-
From this point if everything resolves correctly you should see the autoNICER prompt.
autoNICER >
The autoNICER prompt will allow you to begin selecting OBSIDs that you wish to retrieve and reduce. It may be useful to have the HEASARC archive (https://heasarc.gsfc.nasa.gov/db-perl/W3Browse/w3browse.pl) and nicermastr open in a web browser to see all the OBSIDs available for selection.
To select an OBSID you wish to gather and reduce simply enter that OBSID into the autoNICER prompt.
autoNICER > 3013010102
If the OBISD is found it will be queued up for retrieval and reduction once you are done selecting the OBSIDs you want retrieved and reduced.
You are encouraged to add as many or as few OBSIDs as you want. The whole point of autoNICER is to help you gather and reduce as much NICER data as you want!
Each OBSID entry into the autoNICER prompt that is then queued up will be on standby until you enter the command done
into the autoNICER prompt. This will allow you to remove OBSIDs you may have mistakenly added or will allow you to add more OBISDs.
You can also select all OBSIDs from a specific NICER observing cycle using the cycle
command followed by the cycle number. The following example would add all cycle 1 OBSIDs from the source you set, and add them all to the queue.
autoNICER > cycle 1
To see all the OBSIDs you have selected, enter sel
as seen below, which will list all OBSIDs currently in the queue.
autoNICER > sel
If you made a mistake with your previous OBSID entry, you can remove the previous OBSID you entered with the command back
... i.e.
autoNICER > back
If you really messed up and just want to start over but with the same source target and settings you can enter rm all
into the command prompt which will clear the entire queue... i.e.
autoNICER > rm all
If you have numerous OBSIDs selected, and you want to eliminate a specific one from the queue you can enter rm
followed by the OBSID you want to remove... i.e. (using the OBSID 3013010102 as an example)
autoNICER > rm 3013010102
REMEMBER: If at any point autoNICER says it cannot find the OBSID you wish to add to a queue...
- Make sure the OBSID is publicly available
- In some cases it may take a few days for the API to update newly available OBSIDs
Once you are done selecting all of the OBSIDs you want to retrieve an reduce enter done
... i.e.
autoNICER > done
If at any point you encounter an issue you can either use exit
in the autoNICER prompt of control+c out of the program. You can also kill any data retrieval or reduction with autoNICER with control+c as well.
After entering done
you should see autoNICER begin to download and then reduce the OBSIDs you have selected. All OBSIDs are downloaded and reduced one at a time, in series.
This is since some datasets can be extraordinarily large in size (SCO X-1 and Crab looking at you'll)
AutoNICER also can reprocess existing OBSID datasets you have available. You can either work with one dataset at a time or with multiple datasets. The following command line arguments will be particularly relevant to working with existing data.
--checkcal
[True] - checks if a mpu7_cl.evt file is up to date with the latest NICER calibrations
--reprocess
[True] - will reprocess the existing dataset(s) with nicerl2 using a default data reduction procedure
--bc
[True] - will ensure a barycenter correction is performed if reprocessing
--compress
[True] - ensures compression of ufa files with reprocessing and if barycenter correcting, the non-barycenter corrected cl.evt file will be gzipped
--inlist
[string or list multiple dirs] - path to log file for navigation when reprocessing or checking multiple files OR unix-like entry to establish a list of directories to be reprocessed or to have calibrations checked