Skip to main content

Multi-dimensional modeling for astrophysical X-ray data

Project description

Docs

Multi-dimensional X-ray data modelling in Python

nDspec is a software package designed to model (primarly) X-ray astronomical data; in particular, it is meant to enable users to fit spectral, timing and (in the future) polarimetric data natively. Currently, nDspec provides the following features:

  • a class to handle folding an energy-dependent model through a given X-ray instrument response matrix. We currently support existing and legacy missions (Swift/XRT, RXTE, NuSTAR, Nicer, XMM-Newton); next-generation missions like XRISM and Athena are not supported yet.

  • Classes to handle the standard spectral-timing data products (power spectra, two-dimensional cross spectra, as well as their one-dimensional projections like lag-frequency spectra). Models need to be defined by the user either in the time domain (ie, an impulse response function) or in the Fourier domain (ie, a transfer functions). Additive models can be combined by the users before computing a given Fourier product.

  • a small library of phenomenological spectral-timing models, currently including a one dimensional power-law, black body and gaussian, as well as example impulse response and/or transfer functions that parametrize the time dependence of these components.

The goal of the software is to provide users with an Xspec-like package, but to move beyond simple one-dimensional spectral fitting, which typically has relied on each group utilizing their own custom software. Being an open-source modular package, unlike legacy software nDspec allows users to interface with data science libraries for model handling or fitting.

Documentation

The software documentation, including installation instructions, tutorials, and the full API, is found on readthedocs. You can also find notebooks discussing the features of each class in the /notebooks/ folder.

Installation and testing

The stable version of the software can be installed via pip; if you want to use (or contribute to!) features that are still in-developement, you should install the software directly from the repository. Unit tests make use of py.test. Running the unit tests simply requires opening the folder in which users downloaded the repository, and running the command pytest in the command line.

Contributing

nDspec is a fully open source software, so we welcome your contribution and feedback! The best way to contact the developers is through the issues page - even a simple comment on what you find useful or intuitive (or vice versa) goes a long way in helping the project. If you would like to contribute a piece of code, you are welcome to do so either by opening an issue or submitting a pull request.

Citing

The initial release paper is not released yet; until then, please refer to this repository if you make use of the software in your work.

License

All content © 2023 The Authors. The code is distributed under the MIT license; see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ndspec-0.2.1.tar.gz (52.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ndspec-0.2.1-py3-none-any.whl (34.7 MB view details)

Uploaded Python 3

File details

Details for the file ndspec-0.2.1.tar.gz.

File metadata

  • Download URL: ndspec-0.2.1.tar.gz
  • Upload date:
  • Size: 52.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ndspec-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2bcbbf715b370bf6165e7763011a909fae41297287b00ac2ce0a41524a0cb87b
MD5 f1fb654b2ac0ec1d7a6efc3ed666d3ef
BLAKE2b-256 0c6609ac61175f2e294e59ea2eac6880285e3a6b80e0ee48cee0e10d1ed2e344

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndspec-0.2.1.tar.gz:

Publisher: release.yml on nDspec/nDspec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndspec-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: ndspec-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 34.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ndspec-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9678739ef3c226704eae8e3f06e650444a32b4b3feae561b78fe5de0a5b460b9
MD5 1b9248a35fdc11a95aa363f800129324
BLAKE2b-256 d8c4ba6af3fc46bad6bcf0f283696577666f7b0db60a69ae70af1ac107401670

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndspec-0.2.1-py3-none-any.whl:

Publisher: release.yml on nDspec/nDspec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page