pz-rail-astro-tools 0.1.3__tar.gz → 0.1.4__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.
Potentially problematic release.
This version of pz-rail-astro-tools might be problematic. Click here for more details.
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/PKG-INFO +2 -2
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/README.md +1 -1
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/pz_rail_astro_tools.egg-info/PKG-INFO +2 -2
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/pz_rail_astro_tools.egg-info/SOURCES.txt +7 -8
- pz_rail_astro_tools-0.1.4/src/rail/astro_tools/__init__.py +8 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/rail/astro_tools/_version.py +2 -2
- {pz_rail_astro_tools-0.1.3/src/rail/creation/degradation → pz_rail_astro_tools-0.1.4/src/rail/creation/degraders}/grid_selection.py +1 -1
- {pz_rail_astro_tools-0.1.3/src/rail/creation/degradation → pz_rail_astro_tools-0.1.4/src/rail/creation/degraders}/spectroscopic_selections.py +1 -1
- pz_rail_astro_tools-0.1.3/src/rail/tools/util_photometry.py → pz_rail_astro_tools-0.1.4/src/rail/tools/photometry_tools.py +6 -6
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/tests/astro_tools/test_core.py +9 -9
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/tests/astro_tools/test_degraders.py +7 -7
- pz_rail_astro_tools-0.1.3/src/rail/astro_tools/__init__.py +0 -8
- pz_rail_astro_tools-0.1.3/src/rail/creation/degradation/photerr_demo.ipynb +0 -238
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.copier-answers.yml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/ISSUE_TEMPLATE/0-general_issue.md +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/ISSUE_TEMPLATE/1-bug_report.md +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/ISSUE_TEMPLATE/2-feature_request.md +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/pull_request_template.md +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/workflows/add-issue-to-project-tracker.yml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/workflows/linting.yml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/workflows/publish-to-pypi.yml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/workflows/smoke-test.yml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/workflows/testing-and-coverage.yml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.gitignore +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.pre-commit-config.yaml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/LICENSE +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/environment.yml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/pyproject.toml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/setup.cfg +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/setup.py +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/pz_rail_astro_tools.egg-info/dependency_links.txt +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/pz_rail_astro_tools.egg-info/requires.txt +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/pz_rail_astro_tools.egg-info/top_level.txt +0 -0
- {pz_rail_astro_tools-0.1.3/src/rail/creation/degradation → pz_rail_astro_tools-0.1.4/src/rail/creation/degraders}/lsst_error_model.py +0 -0
- {pz_rail_astro_tools-0.1.3/src/rail/creation/degradation → pz_rail_astro_tools-0.1.4/src/rail/creation/degraders}/observing_condition_degrader.py +0 -0
- {pz_rail_astro_tools-0.1.3/src/rail/creation/degradation → pz_rail_astro_tools-0.1.4/src/rail/creation/degraders}/photometric_errors.py +0 -0
- {pz_rail_astro_tools-0.1.3/src/rail/creation/degradation → pz_rail_astro_tools-0.1.4/src/rail/creation/degraders}/spectroscopic_degraders.py +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/rail/creation/engines/gcr_engine.py +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/rail/examples_data/creation_data/data/HSC_grid_settings.pkl +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/rail/examples_data/creation_data/data/hsc_ratios_and_specz.hdf5 +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/rail/examples_data/creation_data/data/survey_conditions/DC2-dr6-galcounts-i20-i25.3-nside-128.fits +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/rail/examples_data/creation_data/data/survey_conditions/DC2-mask-neg-nside-128.fits +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/rail/examples_data/creation_data/data/survey_conditions/minion_1016_dc2_Median_airmass_i_and_nightlt1825_HEAL.fits +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/rail/examples_data/creation_data/data/survey_conditions/minion_1016_dc2_Median_fiveSigmaDepth_i_and_nightlt1825_HEAL.fits +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/tests/astro_tools/gcr_test_data/schema.yaml +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/tests/astro_tools/gcr_test_data/test_object_tract_4850.hdf5 +0 -0
- {pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/tests/astro_tools/test_gcr_engine.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pz-rail-astro-tools
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Author-email: "LSST Dark Energy Science Collaboration (DESC)" <lsst-desc-rail-admin@slac.stanford.edu>
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -65,7 +65,7 @@ in [RAIL](https://github.com/LSSTDESC/RAIL).
|
|
|
65
65
|
|
|
66
66
|
This code, while public on GitHub, has not yet been released by DESC and is
|
|
67
67
|
still under active development. Our release of v1.0 will be accompanied by a
|
|
68
|
-
journal paper describing the development and validation of RAIL.
|
|
68
|
+
journal paper describing the development and validation of RAIL.
|
|
69
69
|
|
|
70
70
|
If you make use of the ideas or software in RAIL, please cite the repository
|
|
71
71
|
<https://github.com/LSSTDESC/RAIL>. You are welcome to re-use the code, which
|
|
@@ -15,7 +15,7 @@ in [RAIL](https://github.com/LSSTDESC/RAIL).
|
|
|
15
15
|
|
|
16
16
|
This code, while public on GitHub, has not yet been released by DESC and is
|
|
17
17
|
still under active development. Our release of v1.0 will be accompanied by a
|
|
18
|
-
journal paper describing the development and validation of RAIL.
|
|
18
|
+
journal paper describing the development and validation of RAIL.
|
|
19
19
|
|
|
20
20
|
If you make use of the ideas or software in RAIL, please cite the repository
|
|
21
21
|
<https://github.com/LSSTDESC/RAIL>. You are welcome to re-use the code, which
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/pz_rail_astro_tools.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pz-rail-astro-tools
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Author-email: "LSST Dark Energy Science Collaboration (DESC)" <lsst-desc-rail-admin@slac.stanford.edu>
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -65,7 +65,7 @@ in [RAIL](https://github.com/LSSTDESC/RAIL).
|
|
|
65
65
|
|
|
66
66
|
This code, while public on GitHub, has not yet been released by DESC and is
|
|
67
67
|
still under active development. Our release of v1.0 will be accompanied by a
|
|
68
|
-
journal paper describing the development and validation of RAIL.
|
|
68
|
+
journal paper describing the development and validation of RAIL.
|
|
69
69
|
|
|
70
70
|
If you make use of the ideas or software in RAIL, please cite the repository
|
|
71
71
|
<https://github.com/LSSTDESC/RAIL>. You are welcome to re-use the code, which
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/pz_rail_astro_tools.egg-info/SOURCES.txt
RENAMED
|
@@ -22,13 +22,12 @@ src/pz_rail_astro_tools.egg-info/requires.txt
|
|
|
22
22
|
src/pz_rail_astro_tools.egg-info/top_level.txt
|
|
23
23
|
src/rail/astro_tools/__init__.py
|
|
24
24
|
src/rail/astro_tools/_version.py
|
|
25
|
-
src/rail/creation/
|
|
26
|
-
src/rail/creation/
|
|
27
|
-
src/rail/creation/
|
|
28
|
-
src/rail/creation/
|
|
29
|
-
src/rail/creation/
|
|
30
|
-
src/rail/creation/
|
|
31
|
-
src/rail/creation/degradation/spectroscopic_selections.py
|
|
25
|
+
src/rail/creation/degraders/grid_selection.py
|
|
26
|
+
src/rail/creation/degraders/lsst_error_model.py
|
|
27
|
+
src/rail/creation/degraders/observing_condition_degrader.py
|
|
28
|
+
src/rail/creation/degraders/photometric_errors.py
|
|
29
|
+
src/rail/creation/degraders/spectroscopic_degraders.py
|
|
30
|
+
src/rail/creation/degraders/spectroscopic_selections.py
|
|
32
31
|
src/rail/creation/engines/gcr_engine.py
|
|
33
32
|
src/rail/examples_data/creation_data/data/HSC_grid_settings.pkl
|
|
34
33
|
src/rail/examples_data/creation_data/data/hsc_ratios_and_specz.hdf5
|
|
@@ -36,7 +35,7 @@ src/rail/examples_data/creation_data/data/survey_conditions/DC2-dr6-galcounts-i2
|
|
|
36
35
|
src/rail/examples_data/creation_data/data/survey_conditions/DC2-mask-neg-nside-128.fits
|
|
37
36
|
src/rail/examples_data/creation_data/data/survey_conditions/minion_1016_dc2_Median_airmass_i_and_nightlt1825_HEAL.fits
|
|
38
37
|
src/rail/examples_data/creation_data/data/survey_conditions/minion_1016_dc2_Median_fiveSigmaDepth_i_and_nightlt1825_HEAL.fits
|
|
39
|
-
src/rail/tools/
|
|
38
|
+
src/rail/tools/photometry_tools.py
|
|
40
39
|
tests/astro_tools/test_core.py
|
|
41
40
|
tests/astro_tools/test_degraders.py
|
|
42
41
|
tests/astro_tools/test_gcr_engine.py
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from ._version import __version__
|
|
2
|
+
|
|
3
|
+
from rail.creation.degraders.grid_selection import *
|
|
4
|
+
from rail.creation.degraders.observing_condition_degrader import *
|
|
5
|
+
from rail.creation.degraders.spectroscopic_degraders import *
|
|
6
|
+
from rail.creation.degraders.spectroscopic_selections import *
|
|
7
|
+
from rail.creation.degraders.lsst_error_model import *
|
|
8
|
+
from rail.tools.photometry_tools import *
|
|
@@ -6,7 +6,7 @@ import numpy as np
|
|
|
6
6
|
from ceci.config import StageParameter as Param
|
|
7
7
|
from rail.creation.selector import Selector
|
|
8
8
|
from scipy.interpolate import interp1d
|
|
9
|
-
from rail.
|
|
9
|
+
from rail.utils.path_utils import RAILDIR
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class SpecSelection(Selector):
|
|
@@ -68,7 +68,7 @@ def _compute_flux_error(flux, magnitude_error):
|
|
|
68
68
|
return flux_error
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
class
|
|
71
|
+
class PhotometryManipulator(RailStage, ABC):
|
|
72
72
|
"""
|
|
73
73
|
Base class to perform opertations on magnitudes. A table with input magnitudes and errors is
|
|
74
74
|
processed and transformed into an output table with new magnitudes and errors.
|
|
@@ -76,7 +76,7 @@ class PhotormetryManipulator(RailStage, ABC):
|
|
|
76
76
|
Subclasses must implement the run() and compute() method.
|
|
77
77
|
"""
|
|
78
78
|
|
|
79
|
-
name = '
|
|
79
|
+
name = 'PhotometryManipulator'
|
|
80
80
|
config_options = RailStage.config_options.copy()
|
|
81
81
|
config_options.update(
|
|
82
82
|
value_columns=Param(
|
|
@@ -171,7 +171,7 @@ class PhotormetryManipulator(RailStage, ABC):
|
|
|
171
171
|
return self.get_handle('output')
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
class HyperbolicSmoothing(
|
|
174
|
+
class HyperbolicSmoothing(PhotometryManipulator):
|
|
175
175
|
"""
|
|
176
176
|
Initial stage to compute hyperbolic magnitudes (Lupton et al. 1999). Estimates the smoothing
|
|
177
177
|
parameter b that is used by the second stage (`HyperbolicMagnitudes`) to convert classical to
|
|
@@ -179,7 +179,7 @@ class HyperbolicSmoothing(PhotormetryManipulator):
|
|
|
179
179
|
"""
|
|
180
180
|
|
|
181
181
|
name = 'HyperbolicSmoothing'
|
|
182
|
-
config_options =
|
|
182
|
+
config_options = PhotometryManipulator.config_options.copy()
|
|
183
183
|
inputs = [('input', PqHandle)]
|
|
184
184
|
outputs = [('parameters', PqHandle)]
|
|
185
185
|
|
|
@@ -240,7 +240,7 @@ class HyperbolicSmoothing(PhotormetryManipulator):
|
|
|
240
240
|
return self.get_handle('parameters')
|
|
241
241
|
|
|
242
242
|
|
|
243
|
-
class HyperbolicMagnitudes(
|
|
243
|
+
class HyperbolicMagnitudes(PhotometryManipulator):
|
|
244
244
|
"""
|
|
245
245
|
Convert a set of classical magnitudes to hyperbolic magnitudes (Lupton et al. 1999). Requires
|
|
246
246
|
input from the initial stage (`HyperbolicSmoothing`) to supply optimal values for the smoothing
|
|
@@ -248,7 +248,7 @@ class HyperbolicMagnitudes(PhotormetryManipulator):
|
|
|
248
248
|
"""
|
|
249
249
|
|
|
250
250
|
name = 'HyperbolicMagnitudes'
|
|
251
|
-
config_options =
|
|
251
|
+
config_options = PhotometryManipulator.config_options.copy()
|
|
252
252
|
inputs = [('input', PqHandle),
|
|
253
253
|
('parameters', PqHandle)]
|
|
254
254
|
outputs = [('output', PqHandle)]
|
|
@@ -20,8 +20,8 @@ from rail.core.data import (
|
|
|
20
20
|
TableHandle,
|
|
21
21
|
)
|
|
22
22
|
from rail.core.stage import RailStage
|
|
23
|
-
from rail.tools.
|
|
24
|
-
from rail.
|
|
23
|
+
from rail.tools.photometry_tools import HyperbolicMagnitudes, HyperbolicSmoothing, PhotometryManipulator, LSSTFluxToMagConverter, Dereddener
|
|
24
|
+
from rail.utils.path_utils import RAILDIR
|
|
25
25
|
#from rail.tools.util_stages import (
|
|
26
26
|
# LSSTFluxToMagConverter,
|
|
27
27
|
# Dereddener,
|
|
@@ -98,38 +98,38 @@ def load_result_smoothing():
|
|
|
98
98
|
return DS.read_file("test_data", TableHandle, testFile).data
|
|
99
99
|
|
|
100
100
|
|
|
101
|
-
def
|
|
101
|
+
def test_PhotometryManipulator(hyperbolic_configuration):
|
|
102
102
|
DS = RailStage.data_store
|
|
103
103
|
DS.clear()
|
|
104
104
|
DS.__class__.allow_overwrite = False
|
|
105
105
|
|
|
106
|
-
# NOTE: the __init__ machinery of HyperbolicSmoothing is identical to
|
|
107
|
-
# and is used as substitute since
|
|
106
|
+
# NOTE: the __init__ machinery of HyperbolicSmoothing is identical to PhotometryManipulator
|
|
107
|
+
# and is used as substitute since PhotometryManipulator cannot be instantiated.
|
|
108
108
|
n_filters = len(hyperbolic_configuration["value_columns"])
|
|
109
109
|
|
|
110
110
|
# wrong number of "error_columns"
|
|
111
111
|
config = hyperbolic_configuration.copy()
|
|
112
112
|
config["error_columns"] = hyperbolic_configuration["error_columns"][:-1]
|
|
113
113
|
with pytest.raises(IndexError):
|
|
114
|
-
inst = HyperbolicSmoothing.make_stage(name="
|
|
114
|
+
inst = HyperbolicSmoothing.make_stage(name="photometry_manipulator", **config)
|
|
115
115
|
|
|
116
116
|
# wrong number of "zeropoints"
|
|
117
117
|
config = hyperbolic_configuration.copy()
|
|
118
118
|
config["zeropoints"] = np.arange(0, n_filters - 1)
|
|
119
119
|
with pytest.raises(IndexError):
|
|
120
|
-
inst = HyperbolicSmoothing.make_stage(name="
|
|
120
|
+
inst = HyperbolicSmoothing.make_stage(name="photometry_manipulator", **config)
|
|
121
121
|
|
|
122
122
|
# default values for "zeropoints"
|
|
123
123
|
config = hyperbolic_configuration.copy()
|
|
124
124
|
config.pop("zeropoints") # should resort to default of 0.0
|
|
125
|
-
inst = HyperbolicSmoothing.make_stage(name="
|
|
125
|
+
inst = HyperbolicSmoothing.make_stage(name="photometry_manipulator", **config)
|
|
126
126
|
assert len(inst.zeropoints) == n_filters
|
|
127
127
|
assert all(zp == 0.0 for zp in inst.zeropoints)
|
|
128
128
|
|
|
129
129
|
# if_flux preserves the values
|
|
130
130
|
dummy_data = pd.DataFrame(dict(val=[1, 2, 3], err=[1, 2, 3]))
|
|
131
131
|
config = dict(value_columns=["val"], error_columns=["err"], zeropoints=[0.0])
|
|
132
|
-
inst = HyperbolicSmoothing.make_stage(name="
|
|
132
|
+
inst = HyperbolicSmoothing.make_stage(name="photometry_manipulator", **config, is_flux=True)
|
|
133
133
|
inst.set_data("input", dummy_data)
|
|
134
134
|
data = inst.get_as_fluxes()
|
|
135
135
|
assert np.allclose(data, dummy_data)
|
|
@@ -7,13 +7,13 @@ import pytest
|
|
|
7
7
|
from photerr import LsstErrorModel as PhoterrErrorModel
|
|
8
8
|
|
|
9
9
|
from rail.core.data import DATA_STORE, TableHandle
|
|
10
|
-
from rail.
|
|
11
|
-
from rail.
|
|
12
|
-
from rail.creation.
|
|
13
|
-
from rail.creation.
|
|
14
|
-
from rail.creation.
|
|
15
|
-
from rail.creation.
|
|
16
|
-
from rail.creation.
|
|
10
|
+
from rail.utils.path_utils import find_rail_file
|
|
11
|
+
from rail.tools.table_tools import ColumnMapper
|
|
12
|
+
from rail.creation.degraders.spectroscopic_degraders import InvRedshiftIncompleteness, LineConfusion
|
|
13
|
+
from rail.creation.degraders.spectroscopic_selections import *
|
|
14
|
+
from rail.creation.degraders.observing_condition_degrader import ObsCondition
|
|
15
|
+
from rail.creation.degraders.grid_selection import GridSelection
|
|
16
|
+
from rail.creation.degraders.lsst_error_model import LSSTErrorModel
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
@pytest.fixture
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
from ._version import __version__
|
|
2
|
-
|
|
3
|
-
from rail.creation.degradation.grid_selection import *
|
|
4
|
-
from rail.creation.degradation.observing_condition_degrader import *
|
|
5
|
-
from rail.creation.degradation.spectroscopic_degraders import *
|
|
6
|
-
from rail.creation.degradation.spectroscopic_selections import *
|
|
7
|
-
from rail.creation.degradation.lsst_error_model import *
|
|
8
|
-
from rail.tools.util_photometry import *
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cells": [
|
|
3
|
-
{
|
|
4
|
-
"cell_type": "markdown",
|
|
5
|
-
"id": "2610a0f0-0c71-4401-896f-734442bcd66d",
|
|
6
|
-
"metadata": {},
|
|
7
|
-
"source": [
|
|
8
|
-
"## Photometric error stage demo\n",
|
|
9
|
-
"\n",
|
|
10
|
-
"author: Tianqing Zhang, John-Franklin Crenshaw\n",
|
|
11
|
-
"\n",
|
|
12
|
-
"This notebook demonstrate the use of `rail.creation.degradation.photometric_errors`, which adds column for the photometric noise to the catalog based on the package PhotErr developed by John-Franklin Crenshaw. The RAIL stage PhotoErrorModel inherit from the Noisifier base classes, and the LSST, Roman, Euclid child classes inherit from the PhotoErrorModel"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"cell_type": "code",
|
|
17
|
-
"execution_count": null,
|
|
18
|
-
"id": "f7a6adc3-68e8-4a1d-842f-bfb0960a1c4a",
|
|
19
|
-
"metadata": {},
|
|
20
|
-
"outputs": [],
|
|
21
|
-
"source": [
|
|
22
|
-
"\n",
|
|
23
|
-
"from rail.creation.degradation.photometric_errors import LSSTErrorModel\n",
|
|
24
|
-
"from rail.creation.degradation.photometric_errors import RomanErrorModel\n",
|
|
25
|
-
"from rail.creation.degradation.photometric_errors import EuclidErrorModel\n",
|
|
26
|
-
"\n",
|
|
27
|
-
"from rail.core.data import PqHandle\n",
|
|
28
|
-
"from rail.core.stage import RailStage\n",
|
|
29
|
-
"\n",
|
|
30
|
-
"import matplotlib.pyplot as plt\n",
|
|
31
|
-
"import pandas as pd\n",
|
|
32
|
-
"import numpy as np\n",
|
|
33
|
-
"\n"
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"cell_type": "code",
|
|
38
|
-
"execution_count": null,
|
|
39
|
-
"id": "6912a740-31ea-4987-b06d-81ff17cd895a",
|
|
40
|
-
"metadata": {},
|
|
41
|
-
"outputs": [],
|
|
42
|
-
"source": [
|
|
43
|
-
"DS = RailStage.data_store\n",
|
|
44
|
-
"DS.__class__.allow_overwrite = True\n"
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"cell_type": "markdown",
|
|
49
|
-
"id": "a282c2ed-141b-4507-8254-dc8fbc9864dc",
|
|
50
|
-
"metadata": {},
|
|
51
|
-
"source": [
|
|
52
|
-
"### Create a random catalog with ugrizy+YJHF bands as the the true input"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"cell_type": "code",
|
|
57
|
-
"execution_count": null,
|
|
58
|
-
"id": "1078bc2a-fc54-41c3-bd30-6c447bb971d4",
|
|
59
|
-
"metadata": {},
|
|
60
|
-
"outputs": [],
|
|
61
|
-
"source": [
|
|
62
|
-
"data = np.random.normal(23, 3, size = (1000,10))\n",
|
|
63
|
-
"\n",
|
|
64
|
-
"data_df = pd.DataFrame(data=data, # values\n",
|
|
65
|
-
" columns=['u', 'g', 'r', 'i', 'z', 'y', 'Y', 'J', 'H', 'F'])\n",
|
|
66
|
-
"data_truth = PqHandle('input')\n",
|
|
67
|
-
"data_truth.set_data(data_df)"
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"cell_type": "markdown",
|
|
72
|
-
"id": "1da27deb-d167-4f38-8c59-f270184d6ab3",
|
|
73
|
-
"metadata": {},
|
|
74
|
-
"source": [
|
|
75
|
-
"### The LSST error model adds noise to the optical bands"
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"cell_type": "code",
|
|
80
|
-
"execution_count": null,
|
|
81
|
-
"id": "e5f4862a-0621-46d4-8901-7e84b461c424",
|
|
82
|
-
"metadata": {},
|
|
83
|
-
"outputs": [],
|
|
84
|
-
"source": [
|
|
85
|
-
"errorModel_lsst = LSSTErrorModel.make_stage(name=\"error_model\")\n",
|
|
86
|
-
"\n",
|
|
87
|
-
"samples_w_errs = errorModel_lsst(data_truth)\n",
|
|
88
|
-
"samples_w_errs()\n"
|
|
89
|
-
]
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"cell_type": "code",
|
|
93
|
-
"execution_count": null,
|
|
94
|
-
"id": "6282c42e-1a6f-480a-aa2b-817bd30d372f",
|
|
95
|
-
"metadata": {},
|
|
96
|
-
"outputs": [],
|
|
97
|
-
"source": [
|
|
98
|
-
"fig, ax = plt.subplots(figsize=(5, 4), dpi=100)\n",
|
|
99
|
-
"\n",
|
|
100
|
-
"for band in \"ugrizy\":\n",
|
|
101
|
-
" # pull out the magnitudes and errors\n",
|
|
102
|
-
" mags = samples_w_errs.data[band].to_numpy()\n",
|
|
103
|
-
" errs = samples_w_errs.data[band + \"_err\"].to_numpy()\n",
|
|
104
|
-
"\n",
|
|
105
|
-
" # sort them by magnitude\n",
|
|
106
|
-
" mags, errs = mags[mags.argsort()], errs[mags.argsort()]\n",
|
|
107
|
-
"\n",
|
|
108
|
-
" # plot errs vs mags\n",
|
|
109
|
-
" ax.plot(mags, errs, label=band)\n",
|
|
110
|
-
"\n",
|
|
111
|
-
"ax.legend()\n",
|
|
112
|
-
"ax.set(xlabel=\"Magnitude (AB)\", ylabel=\"Error (mags)\")\n",
|
|
113
|
-
"plt.show()\n"
|
|
114
|
-
]
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"cell_type": "markdown",
|
|
118
|
-
"id": "50927ccb-4492-4bdd-a29b-0907704b2c59",
|
|
119
|
-
"metadata": {},
|
|
120
|
-
"source": [
|
|
121
|
-
"### The Roman error model adds noise to the infrared bands"
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"cell_type": "code",
|
|
126
|
-
"execution_count": null,
|
|
127
|
-
"id": "d484a34b-cf10-45bd-8571-b78dc1818180",
|
|
128
|
-
"metadata": {},
|
|
129
|
-
"outputs": [],
|
|
130
|
-
"source": [
|
|
131
|
-
"errorModel_Roman = RomanErrorModel.make_stage(name=\"error_model\")\n",
|
|
132
|
-
"\n",
|
|
133
|
-
"samples_w_errs_roman = errorModel_Roman(data_truth)\n",
|
|
134
|
-
"samples_w_errs_roman()"
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"cell_type": "code",
|
|
139
|
-
"execution_count": null,
|
|
140
|
-
"id": "a12362dc-0689-43f3-b990-edff734010bb",
|
|
141
|
-
"metadata": {},
|
|
142
|
-
"outputs": [],
|
|
143
|
-
"source": [
|
|
144
|
-
"fig, ax = plt.subplots(figsize=(5, 4), dpi=100)\n",
|
|
145
|
-
"\n",
|
|
146
|
-
"for band in \"YJHF\":\n",
|
|
147
|
-
" # pull out the magnitudes and errors\n",
|
|
148
|
-
" mags = samples_w_errs_roman.data[band].to_numpy()\n",
|
|
149
|
-
" errs = samples_w_errs_roman.data[band + \"_err\"].to_numpy()\n",
|
|
150
|
-
"\n",
|
|
151
|
-
" # sort them by magnitude\n",
|
|
152
|
-
" mags, errs = mags[mags.argsort()], errs[mags.argsort()]\n",
|
|
153
|
-
"\n",
|
|
154
|
-
" # plot errs vs mags\n",
|
|
155
|
-
" ax.plot(mags, errs, label=band)\n",
|
|
156
|
-
"\n",
|
|
157
|
-
"ax.legend()\n",
|
|
158
|
-
"ax.set(xlabel=\"Magnitude (AB)\", ylabel=\"Error (mags)\")\n",
|
|
159
|
-
"plt.show()\n"
|
|
160
|
-
]
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"cell_type": "markdown",
|
|
164
|
-
"id": "359de4ad-a47c-4dc5-8c81-53aeb92bdf42",
|
|
165
|
-
"metadata": {},
|
|
166
|
-
"source": [
|
|
167
|
-
"### The Euclid error model adds noise to YJH bands"
|
|
168
|
-
]
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"cell_type": "code",
|
|
172
|
-
"execution_count": null,
|
|
173
|
-
"id": "775d0a23-7435-4b01-83db-2234c3d24f57",
|
|
174
|
-
"metadata": {},
|
|
175
|
-
"outputs": [],
|
|
176
|
-
"source": [
|
|
177
|
-
"errorModel_Euclid = EuclidErrorModel.make_stage(name=\"error_model\")\n",
|
|
178
|
-
"\n",
|
|
179
|
-
"samples_w_errs_Euclid = errorModel_Euclid(data_truth)\n",
|
|
180
|
-
"samples_w_errs_Euclid()"
|
|
181
|
-
]
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"cell_type": "code",
|
|
185
|
-
"execution_count": null,
|
|
186
|
-
"id": "7fcfe07a-5571-4dd3-8ad0-358964c1d493",
|
|
187
|
-
"metadata": {},
|
|
188
|
-
"outputs": [],
|
|
189
|
-
"source": [
|
|
190
|
-
"fig, ax = plt.subplots(figsize=(5, 4), dpi=100)\n",
|
|
191
|
-
"\n",
|
|
192
|
-
"for band in \"YJH\":\n",
|
|
193
|
-
" # pull out the magnitudes and errors\n",
|
|
194
|
-
" mags = samples_w_errs_Euclid.data[band].to_numpy()\n",
|
|
195
|
-
" errs = samples_w_errs_Euclid.data[band + \"_err\"].to_numpy()\n",
|
|
196
|
-
"\n",
|
|
197
|
-
" # sort them by magnitude\n",
|
|
198
|
-
" mags, errs = mags[mags.argsort()], errs[mags.argsort()]\n",
|
|
199
|
-
"\n",
|
|
200
|
-
" # plot errs vs mags\n",
|
|
201
|
-
" ax.plot(mags, errs, label=band)\n",
|
|
202
|
-
"\n",
|
|
203
|
-
"ax.legend()\n",
|
|
204
|
-
"ax.set(xlabel=\"Magnitude (AB)\", ylabel=\"Error (mags)\")\n",
|
|
205
|
-
"plt.show()\n"
|
|
206
|
-
]
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"cell_type": "code",
|
|
210
|
-
"execution_count": null,
|
|
211
|
-
"id": "268b3d37-b7fd-4ac1-8457-2104a87c9e6d",
|
|
212
|
-
"metadata": {},
|
|
213
|
-
"outputs": [],
|
|
214
|
-
"source": []
|
|
215
|
-
}
|
|
216
|
-
],
|
|
217
|
-
"metadata": {
|
|
218
|
-
"kernelspec": {
|
|
219
|
-
"display_name": "rail_env",
|
|
220
|
-
"language": "python",
|
|
221
|
-
"name": "rail_env"
|
|
222
|
-
},
|
|
223
|
-
"language_info": {
|
|
224
|
-
"codemirror_mode": {
|
|
225
|
-
"name": "ipython",
|
|
226
|
-
"version": 3
|
|
227
|
-
},
|
|
228
|
-
"file_extension": ".py",
|
|
229
|
-
"mimetype": "text/x-python",
|
|
230
|
-
"name": "python",
|
|
231
|
-
"nbconvert_exporter": "python",
|
|
232
|
-
"pygments_lexer": "ipython3",
|
|
233
|
-
"version": "3.11.4"
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
"nbformat": 4,
|
|
237
|
-
"nbformat_minor": 5
|
|
238
|
-
}
|
|
File without changes
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/ISSUE_TEMPLATE/0-general_issue.md
RENAMED
|
File without changes
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/ISSUE_TEMPLATE/1-bug_report.md
RENAMED
|
File without changes
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/ISSUE_TEMPLATE/2-feature_request.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/workflows/publish-to-pypi.yml
RENAMED
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/.github/workflows/testing-and-coverage.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/src/rail/creation/engines/gcr_engine.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/tests/astro_tools/gcr_test_data/schema.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-0.1.3 → pz_rail_astro_tools-0.1.4}/tests/astro_tools/test_gcr_engine.py
RENAMED
|
File without changes
|