divtel: Divergent pointing mode for Imaging Atmospheric Cherenkov Telescopes arrays

Build status Python Version Semantic Versions License Documentation DOI

divtel makes toy simulations for the divergent pointing mode of Imaging Atmospheric Cherenkov Telescopes arrays.

👨‍💻 Install

Users

pip install divtel

Developers

With uv (recommended):

git clone https://github.com/cta-observatory/divtel.git
cd divtel
uv sync

uv sync creates a virtual environment in .venv, installs divtel in editable mode, and pulls in the development dependencies (pytest, sphinx, ruff) declared as PEP 735 dependency groups. Add --extra examples if you also want to run the notebooks in examples/.

With pip (requires pip >= 25.1 for --group):

git clone https://github.com/cta-observatory/divtel.git
cd divtel
pip install -e . --group dev

Then run the tests:

pytest

Note: install divtel before importing it, even from a source checkout. The version is derived from git by setuptools_scm at install time and written to divtel/_version.py; importing an uninstalled source tree reports __version__ == "0.0.0".

📚 Documentation

The docs are published to https://cta-observatory.github.io/divtel/. To build them locally:

uv sync --group docs --extra examples
sphinx-build -b html docs docs/_build/html

GitHub Pages serves static files only, so it cannot preview the result: file:// will not work, and the interactive demo needs a real HTTP origin. Serve the build instead:

python -m http.server 8000 -d docs/_build/html

The interactive demo

examples/marimo/interactive_display.py is a marimo notebook. Sphinx exports it to WebAssembly during the build, so the published page ships its own Python interpreter and runs entirely in the reader’s browser — sliders included, with no server and nothing to install.

That export shells out to uv, which is why uv is itself a documentation dependency.

The Jupyter version in examples/notebooks/interactive_display.ipynb is kept for running locally, but is deliberately not built into the site: its ipywidgets sliders need a Python kernel, so on a static page they would render as controls that cannot move.

To work on the demo:

marimo edit examples/marimo/interactive_display.py

🛡 License

License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

📃 Citation

@software{thomas_vuillaume_2022_6415138,
  author       = {Thomas Vuillaume and
                  Alice Donini and
                  Thomas Gasparetto},
  title        = {cta-observatory/divtel: v0.1},
  month        = apr,
  year         = 2022,
  publisher    = {Zenodo},
  version      = {v0.1},
  doi          = {10.5281/zenodo.6415138},
  url          = {https://doi.org/10.5281/zenodo.6415138}
}