2023-07-05 15:20:55 +03:00
2023-07-05 15:19:46 +03:00
2023-07-05 15:19:46 +03:00
2022-09-05 13:38:23 +03:00
2023-07-05 15:19:46 +03:00
2022-09-06 17:03:04 +03:00
2023-07-05 15:19:46 +03:00

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/nustar/nuwavdet.git

To update the package to the current version one should delete the previous version

pip uninstall nuwavdet

And simply repeat the intallation procedure again from the repository.

Installation verification

If the installation was successful the package can be used with the following import:

from nuwavdet import nuwavdet as nw

To verify the installation we suggest running a simple script:

from nuwavdet import nuwavdet as nw

print(nw.binary_array(2))

The output of the script should be

[[False False]
 [False  True]
 [ True False]
 [ True  True]]

Main use

The main functionality of the package is presented with a single function

nw.process(obs_path, thresh)

Inputs are string with path to the _cl.evt file to use and a tuple of thresholds, e.g.

nw.process('D:\\Data\\obs_cl.evt', (3, 2))

The detailed script description of the data extraction with the script is presented in the examples folder of the repository.

The function nw.process returns severl python objects:

  1. python-dictionary with some metadata and properties of the observation after mask generation procedure.
  2. region array with mask in DET1 coordinate frame. Note that this mask is for numpy mask application so True (1) corresponds to masked pixel and False (0) otherwise.
  3. custom bad pixel table with flagged pixels in RAW coordinates. It can be exported as fits file for further application to the nupipeline as fpma_userbpfile or fpmb_userbpfile.
  4. array with the sum of wavelet planes for potential alternative applications.

Metadata about the observation returned by the nw.process is:

Observation metadata:

  1. OBS_ID
  2. Detector
  3. Coordinates in equatorial (ra,dec) and galactical (lon,lat) systems
  4. Time of the observation in seconds
  5. Exposure

Useful algorythm-related data:

  1. Average count rate of unmasked area
  2. Fraction of unmasked area
  3. Modified Cash-statistic per bin before and after masking the detected sources

Other uses

Other possbile usecases are shown in the examples folder.

Contact information

If you have any questions or issues with the code, feel free to contact Andrey Mukhin: amukhin@cosmos.ru

Description
A Python-package for source detection in NuSTAR observations
Readme 11 MiB
Languages
Python 100%