zodipy


Namezodipy JSON
Version 1.1.0 PyPI version JSON
download
home_pageNone
SummaryA Python package for zodiacal light simulations
upload_time2024-09-27 14:41:24
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/#affiliated-package-list) 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 a list of supported zodiacal light models and examples of how to use ZodiPy.

## A simple example
```python
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](https://github.com/Cosmoglobe/zodipy/blob/main/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 with pip
```bash
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/)
- [jplephem](https://pypi.org/project/jplephem/)
- [SciPy](https://scipy.org/)

## For developers
### Poetry
ZodiPy uses [Poetry](https://python-poetry.org/) 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](https://python-poetry.org/docs/) 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](https://docs.pytest.org/en/8.0.x/). To run the tests, run the following command from the repository root
```bash
pytest
``` 
#### ruff
Formating and linting is done with [ruff](https://github.com/astral-sh/ruff). To format and lint, run the following command from the repository root
```bash
ruff check
ruff format
``` 
#### mypy
ZodiPy is fully typed. We use [mypy](https://mypy-lang.org/) as a static type checker. To type check, run the following command from the repositry root

```bash
mypy zodipy/
```
Remeber to add tests when implementing new features to maintain a high code coverage.

#### MkDocs
We use [MkDocs](https://www.mkdocs.org/) to create our documentation. To serve the docs locally on you machine, run the following from the repositry root
```bash
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/85/68/ce855e44cbce17af0c46a8b711527af10a5d0663dc67ddf80812b303df17/zodipy-1.1.0.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\n\nZodiPy is an [Astropy affiliated](https://www.astropy.org/affiliated/#affiliated-package-list) package for simulating zodiacal light in intensity for arbitrary solar system observers.\n\n![plot](docs/img/zodipy_map.png)\n\n\n## Documentation\nSee the [documentation](https://cosmoglobe.github.io/zodipy/) for a list of supported zodiacal light models and examples of how to use ZodiPy.\n\n## A simple example\n```python\nimport astropy.units as u\nfrom astropy.coordinates import SkyCoord\nfrom astropy.time import Time\n\nimport zodipy\n\n# Initialize a zodiacal light model at a wavelength/frequency or over a bandpass\nmodel = zodipy.Model(25*u.micron)\n\n# Use Astropy's `SkyCoord` object to specify coordinates\nlon = [10, 10.1, 10.2] * u.deg\nlat = [90, 89, 88] * u.deg\nobstimes = Time([\"2022-01-01 12:00:00\", \"2022-01-01 12:01:00\", \"2022-01-01 12:02:00\"])\nskycoord = SkyCoord(lon, lat, obstime=obstimes, frame=\"galactic\")\n\n# Evaluate the zodiacal light model\nemission = model.evaluate(skycoord)\n\nprint(emission)\n#> [27.52410841 27.66572294 27.81251906] MJy / sr\n```\n\n## Related scientific papers\nSee [CITATION](https://github.com/Cosmoglobe/zodipy/blob/main/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 with pip\n```bash\npip install zodipy\n```\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- [jplephem](https://pypi.org/project/jplephem/)\n- [SciPy](https://scipy.org/)\n\n## For developers\n### Poetry\nZodiPy uses [Poetry](https://python-poetry.org/) 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](https://python-poetry.org/docs/) for installation guide. \n\nAfter poetry has been installed, developers should create a new virtual environment and run the following in the root of the ZodiPy repositry\n```\npoetry install\n```\nThis will download all dependencies (including dev)from `pyproject.toml`, and `poetry.lock`.\n\n### Tests, linting and formatting, and building documentation\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\nTesting is done with [pytest](https://docs.pytest.org/en/8.0.x/). To run the tests, run the following command from the repository root\n```bash\npytest\n``` \n#### ruff\nFormating and linting is done with [ruff](https://github.com/astral-sh/ruff). To format and lint, run the following command from the repository root\n```bash\nruff check\nruff format\n``` \n#### mypy\nZodiPy is fully typed. We use [mypy](https://mypy-lang.org/) as a static type checker. To type check, run the following command from the repositry root\n\n```bash\nmypy zodipy/\n```\nRemeber to add tests when implementing new features to maintain a high code coverage.\n\n#### MkDocs\nWe use [MkDocs](https://www.mkdocs.org/) to create our documentation. To serve the docs locally on you machine, run the following from the repositry root\n```bash\nmkdocs 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": "1.1.0",
    "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": "7cd3005962eb31309466fa3151d8d15af2fe60a43b8f21f18316501d390ffe10",
                "md5": "6522bab8041049eef0f3ff3b8dfbed92",
                "sha256": "fd73edd7cb1b5a5193189774ccb9ff6aa50c38f1f5d9f7695ab61c7f752c54d8"
            },
            "downloads": -1,
            "filename": "zodipy-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6522bab8041049eef0f3ff3b8dfbed92",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 37552,
            "upload_time": "2024-09-27T14:41:22",
            "upload_time_iso_8601": "2024-09-27T14:41:22.735759Z",
            "url": "https://files.pythonhosted.org/packages/7c/d3/005962eb31309466fa3151d8d15af2fe60a43b8f21f18316501d390ffe10/zodipy-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8568ce855e44cbce17af0c46a8b711527af10a5d0663dc67ddf80812b303df17",
                "md5": "63b4c1b33aff3ca7d5742a557ec5c332",
                "sha256": "ed773e193a53c8e45893d9329b4bbafcdc2e048235dade933f16dffc8a532994"
            },
            "downloads": -1,
            "filename": "zodipy-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "63b4c1b33aff3ca7d5742a557ec5c332",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 35727,
            "upload_time": "2024-09-27T14:41:24",
            "upload_time_iso_8601": "2024-09-27T14:41:24.374505Z",
            "url": "https://files.pythonhosted.org/packages/85/68/ce855e44cbce17af0c46a8b711527af10a5d0663dc67ddf80812b303df17/zodipy-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-27 14:41:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cosmoglobe",
    "github_project": "zodipy",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "zodipy"
}
        
Elapsed time: 3.18913s