nuwavdet
This pacakge is used to generate region masks separating any focused X-ray flux from background signal in NuSTAR observations.
Installation
This package is to be used with Python 3.x.x
pip install git+http://heagit.cosmos.ru:3000/nustar/nuwavdet.git
Main use
To use the package in your project, import it in by writing:
from nuwavdet import nuwavdet as nw
The main functionality of the pacakge is presented with a single function
process(obs_path, thresh)
Inputs are string with path to the _cl.evt file to use and a tuple of thresholds, e.g.
process('D:\\Data\\obs_cl.evt', (3, 2))
Outputs of the function are:
- dictionary with some metadata and properties of the observation after mask generation procedure.
- region array with mask in DET1 coordinate frame. Note that this mask is for numpy mask application so 1 corresponds to masked pixel and 0 otherwise.
- custom bad pixel table with flagged pixels in RAW coordinates. It can be exported as fits file or each separate table can be acessed directly.
- array with the sum of wavelet planes used in the processing.
Metadata about the observation file:
- OBS_ID
- Detector
- Coordinates in equatorial (ra,dec) and galactical (lon,lat) systems
- Time of the observation in seconds
- Exposure
Useful algorythm-related data:
- Average count rate of unmasked area
- Fraction of unmasked area
- Modified Cash-statistic per bin before and after masking the detected sources
Other uses
You can process the cl.evt file by creating an Observation class object:
obs = nw.Observation(path_to_evt_file)
Additionally, the energy band in KeV to get events from can be passed as an argument. The default value is [3,20].
obs = nuwavsource.Observation(path_to_evt_file,E_borders=[E_min,E_max])
Description
Languages
Python
100%