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 more information and examples on how to use ZodiPy for different applications.

A simple example

import astropy.units as u
from astropy.time import Time

from zodipy import Zodipy


model = Zodipy(model="dirbe")

emission = model.get_emission_ang(
    25 * u.micron,
    theta=[10, 10.1, 10.2] * u.deg,
    phi=[90, 89, 88] * u.deg,
    obs_time=Time("2022-01-01 12:00:00"),
    obs="earth",
)

print(emission)
#> [15.35392831 15.35495051 15.35616009] MJy / sr

Related scientific papers

See CITATION

Install

ZodiPy is installed using pip install zodipy.

Dependencies

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

For developers

Contributing developers will need to download the following additional dependencies to test, lint, format and build documentation locally:

  • pytest
  • pytest-cov
  • hypothesis
  • coverage
  • ruff
  • mypy
  • pre-commit
  • mkdocs
  • pymdown-extensions
  • markdown-include
  • mkdocs-material
  • mkdocstrings
  • mkdocstrings-python
  • markdown (<3.4.0)

which are required to test and build ZodiPy.

Poetry

Developers can install ZodiPy through Poetry (Poetry >= 1.8.0) by first cloning or forking the repository, and then running

poetry install

in a virtual environment from the repository root. This will read the pyproject.toml file in the repository and install all dependencies.

pip

Developers not using Poetry can install ZodiPy in a virtual environment with all dependencies by first cloning or forking the repository and then running

pip install -r requirements-dev.txt

from the repositry root. This will read and download all the dependencies from the requirements-dev.txt file in the repository.

Note that developers using Python 3.12 will need to upgrade their pip versions with python3 -m pip install --upgrade pip before being able to install ZodiPy. This is due to known incompatibilities between older pip versions and Python 3.12

Tests, linting and formatting

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: Tests are run with pytest by simply running pytest in the command line in the root of the repository.
  • ruff: Formating and linting is done with ruff by simply running ruff check and ruff format in the command line in the root of the repository.
  • mypy: Type checking is done with mypy by simply running mypy zodipy/ in the root of the repository.

Remeber to add tests when implementing new features to maintain a high code coverage.

Documentation

We use MkDocs to create our documentation. The documentation is built locally with mkdocs build from the repository root, and served with 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-0.9.2.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

zodipy-0.9.2-py3-none-any.whl (41.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zodipy-0.9.2.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.4 Darwin/23.4.0

File hashes

Hashes for zodipy-0.9.2.tar.gz
Algorithm Hash digest
SHA256 5c1dea3ff423b2238f3a0290ce9c7ab758c1e949f6ecaf10f30cdb6efd9ac303
MD5 81d5e028a92b0c4e185e329222fe2719
BLAKE2b-256 0775aa4caa309d80f6d84a1396998f72b1a0a83c4ed38075614d03d316f62b4e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: zodipy-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.4 Darwin/23.4.0

File hashes

Hashes for zodipy-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62965d2533d4b937083aaff75da2e4185c068b1b41eda78cda6385d81f3fb09e
MD5 0fba2dd12639769b0ff966179cc8dad4
BLAKE2b-256 2d250ebf12af252dde985d9f4a006125746b260fe88e2cc8287c312d05f6fcd0

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page