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.
- 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.
Sensipy requires Python 3.11+.
# Recommended: uv
uv add sensipy
# or pip
pip install sensipyUsing 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.
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 devKey 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, andsource.
Contributions are welcome! Please:
- Open an issue for bugs or feature proposals.
- Keep changes tested via
uv run pytestoruv run pytest -n 4for 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.).
Sensipy is distributed under the Apache 2.0 License.