[**Main documentation**](https://aboucaud.github.io/galcheat/) | [**Getting started**](#getting-started) | [**CLI**](#cli) | [**API**](#api) | [**Contributing**](#contributing) | [**License**](#license)
<br>
<img src="docs/images/galcheat_logo.png" alt="galcheat" height=200px>
</p>
[![Python package][gh-workflow-badge]][gh-workflow]
[![License][license-badge]](LICENSE)
![Python supported versions][pyversion-badge]
[![PyPI][pypi-badge]][pypi]<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
[gh-workflow]: https://github.com/aboucaud/galcheat/actions/workflows/python-package.yml
[gh-workflow-badge]: https://github.com/aboucaud/galcheat/actions/workflows/python-package.yml/badge.svg
[license-badge]: https://img.shields.io/github/license/aboucaud/galcheat?color=blue
[pyversion-badge]: https://img.shields.io/pypi/pyversions/galcheat?color=yellow&logo=pypi
[pypi-badge]: https://badge.fury.io/py/galcheat.svg
[pypi]: https://pypi.org/project/galcheat/
Tiny package containing useful parameters from main galaxy surveys (**with units**).
The goal of this project is to provide a Python library with minimal dependencies that centralises galaxy survey properties with adequate reference. Such information tends to be scattered in many places or is often copy/pasted without all of the relevant information like units or sources.
The current parameters and the corresponding units are specified in the [documentation](https://aboucaud.github.io/galcheat/parameters.html)
Getting started
---------------
Install the latest version of the library
```sh
pip install -U galcheat
```
CLI
---
Print the available surveys and associated filters
```sh
galcheat
```
### Options
- **`-s <survey>`**: print information for a given survey
- **`--refs`**: print the source for each parameter
- **`--rich`**: use pretty printing for the terminal (needs the `rich` library installed)
- **`-h, --help`**: get help
### Examples
```sh
galcheat -s LSST # LSST info
galcheat --refs # all surveys info with refs
galcheat --refs -s HSC # HSC info with refs
galcheat -s LSST --rich # pretty print rich terminal output for LSST info
```
API
---
```python
import galcheat
# Start with the list of available surveys
galcheat.available_surveys
# Retrieve a Survey instance
LSST = galcheat.get_survey("LSST")
# List the available survey filters
LSST.available_filters
# Pick a Filter instance
u_band = LSST.get_filter("u")
# Both Survey and Filter objects have physical attributes
LSST.mirror_diameter
u_band.full_exposure_time
# These attributes are Astropy Quantity objects
# whose value can be retrieved in any desired unit
u_band.psf_fwhm.to_value('arcmin')
```
## Contributing ✨
This project was started in the context of the [BlendingToolKit (BTK)][github-btk] and [WeakLensingDeblending][github-wld] projects and has received contributions from these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://aboucaud.github.io"><img src="https://avatars.githubusercontent.com/u/3065310?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alexandre Boucaud</b></sub></a><br /><a href="https://github.com/aboucaud/galcheat/commits?author=aboucaud" title="Code">💻</a> <a href="#ideas-aboucaud" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-aboucaud" title="Maintenance">🚧</a> <a href="https://github.com/aboucaud/galcheat/pulls?q=is%3Apr+reviewed-by%3Aaboucaud" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/mpaillassa"><img src="https://avatars.githubusercontent.com/u/9745094?v=4?s=100" width="100px;" alt=""/><br /><sub><b>mpaillassa</b></sub></a><br /><a href="https://github.com/aboucaud/galcheat/commits?author=mpaillassa" title="Code">💻</a> <a href="https://github.com/aboucaud/galcheat/pulls?q=is%3Apr+reviewed-by%3Ampaillassa" title="Reviewed Pull Requests">👀</a> <a href="#data-mpaillassa" title="Data">🔣</a></td>
<td align="center"><a href="https://ismael-mendoza.github.io/"><img src="https://avatars.githubusercontent.com/u/11745764?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ismael Mendoza</b></sub></a><br /><a href="#ideas-ismael-mendoza" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/aboucaud/galcheat/pulls?q=is%3Apr+reviewed-by%3Aismael-mendoza" title="Reviewed Pull Requests">👀</a> <a href="#data-ismael-mendoza" title="Data">🔣</a></td>
<td align="center"><a href="https://github.com/HironaoMiyatake"><img src="https://avatars.githubusercontent.com/u/1507529?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hironao Miyatake</b></sub></a><br /><a href="https://github.com/aboucaud/galcheat/commits?author=HironaoMiyatake" title="Code">💻</a> <a href="#data-HironaoMiyatake" title="Data">🔣</a></td>
<td align="center"><a href="https://github.com/aguinot"><img src="https://avatars.githubusercontent.com/u/39480528?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Axel Guinot</b></sub></a><br /><a href="#data-aguinot" title="Data">🔣</a></td>
<td align="center"><a href="https://github.com/thuiop"><img src="https://avatars.githubusercontent.com/u/1338337?v=4?s=100" width="100px;" alt=""/><br /><sub><b>thuiop</b></sub></a><br /><a href="#ideas-thuiop" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://remyjoseph.wordpress.com/"><img src="https://avatars.githubusercontent.com/u/16084926?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rémy Joseph</b></sub></a><br /><a href="#ideas-herjy" title="Ideas, Planning, & Feedback">🤔</a></td>
</tr>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
A number is missing? An error slipped into the files? A survey is not included in the list and you can provide the relevant information or some of it?
Contributions of any kind are welcome! Head over to the [contributing guidelines](CONTRIBUTING.md) to learn how to participate into making this library more robust and complete.
[github-wld]: https://github.com/LSSTDESC/WeakLensingDeblending
[github-btk]: https://github.com/LSSTDESC/BlendingToolKit
License
-------
This project is developed under an MIT-license. See [LICENSE file](LICENSE) for more information.
Raw data
{
"_id": null,
"home_page": "https://github.com/aboucaud/galcheat",
"name": "galcheat",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Alexandre Boucaud",
"author_email": "aboucaud@apc.in2p3.fr",
"download_url": "https://files.pythonhosted.org/packages/07/aa/0dad52da7ddf9995b780eb711546671286e46d10a53d7e967065876ee0a1/galcheat-1.1.0.tar.gz",
"platform": "any",
"description": "[**Main documentation**](https://aboucaud.github.io/galcheat/) | [**Getting started**](#getting-started) | [**CLI**](#cli) | [**API**](#api) | [**Contributing**](#contributing) | [**License**](#license)\n\n<br>\n<img src=\"docs/images/galcheat_logo.png\" alt=\"galcheat\" height=200px>\n</p>\n\n[![Python package][gh-workflow-badge]][gh-workflow]\n[![License][license-badge]](LICENSE)\n![Python supported versions][pyversion-badge]\n[![PyPI][pypi-badge]][pypi]<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\n[gh-workflow]: https://github.com/aboucaud/galcheat/actions/workflows/python-package.yml\n[gh-workflow-badge]: https://github.com/aboucaud/galcheat/actions/workflows/python-package.yml/badge.svg\n[license-badge]: https://img.shields.io/github/license/aboucaud/galcheat?color=blue\n[pyversion-badge]: https://img.shields.io/pypi/pyversions/galcheat?color=yellow&logo=pypi\n[pypi-badge]: https://badge.fury.io/py/galcheat.svg\n[pypi]: https://pypi.org/project/galcheat/\n\nTiny package containing useful parameters from main galaxy surveys (**with units**).\n\nThe goal of this project is to provide a Python library with minimal dependencies that centralises galaxy survey properties with adequate reference. Such information tends to be scattered in many places or is often copy/pasted without all of the relevant information like units or sources.\n\nThe current parameters and the corresponding units are specified in the [documentation](https://aboucaud.github.io/galcheat/parameters.html)\n\nGetting started\n---------------\nInstall the latest version of the library\n```sh\npip install -U galcheat\n```\n\nCLI\n---\n\nPrint the available surveys and associated filters\n\n```sh\ngalcheat\n```\n\n### Options\n- **`-s <survey>`**: print information for a given survey\n- **`--refs`**: print the source for each parameter\n- **`--rich`**: use pretty printing for the terminal (needs the `rich` library installed)\n- **`-h, --help`**: get help\n\n### Examples\n```sh\ngalcheat -s LSST # LSST info\ngalcheat --refs # all surveys info with refs\ngalcheat --refs -s HSC # HSC info with refs\ngalcheat -s LSST --rich # pretty print rich terminal output for LSST info\n```\n\nAPI\n---\n```python\nimport galcheat\n\n# Start with the list of available surveys\ngalcheat.available_surveys\n\n# Retrieve a Survey instance\nLSST = galcheat.get_survey(\"LSST\")\n\n# List the available survey filters\nLSST.available_filters\n\n# Pick a Filter instance\nu_band = LSST.get_filter(\"u\")\n\n# Both Survey and Filter objects have physical attributes\nLSST.mirror_diameter\n\nu_band.full_exposure_time\n\n# These attributes are Astropy Quantity objects\n# whose value can be retrieved in any desired unit\nu_band.psf_fwhm.to_value('arcmin')\n```\n\n## Contributing \u2728\n\nThis project was started in the context of the [BlendingToolKit (BTK)][github-btk] and [WeakLensingDeblending][github-wld] projects and has received contributions from these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n <tr>\n <td align=\"center\"><a href=\"https://aboucaud.github.io\"><img src=\"https://avatars.githubusercontent.com/u/3065310?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Alexandre Boucaud</b></sub></a><br /><a href=\"https://github.com/aboucaud/galcheat/commits?author=aboucaud\" title=\"Code\">\ud83d\udcbb</a> <a href=\"#ideas-aboucaud\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a> <a href=\"#maintenance-aboucaud\" title=\"Maintenance\">\ud83d\udea7</a> <a href=\"https://github.com/aboucaud/galcheat/pulls?q=is%3Apr+reviewed-by%3Aaboucaud\" title=\"Reviewed Pull Requests\">\ud83d\udc40</a></td>\n <td align=\"center\"><a href=\"https://github.com/mpaillassa\"><img src=\"https://avatars.githubusercontent.com/u/9745094?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>mpaillassa</b></sub></a><br /><a href=\"https://github.com/aboucaud/galcheat/commits?author=mpaillassa\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/aboucaud/galcheat/pulls?q=is%3Apr+reviewed-by%3Ampaillassa\" title=\"Reviewed Pull Requests\">\ud83d\udc40</a> <a href=\"#data-mpaillassa\" title=\"Data\">\ud83d\udd23</a></td>\n <td align=\"center\"><a href=\"https://ismael-mendoza.github.io/\"><img src=\"https://avatars.githubusercontent.com/u/11745764?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ismael Mendoza</b></sub></a><br /><a href=\"#ideas-ismael-mendoza\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a> <a href=\"https://github.com/aboucaud/galcheat/pulls?q=is%3Apr+reviewed-by%3Aismael-mendoza\" title=\"Reviewed Pull Requests\">\ud83d\udc40</a> <a href=\"#data-ismael-mendoza\" title=\"Data\">\ud83d\udd23</a></td>\n <td align=\"center\"><a href=\"https://github.com/HironaoMiyatake\"><img src=\"https://avatars.githubusercontent.com/u/1507529?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Hironao Miyatake</b></sub></a><br /><a href=\"https://github.com/aboucaud/galcheat/commits?author=HironaoMiyatake\" title=\"Code\">\ud83d\udcbb</a> <a href=\"#data-HironaoMiyatake\" title=\"Data\">\ud83d\udd23</a></td>\n <td align=\"center\"><a href=\"https://github.com/aguinot\"><img src=\"https://avatars.githubusercontent.com/u/39480528?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Axel Guinot</b></sub></a><br /><a href=\"#data-aguinot\" title=\"Data\">\ud83d\udd23</a></td>\n <td align=\"center\"><a href=\"https://github.com/thuiop\"><img src=\"https://avatars.githubusercontent.com/u/1338337?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>thuiop</b></sub></a><br /><a href=\"#ideas-thuiop\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a></td>\n <td align=\"center\"><a href=\"https://remyjoseph.wordpress.com/\"><img src=\"https://avatars.githubusercontent.com/u/16084926?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>R\u00e9my Joseph</b></sub></a><br /><a href=\"#ideas-herjy\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a></td>\n </tr>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.\n\nA number is missing? An error slipped into the files? A survey is not included in the list and you can provide the relevant information or some of it?\n\nContributions of any kind are welcome! Head over to the [contributing guidelines](CONTRIBUTING.md) to learn how to participate into making this library more robust and complete.\n\n[github-wld]: https://github.com/LSSTDESC/WeakLensingDeblending\n[github-btk]: https://github.com/LSSTDESC/BlendingToolKit\n\nLicense\n-------\nThis project is developed under an MIT-license. See [LICENSE file](LICENSE) for more information.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Tiny library of galaxy surveys most useful parameters with units",
"version": "1.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/aboucaud/galcheat/issues",
"Homepage": "https://github.com/aboucaud/galcheat"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5e45f761fbb7833494a085a69018e2a3eac32878bbf4452ea7aabc1ae85df691",
"md5": "72bd506599605e5640e4d3d1b6b3838a",
"sha256": "6cdc8f71c4bb6e76a55a2d810d4c3f91c58254e69adae88e0294bb34d8145f64"
},
"downloads": -1,
"filename": "galcheat-1.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "72bd506599605e5640e4d3d1b6b3838a",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 17792,
"upload_time": "2024-04-09T17:46:04",
"upload_time_iso_8601": "2024-04-09T17:46:04.048302Z",
"url": "https://files.pythonhosted.org/packages/5e/45/f761fbb7833494a085a69018e2a3eac32878bbf4452ea7aabc1ae85df691/galcheat-1.1.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "07aa0dad52da7ddf9995b780eb711546671286e46d10a53d7e967065876ee0a1",
"md5": "b3313be13b4de3a2e8ee45285106fcee",
"sha256": "08a6c6d193910c6f410ca229fccd01991a3865719bf164197ea9077eba768627"
},
"downloads": -1,
"filename": "galcheat-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b3313be13b4de3a2e8ee45285106fcee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 259510,
"upload_time": "2024-04-09T17:46:05",
"upload_time_iso_8601": "2024-04-09T17:46:05.816095Z",
"url": "https://files.pythonhosted.org/packages/07/aa/0dad52da7ddf9995b780eb711546671286e46d10a53d7e967065876ee0a1/galcheat-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-09 17:46:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aboucaud",
"github_project": "galcheat",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "galcheat"
}