diff --git a/.all-contributorsrc b/.all-contributorsrc index 1dbcd96..0ec47df 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -78,8 +78,8 @@ } ], "contributorsPerLine": 7, - "projectName": "galcheat", - "projectOwner": "aboucaud", + "projectName": "surveycodex", + "projectOwner": "LSSTDESC", "repoType": "github", "repoHost": "https://github.com", "skipCi": true diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 08c722b..e427579 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -31,10 +31,10 @@ jobs: pip install ".[dev]" - name: Test the code demo run: | - python -m galcheat + python -m surveycodex - name: Test the console script run: | - galcheat --refs + surveycodex --refs - name: Test the scripts run: | for pyscript in scripts/*.py; do python ${pyscript}; done diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e3f757b..eb74fc2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to `galcheat` +# Contributing to `surveycodex` -We appreciate that you want to contribute to `galcheat`. Your time is valuable, and your contribution means a lot. +We appreciate that you want to contribute to `surveycodex`. Your time is valuable, and your contribution means a lot. ## Important! @@ -16,20 +16,20 @@ There are several ways to contribute, namely: - Add, update or correct information through [pull-requests](#pull-requests) -**Showing support for** `galcheat` +**Showing support for** `surveycodex` -Don't have time to contribute? No worries, here are some other ways to show your support for `galcheat`: +Don't have time to contribute? No worries, here are some other ways to show your support for `surveycodex`: -- star the [project](https://github.com/aboucaud/galcheat) (creates visibility) +- star the [project](https://github.com/LSSTDESC/surveycodex) (creates visibility) - mention it around ## Issues -To create an issue, go to https://github.com/aboucaud/galcheat/issues/new, provide it with a meaningful title and a description, as well as labels if appropriate. +To create an issue, go to https://github.com/LSSTDESC/surveycodex/issues/new, provide it with a meaningful title and a description, as well as labels if appropriate. ## Pull-requests -To add, update or correct information, the first step is to setup a development environment for `galcheat` and then create feature branches for a given [pull-request](https://github.com/aboucaud/galcheat/pulls). +To add, update or correct information, the first step is to setup a development environment for `surveycodex` and then create feature branches for a given [pull-request](https://github.com/LSSTDESC/surveycodex/pulls). > Note that you will have to [fork the project](https://guides.github.com/activities/forking/) to contribute. @@ -37,8 +37,8 @@ To add, update or correct information, the first step is to setup a development - Clone the project ```sh - git clone https://github.com/aboucaud/galcheat - cd galcheat + git clone https://github.com/LSSTDESC/surveycodex + cd surveycodex ``` - Setup the virtual environment with the dev tools ```sh @@ -46,7 +46,7 @@ To add, update or correct information, the first step is to setup a development source venv/bin/activate python -m pip install -U pip ``` -- Install `galcheat` with developer libs +- Install `surveycodex` with developer libs ```sh pip install -e ".[dev]" ``` @@ -61,10 +61,10 @@ To add, update or correct information, the first step is to setup a development ### Create a fork (do once) -- [Fork the galcheat project](https://guides.github.com/activities/forking/) +- [Fork the surveycodex project](https://guides.github.com/activities/forking/) - Add the fork to the list of remote servers ```sh - git remote add fork git@github.com:/galcheat.git + git remote add fork git@github.com:/surveycodex.git ``` ### Code in a feature branch @@ -88,4 +88,4 @@ To add, update or correct information, the first step is to setup a development git push -u fork featbranch # the first time to set the target remote git push # afterwards ``` -6. Create [the pull-request](https://github.com/aboucaud/galcheat/pulls) and iterate from 3. until it is merged. +6. Create [the pull-request](https://github.com/LSSTDESC/surveycodex/pulls) and iterate from 3. until it is merged. diff --git a/README.md b/README.md index 789acc6..d446824 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ [**Main documentation**](https://aboucaud.github.io/galcheat/) | [**Getting started**](#getting-started) | [**CLI**](#cli) | [**API**](#api) | [**Contributing**](#contributing) | [**License**](#license) -
-galcheat -

+ + +# SurveyCodex [![Python package][gh-workflow-badge]][gh-workflow] [![License][license-badge]](LICENSE) @@ -11,12 +13,12 @@ [![All Contributors](https://img.shields.io/badge/all_contributors-7-orange.svg?style=flat-square)](#contributors-) -[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/ +[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**). @@ -28,7 +30,7 @@ Getting started --------------- Install the latest version of the library ```sh -pip install -U galcheat +pip install -U surveycodex ``` CLI @@ -37,7 +39,7 @@ CLI Print the available surveys and associated filters ```sh -galcheat +surveycodex ``` ### Options @@ -48,22 +50,22 @@ galcheat ### 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 +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 galcheat +import surveycodex # Start with the list of available surveys -galcheat.available_surveys +surveycodex.available_surveys # Retrieve a Survey instance -LSST = galcheat.get_survey("LSST") +LSST = surveycodex.get_survey("LSST") # List the available survey filters LSST.available_filters @@ -90,10 +92,10 @@ This project was started in the context of the [BlendingToolKit (BTK)][github-bt - - - - + + + + diff --git a/docs/api/filter.md b/docs/api/filter.md index da237c3..940f8c3 100644 --- a/docs/api/filter.md +++ b/docs/api/filter.md @@ -1,3 +1,3 @@ -# galcheat.filter +# surveycodex.filter -::: galcheat.filter +::: surveycodex.filter diff --git a/docs/api/helpers.md b/docs/api/helpers.md index 5eb5249..eb47621 100644 --- a/docs/api/helpers.md +++ b/docs/api/helpers.md @@ -1,3 +1,3 @@ -# galcheat.helpers +# surveycodex.helpers - + diff --git a/docs/api/survey.md b/docs/api/survey.md index a6bd355..1b8cf46 100644 --- a/docs/api/survey.md +++ b/docs/api/survey.md @@ -1,3 +1,3 @@ -# galcheat.survey +# surveycodex.survey -::: galcheat.survey +::: surveycodex.survey diff --git a/docs/api/utilities.md b/docs/api/utilities.md index 18f4be5..5414ce9 100644 --- a/docs/api/utilities.md +++ b/docs/api/utilities.md @@ -1,3 +1,3 @@ -# galcheat.utilities +# surveycodex.utilities -::: galcheat.utilities +::: surveycodex.utilities diff --git a/docs/guides/create-galaxy.md b/docs/guides/create-galaxy.md index ff675de..b5e3969 100644 --- a/docs/guides/create-galaxy.md +++ b/docs/guides/create-galaxy.md @@ -1,32 +1,32 @@ -# Simulate a simple galaxy with galcheat and GalSim +# Simulate a simple galaxy with surveycodex and GalSim -In this tutorial, we will see how we can use the survey parameters in galcheat +In this tutorial, we will see how we can use the survey parameters in surveycodex to create a simple elliptical galaxy with galsim. The galaxy will be convolved with a optical+atmospheric component PSF, include background and noise, and use the r-band filter of the LSST survey. -Please note that `galsim` is not a `galcheat` dependency, so it must be installed +Please note that `galsim` is not a `surveycodex` dependency, so it must be installed separately to follow this guide. See [here](https://galsim-developers.github.io/GalSim/_build/html/install.html) for `galsim` installation instructions. To draw the image at the end of the tutorial, `matplotlib` will also need to be installed separately. -First, we import galsim and necessary functions from galcheat. +First, we import galsim and necessary functions from surveycodex. ```python import galsim -import galcheat -from galcheat import get_survey -from galcheat import utilities +import surveycodex +from surveycodex import get_survey +from surveycodex import utilities import matplotlib.pyplot as plt import numpy as np ``` -Then, we specify the survey and filter from galcheat we will use. Along with +Then, we specify the survey and filter from surveycodex we will use. Along with galaxy parameters. ```python -# galcheat survey and filter. +# surveycodex survey and filter. LSST = get_survey("LSST") r_band = LSST.get_filter("r") @@ -40,7 +40,7 @@ hlr = 1.2 # arcsecs Now we create a galaxy model and shear it. ```python -# get flux from magnitude using galcheat for LSST r-band. +# get flux from magnitude using surveycodex for LSST r-band. total_flux = mag2counts(mag, LSST, r_band) # get only the value of flux in desired units. @@ -83,7 +83,7 @@ conv_gal = galsim.Convolve(gal, psf) Finally, we add noise and background: ```python -# retrieve the sky level using galcheat. +# retrieve the sky level using surveycodex. sky_level = utilities.mean_sky_level(LSST, r_band).to_value('electron') # add noise and background to image. diff --git a/docs/guides/getting-started.md b/docs/guides/getting-started.md index 76ca391..69a6a88 100644 --- a/docs/guides/getting-started.md +++ b/docs/guides/getting-started.md @@ -2,10 +2,10 @@ ```python # The list of available surveys -from galcheat import available_surveys +from surveycodex import available_surveys # Getter methods to retrieve a Survey of a Filter dataclass -from galcheat import get_survey, get_filter +from surveycodex import get_survey, get_filter LSST = get_survey("LSST") u_band = get_filter("u", "LSST") diff --git a/docs/guides/heritage.md b/docs/guides/heritage.md index 3fd29e1..5732f9a 100644 --- a/docs/guides/heritage.md +++ b/docs/guides/heritage.md @@ -1,10 +1,10 @@ -# Extend galcheat objects +# Extend surveycodex objects ## Frozen dataclasses -The goal of galcheat is to provide a **sourced reference** for survey parameters. Therefore the `Survey` and `Filter` objects have been implemented as frozen dataclasses. This means that trying to modify the attributes of an instance of a `Survey` or a `Filter` will raise a `FrozenInstanceError`. +The goal of surveycodex is to provide a **sourced reference** for survey parameters. Therefore the `Survey` and `Filter` objects have been implemented as frozen dataclasses. This means that trying to modify the attributes of an instance of a `Survey` or a `Filter` will raise a `FrozenInstanceError`. -Nevertheless, one might possibly want to modify or extend the instances of the dataclasses found in galcheat for specific purposes. This can be achieved through inheritance. +Nevertheless, one might possibly want to modify or extend the instances of the dataclasses found in surveycodex for specific purposes. This can be achieved through inheritance. ## Inheritance @@ -16,6 +16,6 @@ class ExtensibleSurvey(Survey): self.__dict__[x] = val ``` -The `ExtensibleSurvey` will behave just as the galcheat `Survey` and will be extendable or modifiable. This is also true for the `Filter` class. +The `ExtensibleSurvey` will behave just as the surveycodex `Survey` and will be extendable or modifiable. This is also true for the `Filter` class. !!! warning "To be used at you own risk" diff --git a/docs/index.md b/docs/index.md index 8bccb04..079996d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ -# Welcome to `galcheat` +# Welcome to `surveycodex` -`galcheat` is a tiny package containing useful parameters from main galaxy surveys (**with units**). +`surveycodex` is a 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. @@ -9,7 +9,7 @@ The goal of this project is to provide a Python library with minimal dependencie Pretty print the available surveys and associated filters in the terminal ```bash -galcheat +surveycodex ``` ### Options @@ -22,16 +22,16 @@ galcheat ### 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 survey info +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 survey info ``` ## Installation ```sh -python -m pip install -U galcheat +python -m pip install -U surveycodex ``` ## Optional installation @@ -41,7 +41,7 @@ python -m pip install -U galcheat To run the Python scripts from the `script` folder, use the extra install ```sh -python -m pip install -U galcheat[scripts] +python -m pip install -U surveycodex[scripts] ``` ### Developers @@ -49,12 +49,12 @@ python -m pip install -U galcheat[scripts] The developer tools needed to perform tests and linting and compile the docs locally can be installed with ```sh -python -m pip install -U galcheat[dev] +python -m pip install -U surveycodex[dev] ``` ### Rich display (new in v1.1) -For a better terminal experience, install the `rich` library and use it together with the `--rich` option from `galcheat` +For a better terminal experience, install the `rich` library and use it together with the `--rich` option from `surveycodex` ```sh python -m pip install rich diff --git a/docs/parameters.md b/docs/parameters.md index 78b4f23..cc89f90 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -1,14 +1,14 @@ -`galcheat` supported parameters +`surveycodex` supported parameters =============================== -The following page describes the parameters of the photometric surveys and their filters exposed in galcheat, what type and unit they should be specified with. +The following page describes the parameters of the photometric surveys and their filters exposed in surveycodex, what type and unit they should be specified with. Survey parameters ----------------- ### Input parameters -The following parameters are required in the YAML file describing any survey to build the `Survey` class in `galcheat`. +The following parameters are required in the YAML file describing any survey to build the `Survey` class in `surveycodex`. | parameter name | type | units | description | | ----------------- | :-------: | :------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -33,7 +33,7 @@ The following parameters are computed after initialisation of the `Survey` class Filter parameters ----------------- -The following parameters are required in the YAML file describing any filter of a given survey, to build the `Filter` class in `galcheat`. +The following parameters are required in the YAML file describing any filter of a given survey, to build the `Filter` class in `surveycodex`. | parameter name | type | units | description | | -------------------- | :-------: | :-------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/mkdocs.yml b/mkdocs.yml index 988e6bd..a277b71 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ -site_name: galcheat docs -repo_url: https://github.com/aboucaud/galcheat +site_name: surveycodex docs +repo_url: https://github.com/LSSTDESC/surveycodex site_url: https://aboucaud.github.io/galcheat/ site_description: A small python library that can clump lists of data together. site_author: Alexandre Boucaud @@ -37,11 +37,11 @@ nav: - Guides: - Getting Started: guides/getting-started.md - Simulate Galaxy with Galsim: guides/create-galaxy.md - - Extend galcheat objects: guides/heritage.md + - Extend surveycodex objects: guides/heritage.md - API: - - galcheat.survey: api/survey.md - - galcheat.filter: api/filter.md - - galcheat.utilities: api/utilities.md + - surveycodex.survey: api/survey.md + - surveycodex.filter: api/filter.md + - surveycodex.utilities: api/utilities.md # Plugins plugins: - mkdocstrings: @@ -54,7 +54,7 @@ plugins: selection: docstring_style: numpy watch: - - galcheat + - surveycodex - search copyright: Copyright © 2022 Maintained by Alexandre. # Mkdocs material extensions diff --git a/scripts/check_effective_wavelengths.py b/scripts/check_effective_wavelengths.py index 5467777..9ada30b 100644 --- a/scripts/check_effective_wavelengths.py +++ b/scripts/check_effective_wavelengths.py @@ -1,7 +1,7 @@ from astropy import units as u from speclite.filters import load_filter -import galcheat +import surveycodex SPECLITE_SURVEY_PREFIXES = { "DES": "decam2014", @@ -21,11 +21,11 @@ def check_effective_wavelengths(survey_name): """ if survey_name in SPECLITE_SURVEY_PREFIXES.keys(): - survey = galcheat.get_survey(survey_name) + survey = surveycodex.get_survey(survey_name) speclite_prefix = SPECLITE_SURVEY_PREFIXES[survey_name] print(f"-- {survey_name} --\t({speclite_prefix} in speclite)\n") - print("filters | speclite | galcheat") + print("filters | speclite | surveycodex") print("------- | --------- | ---------") for filter_name in survey.available_filters: @@ -52,5 +52,5 @@ def check_effective_wavelengths(survey_name): if __name__ == "__main__": print("\nChecking the effective filter wavelengths with speclite") print("-------------------------------------------------------\n") - for survey in galcheat.available_surveys: + for survey in surveycodex.available_surveys: check_effective_wavelengths(survey) diff --git a/scripts/check_zeropoints.py b/scripts/check_zeropoints.py index 2f9976e..a31c4a0 100644 --- a/scripts/check_zeropoints.py +++ b/scripts/check_zeropoints.py @@ -3,7 +3,7 @@ from astropy import units as u from speclite.filters import load_filter -import galcheat +import surveycodex SPECLITE_SURVEY_PREFIXES = { "DES": "decam2014", @@ -34,11 +34,11 @@ def check_zeropoints(survey_name): """ if survey_name in SPECLITE_SURVEY_PREFIXES.keys(): - survey = galcheat.get_survey(survey_name) + survey = surveycodex.get_survey(survey_name) speclite_prefix = SPECLITE_SURVEY_PREFIXES[survey_name] print(f"-- {survey_name} --\t({speclite_prefix} in speclite)\n") - print("filters | speclite | galcheat") + print("filters | speclite | surveycodex") print("------- | --------- | ---------") for filter_name in survey.available_filters: @@ -51,8 +51,8 @@ def check_zeropoints(survey_name): speclite_filter_name, survey.effective_area ) - galcheat_filter = survey.get_filter(filter_name) - current_zp = galcheat_filter.zeropoint + surveycodex_filter = survey.get_filter(filter_name) + current_zp = surveycodex_filter.zeropoint print(f"{filter_name:^7} | {speclite_zp:.2f} | {current_zp:.2f}") else: print(f"{survey_name} filters are not available in speclite") @@ -62,5 +62,5 @@ def check_zeropoints(survey_name): if __name__ == "__main__": print("\nChecking the zeropoints with speclite") print("-------------------------------------\n") - for survey_name in galcheat.available_surveys: + for survey_name in surveycodex.available_surveys: check_zeropoints(survey_name) diff --git a/setup.cfg b/setup.cfg index 586c06e..5f605bb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,13 +1,13 @@ [metadata] -name = galcheat +name = surveycodex description = Tiny library of galaxy surveys most useful parameters with units long_description = file: README.md long_description_content_type = text/markdown author = Alexandre Boucaud author_email = aboucaud@apc.in2p3.fr license = MIT -url = https://github.com/aboucaud/galcheat -github_project = aboucaud/galcheat +url = https://github.com/LSSTDESC/surveycodex +github_project = LSSTDESC/surveycodex platforms = any classifiers = Intended Audience :: Science/Research @@ -21,7 +21,7 @@ classifiers = Topic :: Scientific/Engineering :: Astronomy Development Status :: 3 - Alpha project_urls = - Bug Tracker = https://github.com/aboucaud/galcheat/issues + Bug Tracker = https://github.com/LSSTDESC/surveycodex/issues [options] zip_safe = False @@ -38,7 +38,7 @@ install_requires = [options.entry_points] console_scripts = - galcheat = galcheat.__main__:main + surveycodex = surveycodex.__main__:main [options.extras_require] dev = @@ -57,7 +57,7 @@ scripts = speclite>=0.15 [options.package_data] -galcheat = data/* +surveycodex = data/* [bdist_wheel] universal = true @@ -69,7 +69,7 @@ addopts = --color=yes --verbose astropy_header = True [coverage:run] -source = galcheat +source = surveycodex branch = True [coverage:report] diff --git a/galcheat/__init__.py b/surveycodex/__init__.py similarity index 66% rename from galcheat/__init__.py rename to surveycodex/__init__.py index 48062cd..fc3d549 100644 --- a/galcheat/__init__.py +++ b/surveycodex/__init__.py @@ -1,22 +1,22 @@ r""" - - ____ _ ____ _ _ - / ___| __ _| |/ ___| |__ ___ __ _| |_ -| | _ / _` | | | | '_ \ / _ \/ _` | __| -| |_| | (_| | | |___| | | | __/ (_| | |_ - \____|\__,_|_|\____|_| |_|\___|\__,_|\__| + ____ ____ _ +/ ___| _ _ _ ____ _____ _ _ / ___|___ __| | _____ __ +\___ \| | | | '__\ \ / / _ \ | | | | / _ \ / _` |/ _ \ \/ / + ___) | |_| | | \ V / __/ |_| | |__| (_) | (_| | __/> < +|____/ \__,_|_| \_/ \___|\__, |\____\___/ \__,_|\___/_/\_\ + |___/ The tiny library of galaxy surveys most useful parameters with units The data can be viewed in a terminal with - python -m galcheat + python -m surveycodex To access the quantities, retrieve the `Survey` objects with `get_survey`. - >>> from galcheat import get_survey + >>> from surveycodex import get_survey >>> LSST = get_survey('LSST') >>> LSST.mirror_diameter @@ -50,4 +50,4 @@ """ -from galcheat.helpers import available_surveys, get_survey # noqa +from surveycodex.helpers import available_surveys, get_survey # noqa diff --git a/galcheat/__main__.py b/surveycodex/__main__.py similarity index 88% rename from galcheat/__main__.py rename to surveycodex/__main__.py index 5772dca..4ea3178 100644 --- a/galcheat/__main__.py +++ b/surveycodex/__main__.py @@ -1,14 +1,14 @@ import argparse -from galcheat.helpers import available_surveys, print_survey +from surveycodex.helpers import available_surveys, print_survey -_FOOTER = "\nprovided by galcheat \n" +_FOOTER = "\nprovided by surveycodex \n" _LINEBREAK = "\n" + "• " * 15 + "\n" def _survey_parser(): parser = argparse.ArgumentParser( - description="Print out the main survey features present in galcheat", + description="Print out the main survey features present in surveycodex", formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) parser.add_argument( @@ -45,7 +45,7 @@ def main(): use_rich = True except ImportError: print( - "The rich library is not installed by default with galcheat.", + "The rich library is not installed by default with surveycodex.", "In order to use rich printing, please consider installing it using pip.", "`python -m pip install rich`", "\nDefaulting to classic display...\n", @@ -57,7 +57,7 @@ def main(): surveys = [args.survey_name] if use_rich: - from galcheat.rich import display_references, display_survey + from surveycodex.rich import display_references, display_survey for survey in surveys: console.print("") diff --git a/galcheat/data/CFHTLS.yaml b/surveycodex/data/CFHTLS.yaml similarity index 100% rename from galcheat/data/CFHTLS.yaml rename to surveycodex/data/CFHTLS.yaml diff --git a/galcheat/data/COSMOS.yaml b/surveycodex/data/COSMOS.yaml similarity index 100% rename from galcheat/data/COSMOS.yaml rename to surveycodex/data/COSMOS.yaml diff --git a/galcheat/data/DES.yaml b/surveycodex/data/DES.yaml similarity index 100% rename from galcheat/data/DES.yaml rename to surveycodex/data/DES.yaml diff --git a/galcheat/data/Euclid_VIS.yaml b/surveycodex/data/Euclid_VIS.yaml similarity index 100% rename from galcheat/data/Euclid_VIS.yaml rename to surveycodex/data/Euclid_VIS.yaml diff --git a/galcheat/data/HSC.yaml b/surveycodex/data/HSC.yaml similarity index 100% rename from galcheat/data/HSC.yaml rename to surveycodex/data/HSC.yaml diff --git a/galcheat/data/LSST.yaml b/surveycodex/data/LSST.yaml similarity index 95% rename from galcheat/data/LSST.yaml rename to surveycodex/data/LSST.yaml index e6136cc..a5691e0 100644 --- a/galcheat/data/LSST.yaml +++ b/surveycodex/data/LSST.yaml @@ -60,7 +60,7 @@ references: comment: "" obscuration: link: "https://arxiv.org/abs/0805.2366" - comment: "(v5) The paper mentions an effective diameter of ~6.5m. See https://github.com/aboucaud/galcheat/issues/38 for discussions on how to calculate obscuration from effective diameter." + comment: "(v5) The paper mentions an effective diameter of ~6.5m. See https://github.com/LSSTDESC/surveycodex/issues/38 for discussions on how to calculate obscuration from effective diameter." zeropoint_airmass: link: "https://speclite.readthedocs.io/en/latest/filters.html#lsst-filters" comment: "" diff --git a/galcheat/filter.py b/surveycodex/filter.py similarity index 100% rename from galcheat/filter.py rename to surveycodex/filter.py diff --git a/galcheat/helpers.py b/surveycodex/helpers.py similarity index 96% rename from galcheat/helpers.py rename to surveycodex/helpers.py index 1ea4e4a..ad07acc 100644 --- a/galcheat/helpers.py +++ b/surveycodex/helpers.py @@ -1,6 +1,6 @@ from pathlib import Path -from galcheat.survey import Survey +from surveycodex.survey import Survey _BASEDIR = Path(__file__).parent.resolve() _survey_info = { @@ -8,7 +8,7 @@ } available_surveys = list(_survey_info.keys()) -"List of available surveys in galcheat" +"List of available surveys in surveycodex" def get_survey(survey_name): diff --git a/galcheat/rich.py b/surveycodex/rich.py similarity index 98% rename from galcheat/rich.py rename to surveycodex/rich.py index 6bd492b..2da6d96 100644 --- a/galcheat/rich.py +++ b/surveycodex/rich.py @@ -1,6 +1,6 @@ import textwrap -from galcheat.helpers import Survey, get_survey +from surveycodex.helpers import Survey, get_survey _SATELLITE = "🛰️️ " _TELESCOPE = "🔭️ " diff --git a/galcheat/survey.py b/surveycodex/survey.py similarity index 97% rename from galcheat/survey.py rename to surveycodex/survey.py index 6d88bf0..5888f56 100644 --- a/galcheat/survey.py +++ b/surveycodex/survey.py @@ -6,7 +6,7 @@ import yaml from astropy.units import Quantity -from galcheat.filter import Filter +from surveycodex.filter import Filter @dataclass(frozen=True) @@ -34,7 +34,7 @@ class Survey: effective_area: Quantity = field(init=False) "The survey instrument effective area on the sky computed from the obscuration" references: Dict[str, Dict[str, str]] - "Dictionary of references for each parameter specified in galcheat" + "Dictionary of references for each parameter specified in surveycodex" @classmethod def from_yaml(cls, yaml_file: str): @@ -135,7 +135,7 @@ def get_filter(self, filter_name): Raises ------ ValueError - The requested filter does not exist or is not available in galcheat + The requested filter does not exist or is not available in surveycodex """ if filter_name not in self.available_filters: diff --git a/galcheat/utilities.py b/surveycodex/utilities.py similarity index 90% rename from galcheat/utilities.py rename to surveycodex/utilities.py index 2e8634d..f455a50 100644 --- a/galcheat/utilities.py +++ b/surveycodex/utilities.py @@ -1,8 +1,8 @@ import astropy.units as u -from galcheat.filter import Filter -from galcheat.helpers import get_survey -from galcheat.survey import Survey +from surveycodex.filter import Filter +from surveycodex.helpers import get_survey +from surveycodex.survey import Survey def mag2counts(magnitude, survey, filter, exposure_time=None): @@ -38,7 +38,7 @@ def mag2counts(magnitude, survey, filter, exposure_time=None): Example ------- - >>> from galcheat.utilities import mag2counts + >>> from surveycodex.utilities import mag2counts >>> mag2counts(24, "LSST", "g") @@ -73,7 +73,7 @@ def mag2counts(magnitude, survey, filter, exposure_time=None): def mean_sky_level(survey, filter): """Computes the mean sky level for a given survey and a filter - This computation uses the sky brightness parameter from galcheat, + This computation uses the sky brightness parameter from surveycodex, expressed as a magnitude per sky area, weights it by the pixel area and converts it to electron counts. @@ -91,7 +91,7 @@ def mean_sky_level(survey, filter): Example ------- - >>> from galcheat.utilities import mean_sky_level + >>> from surveycodex.utilities import mean_sky_level >>> mean_sky_level("LSST", "g") diff --git a/tests/test_utilities.py b/tests/test_utilities.py index a14623a..54fc1a5 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -1,8 +1,8 @@ import numpy as np import pytest -from galcheat.helpers import get_survey -from galcheat.utilities import mag2counts, mean_sky_level +from surveycodex.helpers import get_survey +from surveycodex.utilities import mag2counts, mean_sky_level WLD_COUNTS_MAG24 = { "LSST_u": 15388.800000000001,

Alexandre Boucaud

💻 🤔 🚧 👀

mpaillassa

💻 👀 🔣

Ismael Mendoza

🤔 👀 🔣

Hironao Miyatake

💻 🔣

Alexandre Boucaud

💻 🤔 🚧 👀

mpaillassa

💻 👀 🔣

Ismael Mendoza

🤔 👀 🔣

Hironao Miyatake

💻 🔣

Axel Guinot

🔣

thuiop

🤔

Rémy Joseph

🤔