Cosmoglobe/zodipy(opens in a new tab)
Language: Python
Astropy-affiliated package for zodiacal light simulations. Maintainers: @metinsa, @hermda02, @dncnwtts
- stars
- 13
- watchers
- 2
- forks
- 13
- open issues
- 4
- Last updated
- 09/21/2026
Language: Python
Astropy-affiliated package for zodiacal light simulations. Maintainers: @metinsa, @hermda02, @dncnwtts
ZodiPy is an Astropy affiliated package for simulating zodiacal light in intensity for arbitrary solar system observers.
See the documentation for a list of supported zodiacal light models and examples of how to use ZodiPy.
import astropy.units as u from astropy.coordinates import SkyCoord from astropy.time import Time import zodipy # Initialize a zodiacal light model at a wavelength/frequency or over a bandpass model = zodipy.Model(25 * u.micron) # Use Astropy's `SkyCoord` object to specify coordinates lon = [10, 10.1, 10.2] * u.deg lat = [90, 89, 88] * u.deg obstimes = Time(["2022-01-01 12:00:00", "2022-01-01 12:01:00", "2022-01-01 12:02:00"]) skycoord = SkyCoord(lon, lat, obstime=obstimes, frame="galactic") # Evaluate the zodiacal light model emission = model.evaluate(skycoord) print(emission) # > [27.52410841 27.66572294 27.81251906] MJy / sr
See CITATION
ZodiPy is installed with pip
pip install zodipy
ZodiPy supports all Python versions >= 3.9, and has the following dependencies:
ZodiPy now uses uv for development. To build and commit to the repository with the existing pre-commit setup, developers need to have uv (>= 0.12.6) installed. uv can be installed by following the installation instructions here
uv does not require setting up any virtual environment manually and handles the requirements itself. To get the dependencies set up, simply run
uv sync
This will download all dependencies (including dev)from pyproject.toml, and uv.lock.
The following tools should be run from the root of the repository with no errors. (These are ran automatically as part of the CI workflows on GitHub, but should be tested locally first)
Testing is done with pytest. To run the tests, run the following command from the repository root
uv run pytest
Formating and linting is done with ruff. uv also handles formatting and linting explicitly. To format and lint, run the following command from the repository root
uvx ruff check
uvx ruff format (with --check for a dry run)ZodiPy is fully typed. We use mypy as a static type checker. To type check, run the following command from the repositry root
mypy zodipy/
Remeber to add tests when implementing new features to maintain a high code coverage.
We use MkDocs to create our documentation. To serve the docs locally on you machine, run the following from the repositry root
mkdocs serve
To release a new package to PyPI, simply create a new release. Be sure to have bumped the version appropriatly in pyproject.toml beforehand.
This work has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No 776282 (COMPET-4; BeyondPlanck), 772253 (ERC; bits2cosmology) and 819478 (ERC; Cosmoglobe).