surveycodex


Namesurveycodex JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/LSSTDESC/surveycodex
SummaryTiny library of galaxy surveys most useful parameters with units
upload_time2024-07-12 16:29:38
maintainerNone
docs_urlNone
authorAlexandre Boucaud
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [**Main documentation**](https://aboucaud.github.io/galcheat/) | [**Getting started**](#getting-started) | [**CLI**](#cli) | [**API**](#api) | [**Contributing**](#contributing) | [**License**](#license)

<!-- <br>
<img src="docs/images/surveycodex_logo.png" alt="surveycodex" height=200px>
</p> -->

# SurveyCodex

[![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/LSSTDESC/surveycodex/actions/workflows/python-package.yml
[gh-workflow-badge]: https://github.com/LSSTDESC/surveycodex/actions/workflows/python-package.yml/badge.svg
[license-badge]: https://img.shields.io/github/license/LSSTDESC/surveycodex?color=blue
[pyversion-badge]: https://img.shields.io/pypi/pyversions/surveycodex?color=yellow&logo=pypi
[pypi-badge]: https://badge.fury.io/py/surveycodex.svg
[pypi]: https://pypi.org/project/surveycodex/

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 surveycodex
```

CLI
---

Print the available surveys and associated filters

```sh
surveycodex
```

### 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
surveycodex -s LSST         # LSST info
surveycodex --refs          # all surveys info with refs
surveycodex --refs -s HSC   # HSC info with refs
surveycodex -s LSST --rich  # pretty print rich terminal output for LSST info
```

API
---
```python
import surveycodex

# Start with the list of available surveys
surveycodex.available_surveys

# Retrieve a Survey instance
LSST = surveycodex.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/LSSTDESC/surveycodex/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/LSSTDESC/surveycodex/pulls?q=is%3Apr+reviewed-by%3ALSSTDESC" 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/LSSTDESC/surveycodex/commits?author=mpaillassa" title="Code">💻</a> <a href="https://github.com/LSSTDESC/surveycodex/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/LSSTDESC/surveycodex/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/LSSTDESC/surveycodex/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/LSSTDESC/surveycodex",
    "name": "surveycodex",
    "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/8b/44/88f10c09c07d278f78145305474f73a6d4b1cd8927c30fffa1a81e2cd2c5/surveycodex-1.2.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/surveycodex_logo.png\" alt=\"surveycodex\" height=200px>\n</p> -->\n\n# SurveyCodex\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/LSSTDESC/surveycodex/actions/workflows/python-package.yml\n[gh-workflow-badge]: https://github.com/LSSTDESC/surveycodex/actions/workflows/python-package.yml/badge.svg\n[license-badge]: https://img.shields.io/github/license/LSSTDESC/surveycodex?color=blue\n[pyversion-badge]: https://img.shields.io/pypi/pyversions/surveycodex?color=yellow&logo=pypi\n[pypi-badge]: https://badge.fury.io/py/surveycodex.svg\n[pypi]: https://pypi.org/project/surveycodex/\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 surveycodex\n```\n\nCLI\n---\n\nPrint the available surveys and associated filters\n\n```sh\nsurveycodex\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\nsurveycodex -s LSST         # LSST info\nsurveycodex --refs          # all surveys info with refs\nsurveycodex --refs -s HSC   # HSC info with refs\nsurveycodex -s LSST --rich  # pretty print rich terminal output for LSST info\n```\n\nAPI\n---\n```python\nimport surveycodex\n\n# Start with the list of available surveys\nsurveycodex.available_surveys\n\n# Retrieve a Survey instance\nLSST = surveycodex.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/LSSTDESC/surveycodex/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/LSSTDESC/surveycodex/pulls?q=is%3Apr+reviewed-by%3ALSSTDESC\" 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/LSSTDESC/surveycodex/commits?author=mpaillassa\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/LSSTDESC/surveycodex/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/LSSTDESC/surveycodex/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/LSSTDESC/surveycodex/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.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/LSSTDESC/surveycodex/issues",
        "Homepage": "https://github.com/LSSTDESC/surveycodex"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f094639e9649677771d80ce66d14aaf406f7b9a8999a9e0f639914f5963f0c7",
                "md5": "aea02c656f59819d0c7a105e0379b627",
                "sha256": "ade9ac8de3b2c27e3045a10dd05f957e78c52c59bd9ae63ab2fda84475b89f7f"
            },
            "downloads": -1,
            "filename": "surveycodex-1.2.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aea02c656f59819d0c7a105e0379b627",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 18016,
            "upload_time": "2024-07-12T16:29:35",
            "upload_time_iso_8601": "2024-07-12T16:29:35.913962Z",
            "url": "https://files.pythonhosted.org/packages/6f/09/4639e9649677771d80ce66d14aaf406f7b9a8999a9e0f639914f5963f0c7/surveycodex-1.2.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8b4488f10c09c07d278f78145305474f73a6d4b1cd8927c30fffa1a81e2cd2c5",
                "md5": "413b6f0b6c65c8cfe49aaa36905c0f4d",
                "sha256": "5cf63fa7677a0f69f82640b3f6fe637a48697069839d398ab07852fbe9a38316"
            },
            "downloads": -1,
            "filename": "surveycodex-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "413b6f0b6c65c8cfe49aaa36905c0f4d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 261266,
            "upload_time": "2024-07-12T16:29:38",
            "upload_time_iso_8601": "2024-07-12T16:29:38.115266Z",
            "url": "https://files.pythonhosted.org/packages/8b/44/88f10c09c07d278f78145305474f73a6d4b1cd8927c30fffa1a81e2cd2c5/surveycodex-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-12 16:29:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LSSTDESC",
    "github_project": "surveycodex",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "surveycodex"
}
        
Elapsed time: 0.29555s