From 2b08b11aaf9fa8acf59484b0346713d626e92eb5 Mon Sep 17 00:00:00 2001
From: Alexandre Boucaud
-
-
Alexandre Boucaud 💻 🤔 🚧 👀 |
- mpaillassa 💻 👀 🔣 |
- Ismael Mendoza 🤔 👀 🔣 |
- Hironao Miyatake 💻 🔣 |
+ Alexandre Boucaud 💻 🤔 🚧 👀 |
+ mpaillassa 💻 👀 🔣 |
+ Ismael Mendoza 🤔 👀 🔣 |
+ Hironao Miyatake 💻 🔣 |
Axel Guinot 🔣 |
thuiop 🤔 |
Rémy Joseph 🤔 |
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