Skip to main content

A Python package for zodiacal light simulations

Project description

astropy PyPI - Python Version PyPI Actions Status GitHub Actions Workflow Status Project Status: Active – The project has reached a stable, usable state and is being actively developed. Codecov Ruff pyOpenSci ascl:2306.012 DOI DOI

ZodiPy is an Astropy affiliated package for simulating zodiacal light in intensity for arbitrary solar system observers.

plot

Documentation

See the documentation for a list of supported zodiacal light models and examples of how to use ZodiPy.

A simple example

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

Related scientific papers

See CITATION

Install

ZodiPy is installed with pip

pip install zodipy

Dependencies

ZodiPy supports all Python versions >= 3.9, and has the following dependencies:

For developers

Poetry

ZodiPy uses Poetry for development. To build and commit to the repository with the existing pre-commit setup, developers need to have Poetry (>= 1.8.0) installed. See the Poetry documentation for installation guide.

After poetry has been installed, developers should create a new virtual environment and run the following in the root of the ZodiPy repositry

poetry install

This will download all dependencies (including dev)from pyproject.toml, and poetry.lock.

Tests, linting and formatting, and building documentation

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)

pytest

Testing is done with pytest. To run the tests, run the following command from the repository root

pytest

ruff

Formating and linting is done with ruff. To format and lint, run the following command from the repository root

ruff check
ruff format

mypy

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.

MkDocs

We use MkDocs to create our documentation. To serve the docs locally on you machine, run the following from the repositry root

mkdocs serve

Funding

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).

 

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

zodipy-1.1.3.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

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

zodipy-1.1.3-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file zodipy-1.1.3.tar.gz.

File metadata

  • Download URL: zodipy-1.1.3.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zodipy-1.1.3.tar.gz
Algorithm Hash digest
SHA256 db2af3da982899c2fe3ad34e9c211024e1e771a8b3e4cd6c19d347fcaaed12c4
MD5 5e61359a1752f24fa8338480addd73d3
BLAKE2b-256 a8ffbdebbf0e58d6fcdded1ae7f4d4959bf62fa2d1aa595ed1a2b2a5401efb8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for zodipy-1.1.3.tar.gz:

Publisher: publish.yml on Cosmoglobe/zodipy

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

File details

Details for the file zodipy-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: zodipy-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zodipy-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9f478a69ff1e0815f5fbf8d6ace45b347887b20ef4684f69971a27e1840b9597
MD5 62e30b9d553e8e78a0542b64c0b0d564
BLAKE2b-256 a31024d77d886d2f3ca27a01c605ebf51295db24362023584bd64c7053745e74

See more details on using hashes here.

Provenance

The following attestation bundles were made for zodipy-1.1.3-py3-none-any.whl:

Publisher: publish.yml on Cosmoglobe/zodipy

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