surveycodex 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- surveycodex-1.2.0/.all-contributorsrc +86 -0
- surveycodex-1.2.0/.github/workflows/check_style.yml +16 -0
- surveycodex-1.2.0/.github/workflows/python-package.yml +43 -0
- surveycodex-1.2.0/.github/workflows/python-publish.yml +37 -0
- surveycodex-1.2.0/.gitignore +144 -0
- surveycodex-1.2.0/.pre-commit-config.yaml +32 -0
- surveycodex-1.2.0/CONTRIBUTING.md +91 -0
- surveycodex-1.2.0/LICENSE +21 -0
- surveycodex-1.2.0/PKG-INFO +150 -0
- surveycodex-1.2.0/README.md +121 -0
- surveycodex-1.2.0/docs/api/filter.md +3 -0
- surveycodex-1.2.0/docs/api/helpers.md +3 -0
- surveycodex-1.2.0/docs/api/survey.md +3 -0
- surveycodex-1.2.0/docs/api/utilities.md +3 -0
- surveycodex-1.2.0/docs/guides/create-galaxy.md +105 -0
- surveycodex-1.2.0/docs/guides/getting-started.md +34 -0
- surveycodex-1.2.0/docs/guides/heritage.md +21 -0
- surveycodex-1.2.0/docs/images/galaxy.png +0 -0
- surveycodex-1.2.0/docs/images/galcheat_logo.png +0 -0
- surveycodex-1.2.0/docs/index.md +61 -0
- surveycodex-1.2.0/docs/parameters.md +104 -0
- surveycodex-1.2.0/docs/requirements.txt +4 -0
- surveycodex-1.2.0/mkdocs.yml +73 -0
- surveycodex-1.2.0/scripts/check_effective_wavelengths.py +56 -0
- surveycodex-1.2.0/scripts/check_zeropoints.py +66 -0
- surveycodex-1.2.0/scripts/requirements.txt +1 -0
- surveycodex-1.2.0/setup.cfg +86 -0
- surveycodex-1.2.0/setup.py +7 -0
- surveycodex-1.2.0/surveycodex/__init__.py +53 -0
- surveycodex-1.2.0/surveycodex/__main__.py +77 -0
- surveycodex-1.2.0/surveycodex/data/CFHTLS.yaml +74 -0
- surveycodex-1.2.0/surveycodex/data/COSMOS.yaml +46 -0
- surveycodex-1.2.0/surveycodex/data/DES.yaml +67 -0
- surveycodex-1.2.0/surveycodex/data/Euclid_VIS.yaml +46 -0
- surveycodex-1.2.0/surveycodex/data/HSC.yaml +82 -0
- surveycodex-1.2.0/surveycodex/data/LSST.yaml +81 -0
- surveycodex-1.2.0/surveycodex/filter.py +71 -0
- surveycodex-1.2.0/surveycodex/helpers.py +86 -0
- surveycodex-1.2.0/surveycodex/rich.py +115 -0
- surveycodex-1.2.0/surveycodex/survey.py +148 -0
- surveycodex-1.2.0/surveycodex/utilities.py +110 -0
- surveycodex-1.2.0/surveycodex.egg-info/PKG-INFO +150 -0
- surveycodex-1.2.0/surveycodex.egg-info/SOURCES.txt +48 -0
- surveycodex-1.2.0/surveycodex.egg-info/dependency_links.txt +1 -0
- surveycodex-1.2.0/surveycodex.egg-info/entry_points.txt +3 -0
- surveycodex-1.2.0/surveycodex.egg-info/not-zip-safe +1 -0
- surveycodex-1.2.0/surveycodex.egg-info/requires.txt +19 -0
- surveycodex-1.2.0/surveycodex.egg-info/top_level.txt +1 -0
- surveycodex-1.2.0/tests/test_utilities.py +84 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
"README.md"
|
|
4
|
+
],
|
|
5
|
+
"imageSize": 100,
|
|
6
|
+
"commit": false,
|
|
7
|
+
"contributors": [
|
|
8
|
+
{
|
|
9
|
+
"login": "aboucaud",
|
|
10
|
+
"name": "Alexandre Boucaud",
|
|
11
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/3065310?v=4",
|
|
12
|
+
"profile": "https://aboucaud.github.io",
|
|
13
|
+
"contributions": [
|
|
14
|
+
"code",
|
|
15
|
+
"ideas",
|
|
16
|
+
"maintenance",
|
|
17
|
+
"review"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"login": "mpaillassa",
|
|
22
|
+
"name": "mpaillassa",
|
|
23
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/9745094?v=4",
|
|
24
|
+
"profile": "https://github.com/mpaillassa",
|
|
25
|
+
"contributions": [
|
|
26
|
+
"code",
|
|
27
|
+
"review",
|
|
28
|
+
"data"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"login": "ismael-mendoza",
|
|
33
|
+
"name": "Ismael Mendoza",
|
|
34
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/11745764?v=4",
|
|
35
|
+
"profile": "https://ismael-mendoza.github.io/",
|
|
36
|
+
"contributions": [
|
|
37
|
+
"ideas",
|
|
38
|
+
"review",
|
|
39
|
+
"data"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"login": "HironaoMiyatake",
|
|
44
|
+
"name": "Hironao Miyatake",
|
|
45
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/1507529?v=4",
|
|
46
|
+
"profile": "https://github.com/HironaoMiyatake",
|
|
47
|
+
"contributions": [
|
|
48
|
+
"code",
|
|
49
|
+
"data"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"login": "aguinot",
|
|
54
|
+
"name": "Axel Guinot",
|
|
55
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/39480528?v=4",
|
|
56
|
+
"profile": "https://github.com/aguinot",
|
|
57
|
+
"contributions": [
|
|
58
|
+
"data"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"login": "thuiop",
|
|
63
|
+
"name": "thuiop",
|
|
64
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/1338337?v=4",
|
|
65
|
+
"profile": "https://github.com/thuiop",
|
|
66
|
+
"contributions": [
|
|
67
|
+
"ideas"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"login": "herjy",
|
|
72
|
+
"name": "Rémy Joseph",
|
|
73
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/16084926?v=4",
|
|
74
|
+
"profile": "https://remyjoseph.wordpress.com/",
|
|
75
|
+
"contributions": [
|
|
76
|
+
"ideas"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"contributorsPerLine": 7,
|
|
81
|
+
"projectName": "surveycodex",
|
|
82
|
+
"projectOwner": "LSSTDESC",
|
|
83
|
+
"repoType": "github",
|
|
84
|
+
"repoHost": "https://github.com",
|
|
85
|
+
"skipCi": true
|
|
86
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: "Check code style"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pre-commit:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
env:
|
|
12
|
+
SKIP: no-commit-to-branch
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
- uses: actions/setup-python@v3
|
|
16
|
+
- uses: pre-commit/action@v3.0.1
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Python package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ main ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v3
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
uses: actions/setup-python@v3
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
- name: Install the library and dependencies
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
pip install -r scripts/requirements.txt
|
|
31
|
+
pip install ".[dev]"
|
|
32
|
+
- name: Test the code demo
|
|
33
|
+
run: |
|
|
34
|
+
python -m surveycodex
|
|
35
|
+
- name: Test the console script
|
|
36
|
+
run: |
|
|
37
|
+
surveycodex --refs
|
|
38
|
+
- name: Test the scripts
|
|
39
|
+
run: |
|
|
40
|
+
for pyscript in scripts/*.py; do python ${pyscript}; done
|
|
41
|
+
- name: Test the utility functions
|
|
42
|
+
run: |
|
|
43
|
+
pytest --cov
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
deploy:
|
|
17
|
+
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v3
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v3
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.9'
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip
|
|
29
|
+
pip install wheel
|
|
30
|
+
- name: Build package
|
|
31
|
+
run: |
|
|
32
|
+
python setup.py sdist bdist_wheel
|
|
33
|
+
- name: Publish to PyPI
|
|
34
|
+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
|
35
|
+
with:
|
|
36
|
+
user: __token__
|
|
37
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/python
|
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=python
|
|
3
|
+
|
|
4
|
+
### Python ###
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py,cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
92
|
+
# .python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
#Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
102
|
+
__pypackages__/
|
|
103
|
+
|
|
104
|
+
# Celery stuff
|
|
105
|
+
celerybeat-schedule
|
|
106
|
+
celerybeat.pid
|
|
107
|
+
|
|
108
|
+
# SageMath parsed files
|
|
109
|
+
*.sage.py
|
|
110
|
+
|
|
111
|
+
# Environments
|
|
112
|
+
.env
|
|
113
|
+
.venv
|
|
114
|
+
env/
|
|
115
|
+
venv/
|
|
116
|
+
ENV/
|
|
117
|
+
env.bak/
|
|
118
|
+
venv.bak/
|
|
119
|
+
|
|
120
|
+
# Spyder project settings
|
|
121
|
+
.spyderproject
|
|
122
|
+
.spyproject
|
|
123
|
+
|
|
124
|
+
# Rope project settings
|
|
125
|
+
.ropeproject
|
|
126
|
+
|
|
127
|
+
# mkdocs documentation
|
|
128
|
+
/site
|
|
129
|
+
|
|
130
|
+
# mypy
|
|
131
|
+
.mypy_cache/
|
|
132
|
+
.dmypy.json
|
|
133
|
+
dmypy.json
|
|
134
|
+
|
|
135
|
+
# Pyre type checker
|
|
136
|
+
.pyre/
|
|
137
|
+
|
|
138
|
+
# pytype static type analyzer
|
|
139
|
+
.pytype/
|
|
140
|
+
|
|
141
|
+
# Cython debug symbols
|
|
142
|
+
cython_debug/
|
|
143
|
+
|
|
144
|
+
# End of https://www.toptal.com/developers/gitignore/api/python
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.6.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-merge-conflict
|
|
6
|
+
- id: check-yaml
|
|
7
|
+
- id: debug-statements
|
|
8
|
+
- id: end-of-file-fixer
|
|
9
|
+
- id: no-commit-to-branch
|
|
10
|
+
args: [--branch, main]
|
|
11
|
+
- id: requirements-txt-fixer
|
|
12
|
+
- id: trailing-whitespace
|
|
13
|
+
args: [--markdown-linebreak-ext=md]
|
|
14
|
+
- repo: https://github.com/PyCQA/isort
|
|
15
|
+
rev: 5.13.2
|
|
16
|
+
hooks:
|
|
17
|
+
- id: isort
|
|
18
|
+
args: [--profile, black]
|
|
19
|
+
- repo: https://github.com/asottile/pyupgrade
|
|
20
|
+
rev: v3.15.2
|
|
21
|
+
hooks:
|
|
22
|
+
- id: pyupgrade
|
|
23
|
+
args: [--py37-plus]
|
|
24
|
+
- repo: https://github.com/PyCQA/flake8
|
|
25
|
+
rev: 7.0.0
|
|
26
|
+
hooks:
|
|
27
|
+
- id: flake8
|
|
28
|
+
args: ['--ignore=E501,E203,E731,W503']
|
|
29
|
+
- repo: https://github.com/psf/black
|
|
30
|
+
rev: 24.3.0
|
|
31
|
+
hooks:
|
|
32
|
+
- id: black
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Contributing to `surveycodex`
|
|
2
|
+
|
|
3
|
+
We appreciate that you want to contribute to `surveycodex`. Your time is valuable, and your contribution means a lot.
|
|
4
|
+
|
|
5
|
+
## Important!
|
|
6
|
+
|
|
7
|
+
By contributing to this project, you agree that the content you contribute may be provided under the project [license](LICENSE), which means that the numbers you provide for a given survey are public or can be made public.
|
|
8
|
+
|
|
9
|
+
## Getting started
|
|
10
|
+
|
|
11
|
+
**What does "contributing" mean?**
|
|
12
|
+
|
|
13
|
+
There are several ways to contribute, namely:
|
|
14
|
+
|
|
15
|
+
- Feature requests or bug reports through [issues](#issues)
|
|
16
|
+
- Add, update or correct information through [pull-requests](#pull-requests)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
**Showing support for** `surveycodex`
|
|
20
|
+
|
|
21
|
+
Don't have time to contribute? No worries, here are some other ways to show your support for `surveycodex`:
|
|
22
|
+
|
|
23
|
+
- star the [project](https://github.com/LSSTDESC/surveycodex) (creates visibility)
|
|
24
|
+
- mention it around
|
|
25
|
+
|
|
26
|
+
## Issues
|
|
27
|
+
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
## Pull-requests
|
|
31
|
+
|
|
32
|
+
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).
|
|
33
|
+
|
|
34
|
+
> Note that you will have to [fork the project](https://guides.github.com/activities/forking/) to contribute.
|
|
35
|
+
|
|
36
|
+
### Getting a development environment (do once)
|
|
37
|
+
|
|
38
|
+
- Clone the project
|
|
39
|
+
```sh
|
|
40
|
+
git clone https://github.com/LSSTDESC/surveycodex
|
|
41
|
+
cd surveycodex
|
|
42
|
+
```
|
|
43
|
+
- Setup the virtual environment with the dev tools
|
|
44
|
+
```sh
|
|
45
|
+
python -m venv venv
|
|
46
|
+
source venv/bin/activate
|
|
47
|
+
python -m pip install -U pip
|
|
48
|
+
```
|
|
49
|
+
- Install `surveycodex` with developer libs
|
|
50
|
+
```sh
|
|
51
|
+
pip install -e ".[dev]"
|
|
52
|
+
```
|
|
53
|
+
- Install the automated checks and code lint on git commits
|
|
54
|
+
```sh
|
|
55
|
+
pre-commit install
|
|
56
|
+
```
|
|
57
|
+
- Make sure to regularly run the tests and check code coverage
|
|
58
|
+
```sh
|
|
59
|
+
pytest --cov
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Create a fork (do once)
|
|
63
|
+
|
|
64
|
+
- [Fork the surveycodex project](https://guides.github.com/activities/forking/)
|
|
65
|
+
- Add the fork to the list of remote servers
|
|
66
|
+
```sh
|
|
67
|
+
git remote add fork git@github.com:<your username>/surveycodex.git
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Code in a feature branch
|
|
71
|
+
|
|
72
|
+
1. Activate the development environment
|
|
73
|
+
```sh
|
|
74
|
+
source venv/bin/activate
|
|
75
|
+
```
|
|
76
|
+
2. Create a feature branch (e.g. `featbranch` here)
|
|
77
|
+
```sh
|
|
78
|
+
git checkout -b featbranch
|
|
79
|
+
```
|
|
80
|
+
3. Commit your code into `featbranch` (sometimes the commit will be rejected because of the `pre-commit` checks, just add the files a second time and commit again).
|
|
81
|
+
4. Make sure to integrate the latest changes by regularly incorporating the latest work of the main branch into yours
|
|
82
|
+
```sh
|
|
83
|
+
git rebase origin/main
|
|
84
|
+
```
|
|
85
|
+
and solve the conflicts, if any.
|
|
86
|
+
5. Push your feature branch to your fork
|
|
87
|
+
```sh
|
|
88
|
+
git push -u fork featbranch # the first time to set the target remote
|
|
89
|
+
git push # afterwards
|
|
90
|
+
```
|
|
91
|
+
6. Create [the pull-request](https://github.com/LSSTDESC/surveycodex/pulls) and iterate from 3. until it is merged.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 BlendingToolkit developers
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: surveycodex
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Tiny library of galaxy surveys most useful parameters with units
|
|
5
|
+
Home-page: https://github.com/LSSTDESC/surveycodex
|
|
6
|
+
Author: Alexandre Boucaud
|
|
7
|
+
Author-email: aboucaud@apc.in2p3.fr
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/LSSTDESC/surveycodex/issues
|
|
10
|
+
Platform: any
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
20
|
+
Classifier: Development Status :: 3 - Alpha
|
|
21
|
+
Requires-Python: >=3.7
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Provides-Extra: docs
|
|
25
|
+
Provides-Extra: scripts
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
|
|
28
|
+
[**Main documentation**](https://aboucaud.github.io/galcheat/) | [**Getting started**](#getting-started) | [**CLI**](#cli) | [**API**](#api) | [**Contributing**](#contributing) | [**License**](#license)
|
|
29
|
+
|
|
30
|
+
<!-- <br>
|
|
31
|
+
<img src="docs/images/surveycodex_logo.png" alt="surveycodex" height=200px>
|
|
32
|
+
</p> -->
|
|
33
|
+
|
|
34
|
+
# SurveyCodex
|
|
35
|
+
|
|
36
|
+
[![Python package][gh-workflow-badge]][gh-workflow]
|
|
37
|
+
[![License][license-badge]](LICENSE)
|
|
38
|
+
![Python supported versions][pyversion-badge]
|
|
39
|
+
[![PyPI][pypi-badge]][pypi]<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
40
|
+
[](#contributors-)
|
|
41
|
+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
42
|
+
|
|
43
|
+
[gh-workflow]: https://github.com/LSSTDESC/surveycodex/actions/workflows/python-package.yml
|
|
44
|
+
[gh-workflow-badge]: https://github.com/LSSTDESC/surveycodex/actions/workflows/python-package.yml/badge.svg
|
|
45
|
+
[license-badge]: https://img.shields.io/github/license/LSSTDESC/surveycodex?color=blue
|
|
46
|
+
[pyversion-badge]: https://img.shields.io/pypi/pyversions/surveycodex?color=yellow&logo=pypi
|
|
47
|
+
[pypi-badge]: https://badge.fury.io/py/surveycodex.svg
|
|
48
|
+
[pypi]: https://pypi.org/project/surveycodex/
|
|
49
|
+
|
|
50
|
+
Tiny package containing useful parameters from main galaxy surveys (**with units**).
|
|
51
|
+
|
|
52
|
+
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.
|
|
53
|
+
|
|
54
|
+
The current parameters and the corresponding units are specified in the [documentation](https://aboucaud.github.io/galcheat/parameters.html)
|
|
55
|
+
|
|
56
|
+
Getting started
|
|
57
|
+
---------------
|
|
58
|
+
Install the latest version of the library
|
|
59
|
+
```sh
|
|
60
|
+
pip install -U surveycodex
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
CLI
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
Print the available surveys and associated filters
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
surveycodex
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Options
|
|
73
|
+
- **`-s <survey>`**: print information for a given survey
|
|
74
|
+
- **`--refs`**: print the source for each parameter
|
|
75
|
+
- **`--rich`**: use pretty printing for the terminal (needs the `rich` library installed)
|
|
76
|
+
- **`-h, --help`**: get help
|
|
77
|
+
|
|
78
|
+
### Examples
|
|
79
|
+
```sh
|
|
80
|
+
surveycodex -s LSST # LSST info
|
|
81
|
+
surveycodex --refs # all surveys info with refs
|
|
82
|
+
surveycodex --refs -s HSC # HSC info with refs
|
|
83
|
+
surveycodex -s LSST --rich # pretty print rich terminal output for LSST info
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
API
|
|
87
|
+
---
|
|
88
|
+
```python
|
|
89
|
+
import surveycodex
|
|
90
|
+
|
|
91
|
+
# Start with the list of available surveys
|
|
92
|
+
surveycodex.available_surveys
|
|
93
|
+
|
|
94
|
+
# Retrieve a Survey instance
|
|
95
|
+
LSST = surveycodex.get_survey("LSST")
|
|
96
|
+
|
|
97
|
+
# List the available survey filters
|
|
98
|
+
LSST.available_filters
|
|
99
|
+
|
|
100
|
+
# Pick a Filter instance
|
|
101
|
+
u_band = LSST.get_filter("u")
|
|
102
|
+
|
|
103
|
+
# Both Survey and Filter objects have physical attributes
|
|
104
|
+
LSST.mirror_diameter
|
|
105
|
+
|
|
106
|
+
u_band.full_exposure_time
|
|
107
|
+
|
|
108
|
+
# These attributes are Astropy Quantity objects
|
|
109
|
+
# whose value can be retrieved in any desired unit
|
|
110
|
+
u_band.psf_fwhm.to_value('arcmin')
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Contributing ✨
|
|
114
|
+
|
|
115
|
+
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)):
|
|
116
|
+
|
|
117
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
118
|
+
<!-- prettier-ignore-start -->
|
|
119
|
+
<!-- markdownlint-disable -->
|
|
120
|
+
<table>
|
|
121
|
+
<tr>
|
|
122
|
+
<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>
|
|
123
|
+
<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>
|
|
124
|
+
<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>
|
|
125
|
+
<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>
|
|
126
|
+
<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>
|
|
127
|
+
<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>
|
|
128
|
+
<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>
|
|
129
|
+
</tr>
|
|
130
|
+
</table>
|
|
131
|
+
|
|
132
|
+
<!-- markdownlint-restore -->
|
|
133
|
+
<!-- prettier-ignore-end -->
|
|
134
|
+
|
|
135
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
136
|
+
|
|
137
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
|
|
138
|
+
|
|
139
|
+
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?
|
|
140
|
+
|
|
141
|
+
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.
|
|
142
|
+
|
|
143
|
+
[github-wld]: https://github.com/LSSTDESC/WeakLensingDeblending
|
|
144
|
+
[github-btk]: https://github.com/LSSTDESC/BlendingToolKit
|
|
145
|
+
|
|
146
|
+
License
|
|
147
|
+
-------
|
|
148
|
+
This project is developed under an MIT-license. See [LICENSE file](LICENSE) for more information.
|
|
149
|
+
|
|
150
|
+
|