zodipy


Namezodipy JSON
Version 0.9.2 PyPI version JSON
download
home_pageNone
SummaryA Python package for zodiacal light simulations
upload_time2024-04-20 15:02:09
maintainerNone
docs_urlNone
authorMetin San
requires_python>=3.9
licenseGPL-3.0-or-later
keywords astronomy astrophysics cosmology space science
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            
<img src="docs/img/zodipy_logo.png" width="350">

[![astropy](https://img.shields.io/badge/powered%20by-AstroPy-orange.svg)](http://www.astropy.org/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/zodipy)
[![PyPI](https://img.shields.io/pypi/v/zodipy.svg?logo=python)](https://pypi.org/project/zodipy)
[![Actions Status](https://img.shields.io/github/actions/workflow/status/Cosmoglobe/Zodipy/tests.yml?branch=main&logo=github)](https://github.com/Cosmoglobe/Zodipy/actions)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Cosmoglobe/zodipy/mkdocs-deploy.yml?branch=main&style=flat-square&logo=github&label=docs)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://img.shields.io/badge/repo_status-Active-success)](https://www.repostatus.org/#active)
[![Codecov](https://img.shields.io/codecov/c/github/Cosmoglobe/zodipy?token=VZP9L79EUJ&logo=codecov)](https://app.codecov.io/gh/Cosmoglobe/zodipy)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![pyOpenSci](https://tinyurl.com/y22nb8up)](https://github.com/pyOpenSci/software-review/issues/161)
[![ascl:2306.012](https://img.shields.io/badge/ascl-2306.012-blue.svg?colorB=262255)](https://ascl.net/2306.012)
[![DOI](https://zenodo.org/badge/394929213.svg)](https://zenodo.org/doi/10.5281/zenodo.10999611)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.06648/status.svg)](https://doi.org/10.21105/joss.06648)
---


ZodiPy is an [Astropy affiliated](https://www.astropy.org/affiliated/) package for simulating zodiacal light in intensity for arbitrary Solar system observers.

![plot](docs/img/zodipy_map.png)

## Documentation
See the [documentation](https://cosmoglobe.github.io/zodipy/) for more information and examples on how to use ZodiPy for different applications.

## A simple example
```python
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](https://github.com/Cosmoglobe/zodipy/blob/dev/CITATION.bib)
- [Cosmoglobe: Simulating zodiacal emission with ZodiPy (San et al. 2022)](https://arxiv.org/abs/2205.12962). 
- [ZodiPy: A Python package for zodiacal light simulations (San 2024)](https://joss.theoj.org/papers/10.21105/joss.06648#). 


## Install
ZodiPy is installed using `pip install zodipy`.

## Dependencies
ZodiPy supports all Python versions >= 3.9, and has the following dependencies:
- [Astropy](https://www.astropy.org/) (>=5.0.1)
- [NumPy](https://numpy.org/)
- [healpy](https://healpy.readthedocs.io/en/latest/)
- [jplephem](https://pypi.org/project/jplephem/)
- [SciPy](https://scipy.org/)

## 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](https://python-poetry.org/) (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](https://docs.pytest.org/en/8.0.x/): Tests are run with pytest by simply running `pytest` in the command line in the root of the repository. 
- [ruff](https://github.com/astral-sh/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](https://mypy-lang.org/): 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](https://www.mkdocs.org/) 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).


<div style="display: flex; flex-direction: row; justify-content: space-evenly">
    <img style="width: 49%; height: auto; max-width: 500px; align-self: center" src="https://user-images.githubusercontent.com/28634670/170697040-d5ec2935-29d0-4847-8999-9bc4eaa59e56.jpeg"> 
    &nbsp; 
    <img style="width: 49%; height: auto; max-width: 500px; align-self: center" src="https://user-images.githubusercontent.com/28634670/170697140-b010aa69-9f9a-44c0-b702-8a05ec0b6d3e.jpeg">
</div>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "zodipy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "astronomy, astrophysics, cosmology, space, science",
    "author": "Metin San",
    "author_email": "metinisan@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/07/75/aa4caa309d80f6d84a1396998f72b1a0a83c4ed38075614d03d316f62b4e/zodipy-0.9.2.tar.gz",
    "platform": null,
    "description": "\n<img src=\"docs/img/zodipy_logo.png\" width=\"350\">\n\n[![astropy](https://img.shields.io/badge/powered%20by-AstroPy-orange.svg)](http://www.astropy.org/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/zodipy)\n[![PyPI](https://img.shields.io/pypi/v/zodipy.svg?logo=python)](https://pypi.org/project/zodipy)\n[![Actions Status](https://img.shields.io/github/actions/workflow/status/Cosmoglobe/Zodipy/tests.yml?branch=main&logo=github)](https://github.com/Cosmoglobe/Zodipy/actions)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Cosmoglobe/zodipy/mkdocs-deploy.yml?branch=main&style=flat-square&logo=github&label=docs)\n[![Project Status: Active \u2013 The project has reached a stable, usable state and is being actively developed.](https://img.shields.io/badge/repo_status-Active-success)](https://www.repostatus.org/#active)\n[![Codecov](https://img.shields.io/codecov/c/github/Cosmoglobe/zodipy?token=VZP9L79EUJ&logo=codecov)](https://app.codecov.io/gh/Cosmoglobe/zodipy)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![pyOpenSci](https://tinyurl.com/y22nb8up)](https://github.com/pyOpenSci/software-review/issues/161)\n[![ascl:2306.012](https://img.shields.io/badge/ascl-2306.012-blue.svg?colorB=262255)](https://ascl.net/2306.012)\n[![DOI](https://zenodo.org/badge/394929213.svg)](https://zenodo.org/doi/10.5281/zenodo.10999611)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.06648/status.svg)](https://doi.org/10.21105/joss.06648)\n---\n\n\nZodiPy is an [Astropy affiliated](https://www.astropy.org/affiliated/) package for simulating zodiacal light in intensity for arbitrary Solar system observers.\n\n![plot](docs/img/zodipy_map.png)\n\n## Documentation\nSee the [documentation](https://cosmoglobe.github.io/zodipy/) for more information and examples on how to use ZodiPy for different applications.\n\n## A simple example\n```python\nimport astropy.units as u\nfrom astropy.time import Time\n\nfrom zodipy import Zodipy\n\n\nmodel = Zodipy(model=\"dirbe\")\n\nemission = model.get_emission_ang(\n    25 * u.micron,\n    theta=[10, 10.1, 10.2] * u.deg,\n    phi=[90, 89, 88] * u.deg,\n    obs_time=Time(\"2022-01-01 12:00:00\"),\n    obs=\"earth\",\n)\n\nprint(emission)\n#> [15.35392831 15.35495051 15.35616009] MJy / sr\n```\n\n## Related scientific papers\nSee [CITATION](https://github.com/Cosmoglobe/zodipy/blob/dev/CITATION.bib)\n- [Cosmoglobe: Simulating zodiacal emission with ZodiPy (San et al. 2022)](https://arxiv.org/abs/2205.12962). \n- [ZodiPy: A Python package for zodiacal light simulations (San 2024)](https://joss.theoj.org/papers/10.21105/joss.06648#). \n\n\n## Install\nZodiPy is installed using `pip install zodipy`.\n\n## Dependencies\nZodiPy supports all Python versions >= 3.9, and has the following dependencies:\n- [Astropy](https://www.astropy.org/) (>=5.0.1)\n- [NumPy](https://numpy.org/)\n- [healpy](https://healpy.readthedocs.io/en/latest/)\n- [jplephem](https://pypi.org/project/jplephem/)\n- [SciPy](https://scipy.org/)\n\n## For developers\nContributing developers will need to download the following additional dependencies to test, lint, format and build documentation locally:\n- pytest\n- pytest-cov\n- hypothesis\n- coverage\n- ruff\n- mypy\n- pre-commit\n- mkdocs\n- pymdown-extensions\n- markdown-include\n- mkdocs-material\n- mkdocstrings\n- mkdocstrings-python\n- markdown (<3.4.0)\n\nwhich are required to test and build ZodiPy.\n\n### Poetry\nDevelopers can install ZodiPy through [Poetry](https://python-poetry.org/) (Poetry >= 1.8.0) by first cloning or forking the repository, and then running \n```\npoetry install\n```\nin a virtual environment from the repository root. This will read the `pyproject.toml` file in the repository and install all dependencies. \n\n### pip\nDevelopers not using Poetry can install ZodiPy in a virtual environment with all dependencies by first cloning or forking the repository and then running \n```\npip install -r requirements-dev.txt\n```\nfrom the repositry root. This will read and download all the dependencies from the `requirements-dev.txt` file in the repository. \n\nNote 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\n\n### Tests, linting and formatting\nThe 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)\n\n- [pytest](https://docs.pytest.org/en/8.0.x/): Tests are run with pytest by simply running `pytest` in the command line in the root of the repository. \n- [ruff](https://github.com/astral-sh/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. \n- [mypy](https://mypy-lang.org/): Type checking is done with `mypy` by simply running `mypy zodipy/` in the root of the repository.\n\nRemeber to add tests when implementing new features to maintain a high code coverage.\n\n### Documentation\nWe use [MkDocs](https://www.mkdocs.org/) to create our documentation. The documentation is built locally with `mkdocs build` from the repository root, and served with `mkdocs serve`.\n\n\n## Funding\nThis 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).\n\n\n<div style=\"display: flex; flex-direction: row; justify-content: space-evenly\">\n    <img style=\"width: 49%; height: auto; max-width: 500px; align-self: center\" src=\"https://user-images.githubusercontent.com/28634670/170697040-d5ec2935-29d0-4847-8999-9bc4eaa59e56.jpeg\"> \n    &nbsp; \n    <img style=\"width: 49%; height: auto; max-width: 500px; align-self: center\" src=\"https://user-images.githubusercontent.com/28634670/170697140-b010aa69-9f9a-44c0-b702-8a05ec0b6d3e.jpeg\">\n</div>\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "A Python package for zodiacal light simulations",
    "version": "0.9.2",
    "project_urls": {
        "documentation": "https://cosmoglobe.github.io/zodipy/",
        "repository": "https://github.com/cosmoglobe/zodipy"
    },
    "split_keywords": [
        "astronomy",
        " astrophysics",
        " cosmology",
        " space",
        " science"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d250ebf12af252dde985d9f4a006125746b260fe88e2cc8287c312d05f6fcd0",
                "md5": "0fba2dd12639769b0ff966179cc8dad4",
                "sha256": "62965d2533d4b937083aaff75da2e4185c068b1b41eda78cda6385d81f3fb09e"
            },
            "downloads": -1,
            "filename": "zodipy-0.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0fba2dd12639769b0ff966179cc8dad4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 41121,
            "upload_time": "2024-04-20T15:02:08",
            "upload_time_iso_8601": "2024-04-20T15:02:08.165993Z",
            "url": "https://files.pythonhosted.org/packages/2d/25/0ebf12af252dde985d9f4a006125746b260fe88e2cc8287c312d05f6fcd0/zodipy-0.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0775aa4caa309d80f6d84a1396998f72b1a0a83c4ed38075614d03d316f62b4e",
                "md5": "81d5e028a92b0c4e185e329222fe2719",
                "sha256": "5c1dea3ff423b2238f3a0290ce9c7ab758c1e949f6ecaf10f30cdb6efd9ac303"
            },
            "downloads": -1,
            "filename": "zodipy-0.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "81d5e028a92b0c4e185e329222fe2719",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 38089,
            "upload_time": "2024-04-20T15:02:09",
            "upload_time_iso_8601": "2024-04-20T15:02:09.830598Z",
            "url": "https://files.pythonhosted.org/packages/07/75/aa4caa309d80f6d84a1396998f72b1a0a83c4ed38075614d03d316f62b4e/zodipy-0.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-20 15:02:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cosmoglobe",
    "github_project": "zodipy",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "zodipy"
}
        
Elapsed time: 0.27469s