Skip to main content

A Python toolkit to simulate instrument sensitivity and plan follow-up observations of time-variable astrophysical sources with gamma-ray observatories.

Project description

sensipy

Status Build Status PyPI GitHub Issues GitHub Pull Requests License

Sensipy is a Python toolkit for simulating gamma-ray follow-up observations of time-variable astrophysical sources. First built for CTAO-style analyses, it builds on top of gammapy and streamlines everything from IRF handling to exposure lookups.

The full documentation is available at sensipy.vercel.app.

Sensipy logo

Features

  • Sensitivity and exposure-time calculations powered by gammapy.
  • Calculate differential or integral sensitivity curves for gamma-ray observatories using instrument response functions and spectral models.
  • Easily simulate the observation time needed to detect a source with a given spectral model at a specified significance level.
  • Follow-up utilities (sensipy.followup) for quick-look assessments.
  • Ships with ready-to-use EBL models.
  • CTAO-first workflow that loads IRFs, applies EBL absorption models, and simulates detectability curves.

Installation

Sensipy requires Python 3.11+.

# Recommended: uv
uv add sensipy

# or pip
pip install sensipy

Using conda? Create/activate an environment, ensure pip is available, then run pip install sensipy.

Run the unit tests with uv run pytest (or pytest in any configured environment) to verify the installation.

Documentation

Full documentation, tutorials, and the API reference live on the docs (source in docs/). To work on the site locally:

cd docs
bun install
bun dev

Key sections include:

  • Getting started guides for installation, setup, spectral/EBL models, and sensitivity calculations.
  • Tutorials that walk through the full workflow (loading IRFs, simulating observations, running follow-ups).
  • API reference material for core modules such as ctaoirf, sensitivity, followup, and source.

Contributing

Contributions are welcome! Please:

  • Open an issue for bugs or feature proposals.
  • Keep changes tested via uv run pytest or uv run pytest -n 4 for faster testing in parallel.
  • Check for type errors with uv run mypy src/sensipy.
  • Follow the existing code style and type-checking expectations (ruff, mypy, etc.).

License

Sensipy is distributed under the Apache 2.0 License.

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

sensipy-4.0.1.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

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

sensipy-4.0.1-py3-none-any.whl (4.3 MB view details)

Uploaded Python 3

File details

Details for the file sensipy-4.0.1.tar.gz.

File metadata

  • Download URL: sensipy-4.0.1.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sensipy-4.0.1.tar.gz
Algorithm Hash digest
SHA256 a2a78174646121fa9507e762146a149f27333cda23bfff6c5d74735cccb13f7a
MD5 20cefe488a04aeb548b29aa4eefdbb94
BLAKE2b-256 2a9db7f983512533acb7237a456cde9b8f73d35578e35553b98bee999e0b63c4

See more details on using hashes here.

File details

Details for the file sensipy-4.0.1-py3-none-any.whl.

File metadata

  • Download URL: sensipy-4.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sensipy-4.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa108b4a451335ddac041051180df22cd5c9ec2ab0aef5f4133cbbe149fef27c
MD5 908973b117d2329c2b696ef259c54740
BLAKE2b-256 e203a3d4f88c6168d0172b0f7415d799e2ae0f76bdb4b1eefff6085675d5e4e7

See more details on using hashes here.

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