pz-rail-astro-tools 1.1.0__tar.gz → 1.1.2__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-1.1.0 → pz_rail_astro_tools-1.1.2}/PKG-INFO +3 -2
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/pz_rail_astro_tools.egg-info/PKG-INFO +3 -2
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/astro_tools/_version.py +9 -4
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/creation/degraders/grid_selection.py +19 -19
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/creation/degraders/observing_condition_degrader.py +34 -37
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/creation/degraders/spectroscopic_degraders.py +3 -18
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/creation/degraders/spectroscopic_selections.py +0 -22
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/creation/engines/gcr_engine.py +5 -10
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/pipelines/degradation/apply_phot_errors.py +12 -5
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/pipelines/degradation/truth_to_observed.py +10 -5
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/tools/photometry_tools.py +4 -2
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.copier-answers.yml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/ISSUE_TEMPLATE/0-general_issue.md +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/ISSUE_TEMPLATE/1-bug_report.md +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/ISSUE_TEMPLATE/2-feature_request.md +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/pull_request_template.md +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/workflows/add-issue-to-project-tracker.yml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/workflows/linting.yml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/workflows/publish-to-pypi.yml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/workflows/smoke-test.yml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/workflows/testing-and-coverage.yml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.gitignore +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.pre-commit-config.yaml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/LICENSE +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/README.md +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/environment.yml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/pyproject.toml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/setup.cfg +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/setup.py +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/pz_rail_astro_tools.egg-info/SOURCES.txt +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/pz_rail_astro_tools.egg-info/dependency_links.txt +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/pz_rail_astro_tools.egg-info/requires.txt +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/pz_rail_astro_tools.egg-info/top_level.txt +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/astro_tools/__init__.py +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/creation/degraders/photometric_errors.py +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/creation/degraders/unrec_bl_model.py +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/examples_data/creation_data/data/HSC_grid_settings.pkl +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/examples_data/creation_data/data/hsc_ratios_and_specz.hdf5 +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/examples_data/creation_data/data/survey_conditions/DC2-dr6-galcounts-i20-i25.3-nside-128.fits +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/examples_data/creation_data/data/survey_conditions/DC2-mask-neg-nside-128.fits +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/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-1.1.0 → pz_rail_astro_tools-1.1.2}/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-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/examples_data/testdata/rubin_dm_dc2_example2.pq +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/pipelines/degradation/blending.py +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/pipelines/degradation/spectroscopic_selection_pipeline.py +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/tests/astro_tools/gcr_test_data/schema.yaml +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/tests/astro_tools/gcr_test_data/test_object_tract_4850.hdf5 +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/tests/astro_tools/test_core.py +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/tests/astro_tools/test_degraders.py +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/tests/astro_tools/test_gcr_engine.py +0 -0
- {pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/tests/astro_tools/test_pipline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pz-rail-astro-tools
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Author-email: "LSST Dark Energy Science Collaboration (DESC)" <lsst-desc-rail-admin@slac.stanford.edu>
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -50,6 +50,7 @@ Requires-Dist: pytest; extra == "dev"
|
|
|
50
50
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
51
51
|
Requires-Dist: pre-commit; extra == "dev"
|
|
52
52
|
Requires-Dist: pylint; extra == "dev"
|
|
53
|
+
Dynamic: license-file
|
|
53
54
|
|
|
54
55
|
# pz-rail-astro-tools
|
|
55
56
|
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/pz_rail_astro_tools.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pz-rail-astro-tools
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Author-email: "LSST Dark Energy Science Collaboration (DESC)" <lsst-desc-rail-admin@slac.stanford.edu>
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -50,6 +50,7 @@ Requires-Dist: pytest; extra == "dev"
|
|
|
50
50
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
51
51
|
Requires-Dist: pre-commit; extra == "dev"
|
|
52
52
|
Requires-Dist: pylint; extra == "dev"
|
|
53
|
+
Dynamic: license-file
|
|
53
54
|
|
|
54
55
|
# pz-rail-astro-tools
|
|
55
56
|
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
# file generated by
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
|
5
|
+
|
|
3
6
|
TYPE_CHECKING = False
|
|
4
7
|
if TYPE_CHECKING:
|
|
5
|
-
from typing import Tuple
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
6
11
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
12
|
else:
|
|
8
13
|
VERSION_TUPLE = object
|
|
@@ -12,5 +17,5 @@ __version__: str
|
|
|
12
17
|
__version_tuple__: VERSION_TUPLE
|
|
13
18
|
version_tuple: VERSION_TUPLE
|
|
14
19
|
|
|
15
|
-
__version__ = version = '1.1.
|
|
16
|
-
__version_tuple__ = version_tuple = (1, 1,
|
|
20
|
+
__version__ = version = '1.1.2'
|
|
21
|
+
__version_tuple__ = version_tuple = (1, 1, 2)
|
|
@@ -16,24 +16,24 @@ class GridSelection(Selector):
|
|
|
16
16
|
into training and application samples. Option to implement a color-based redshift cut off in each pixel.
|
|
17
17
|
Option of further degrading the training sample by limiting it to galaxies less than a redshift cutoff by specifying redshift_cut.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
.. code-block:: text
|
|
20
|
+
|
|
21
|
+
color_redshift_cut: True or false, implements color-based redshift cut. Default is True.
|
|
22
|
+
If True, ratio_file must include second key called 'data' with magnitudes, colors and spec-z from the spectroscopic sample.
|
|
23
|
+
percentile_cut: If using color-based redshift cut, percentile in spec-z above which redshifts will be cut from training sample. Default is 99.0
|
|
24
|
+
scaling_factor: Enables the user to adjust the ratios by this factor to change the overall number of galaxies kept. For example, if you wish
|
|
25
|
+
to generate 100,00 galaxies but only 50,000 are selected by default, then you can adjust factor up by a factor of 2 to return more galaixes.
|
|
26
|
+
redshift_cut: redshift above which all galaxies will be removed from training sample. Default is 100
|
|
27
|
+
ratio_file: hdf5 file containing an array of spectroscpic vs. photometric galaxies in each pixel. Default is hsc_ratios.hdf5 for an HSC based selection
|
|
28
|
+
settings_file: pickled dictionary containing information about colors and magnitudes used in defining the pixels. Dictionary must include the following keys:
|
|
29
|
+
'x_band_1': string, this is the band used for the magnitude in the color magnitude diagram. Default for HSC is 'i'.
|
|
30
|
+
'x_band_2': string, this is the redder band used for the color in the color magnitude diagram.
|
|
31
|
+
if x_band_2 string is not set to '' then the grid is assumed to be over color and x axis color is set to x_band_1 - x_band_2, default is ''.
|
|
32
|
+
'y_band_1': string, this is the bluer band used for the color in the color magnitude grid. Default for HSC is 'g'.
|
|
33
|
+
'y_band_2': string, this is the redder band used for the color in the color magnitude diagram.
|
|
34
|
+
if y_band_2 is not set to '' then the y-band is assumed to be over color and is set to y_band_1 - y_band 2.
|
|
35
|
+
'x_limits': 2-element list, this is a list of the lower and upper limits of the magnitude. Default for HSC is [13, 16],
|
|
36
|
+
'y_limits': 2-element list, this is a list of the lower and upper limits of the color. Default for HSC is [-2, 6]}
|
|
37
37
|
|
|
38
38
|
NOTE: the default 'HSC' grid file, located in rail/examples_data/creation_data/data/hsc_ratios_and_specz.hdf5, is based on data from the
|
|
39
39
|
Second HSC Data Release, details of which can be found here:
|
|
@@ -222,4 +222,4 @@ class GridSelection(Selector):
|
|
|
222
222
|
total_mask = np.zeros(len(data), dtype=bool)
|
|
223
223
|
total_mask[final_keep_inds] = True
|
|
224
224
|
|
|
225
|
-
return total_mask
|
|
225
|
+
return total_mask
|
|
@@ -19,43 +19,40 @@ class ObsCondition(Noisifier):
|
|
|
19
19
|
using input survey condition maps. The error is based on the
|
|
20
20
|
LSSTErrorModel from the PhotErr python package.
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
for the survey condition maps).
|
|
57
|
-
If any argument is not passed, the default value in
|
|
58
|
-
PhotErr's LsstErrorModel is adopted.
|
|
22
|
+
.. code-block:: text
|
|
23
|
+
|
|
24
|
+
mask: str, optional
|
|
25
|
+
Path to the mask covering the survey
|
|
26
|
+
footprint in HEALPIX format. Notice that
|
|
27
|
+
all negative values will be set to zero.
|
|
28
|
+
weight: str, optional
|
|
29
|
+
Path to the weights HEALPIX format, used
|
|
30
|
+
to assign sample galaxies to pixels. Default
|
|
31
|
+
is weight="", which uses uniform weighting.
|
|
32
|
+
tot_nVis_flag: bool, optional
|
|
33
|
+
If any map for nVisYr are provided, this flag
|
|
34
|
+
indicates whether the map shows the total number of
|
|
35
|
+
visits in nYrObs (tot_nVis_flag=True), or the average
|
|
36
|
+
number of visits per year (tot_nVis_flag=False). The
|
|
37
|
+
default is set to True.
|
|
38
|
+
map_dict: dict, optional
|
|
39
|
+
A dictionary that contains the paths to the
|
|
40
|
+
survey condition maps in HEALPIX format. This dictionary
|
|
41
|
+
uses the same arguments as LSSTErrorModel (from PhotErr).
|
|
42
|
+
The following arguments, if supplied, may contain either
|
|
43
|
+
a single number (as in the case of LSSTErrorModel), or a path:
|
|
44
|
+
[m5, nVisYr, airmass, gamma, msky, theta, km, tvis, EBV]
|
|
45
|
+
For the following keys:
|
|
46
|
+
[m5, nVisYr, gamma, msky, theta, km]
|
|
47
|
+
numbers/paths for specific bands must be passed.
|
|
48
|
+
Example:
|
|
49
|
+
{"m5": {"u": path, ...}, "theta": {"u": path, ...},}
|
|
50
|
+
Other LSSTErrorModel parameters can also be passed
|
|
51
|
+
in this dictionary (e.g. a necessary one may be [nYrObs]
|
|
52
|
+
or the survey condition maps).
|
|
53
|
+
If any argument is not passed, the default value in
|
|
54
|
+
PhotErr's LsstErrorModel is adopted.
|
|
55
|
+
|
|
59
56
|
|
|
60
57
|
"""
|
|
61
58
|
|
|
@@ -13,9 +13,9 @@ class LineConfusion(Noisifier):
|
|
|
13
13
|
|
|
14
14
|
.. code-block:: python
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
degrader = LineConfusion(true_wavelen=3727,
|
|
17
|
+
wrong_wavelen=5007,
|
|
18
|
+
frac_wrong=0.05)
|
|
19
19
|
|
|
20
20
|
is a degrader that misidentifies 5% of OII lines (at 3727 angstroms)
|
|
21
21
|
as OIII lines (at 5007 angstroms), which results in a larger
|
|
@@ -26,17 +26,6 @@ class LineConfusion(Noisifier):
|
|
|
26
26
|
in a negative redshift, which can occur for low redshift galaxies when
|
|
27
27
|
wrong_wavelen < true_wavelen.
|
|
28
28
|
|
|
29
|
-
Parameters
|
|
30
|
-
----------
|
|
31
|
-
true_wavelen : positive float
|
|
32
|
-
The wavelength of the true emission line.
|
|
33
|
-
Wavelength unit assumed to be the same as wrong_wavelen.
|
|
34
|
-
wrong_wavelen : positive float
|
|
35
|
-
The wavelength of the wrong emission line, which is being confused
|
|
36
|
-
for the correct emission line.
|
|
37
|
-
Wavelength unit assumed to be the same as true_wavelen.
|
|
38
|
-
frac_wrong : float between zero and one
|
|
39
|
-
The fraction of galaxies with confused emission lines.
|
|
40
29
|
"""
|
|
41
30
|
|
|
42
31
|
name = 'LineConfusion'
|
|
@@ -108,10 +97,6 @@ class InvRedshiftIncompleteness(Selector):
|
|
|
108
97
|
p(z) = min(1, z_p/z),
|
|
109
98
|
where z_p is the pivot redshift.
|
|
110
99
|
|
|
111
|
-
Parameters
|
|
112
|
-
----------
|
|
113
|
-
pivot_redshift : positive float
|
|
114
|
-
The redshift at which the incompleteness begins.
|
|
115
100
|
"""
|
|
116
101
|
|
|
117
102
|
name = 'InvRedshiftIncompleteness'
|
|
@@ -12,28 +12,6 @@ from rail.utils.path_utils import RAILDIR
|
|
|
12
12
|
class SpecSelection(Selector):
|
|
13
13
|
"""The super class of spectroscopic selections.
|
|
14
14
|
|
|
15
|
-
Parameters
|
|
16
|
-
----------
|
|
17
|
-
N_tot : int
|
|
18
|
-
The total number of down-sampled, spec-selected galaxies. If N_tot is
|
|
19
|
-
greater than the number of spec-sepected galaxies, then it will be
|
|
20
|
-
ignored.
|
|
21
|
-
nondetect_val : float
|
|
22
|
-
The value to be removed for non detects
|
|
23
|
-
downsample : bool
|
|
24
|
-
If True, then downsample the pre-selected galaxies to N_tot galaxies.
|
|
25
|
-
success_rate_dir : string
|
|
26
|
-
The path to the success rate files
|
|
27
|
-
percentile_cut: int, default=100
|
|
28
|
-
If using color-based redshift cut, percentile in redshifts above which
|
|
29
|
-
redshifts will be cut from the sample. Default is 100 (no cut).
|
|
30
|
-
colnames: dict
|
|
31
|
-
A dictionary that includes necessary columns (magnitudes, colors and
|
|
32
|
-
redshift) for selection. For magnitudes, the keys are ugrizy; for
|
|
33
|
-
colors, the keys are, for example, gr standing for g-r; for redshift,
|
|
34
|
-
the key is 'redshift'.
|
|
35
|
-
random_seed : int
|
|
36
|
-
Random seed for reproducibility
|
|
37
15
|
"""
|
|
38
16
|
|
|
39
17
|
name = "SpecSelection"
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/creation/engines/gcr_engine.py
RENAMED
|
@@ -11,16 +11,11 @@ class GCRCreator(Creator):
|
|
|
11
11
|
|
|
12
12
|
For info on GCRCatalogs, see https://github.com/LSSTDESC/gcr-catalogs
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
The name of the GCR catalog to load. See https://github.com/LSSTDESC/gcr-catalogs/blob/master/examples/GCRCatalogs%20Demo.ipynb for how to get available options.
|
|
20
|
-
quantities : list, default=[redshift, mag_u_lsst, mag_g_lsst, ..., size_true, size_minor_true]
|
|
21
|
-
The quantities to query from the catalog. See https://github.com/LSSTDESC/gcr-catalogs/blob/master/GCRCatalogs/SCHEMA.md for all options.
|
|
22
|
-
filters : list, default=["mag_i_lsst < 26.5"]
|
|
23
|
-
Filters that are passed to the GCR Query.
|
|
14
|
+
See https://github.com/LSSTDESC/gcr-catalogs/blob/master/examples/GCRCatalogs%20Demo.ipynb
|
|
15
|
+
for how to get available options for catalog_name.
|
|
16
|
+
|
|
17
|
+
See https://github.com/LSSTDESC/gcr-catalogs/blob/master/GCRCatalogs/SCHEMA.md
|
|
18
|
+
for all options for quantities to query.
|
|
24
19
|
"""
|
|
25
20
|
|
|
26
21
|
name = "GCRLoader"
|
|
@@ -25,11 +25,13 @@ ERROR_MODELS = dict(
|
|
|
25
25
|
lsst = dict(
|
|
26
26
|
ErrorModel='LSSTErrorModel',
|
|
27
27
|
Module='rail.creation.degraders.photometric_errors',
|
|
28
|
+
Bands=['u', 'g', 'r', 'i', 'z', 'y'],
|
|
28
29
|
),
|
|
29
|
-
roman = dict(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
#roman = dict(
|
|
31
|
+
# ErrorModel='RomanErrorModel',
|
|
32
|
+
# Module='rail.creation.degraders.photometric_errors',
|
|
33
|
+
# Bands=['Y', 'J', 'H', 'F'],
|
|
34
|
+
#),
|
|
33
35
|
#euclid = dict(
|
|
34
36
|
# ErrorModel='EuclidErrorModel',
|
|
35
37
|
# Module='rail.creation.degraders.photometric_errors',
|
|
@@ -57,13 +59,18 @@ class ApplyPhotErrorsPipeline(RailPipeline):
|
|
|
57
59
|
)
|
|
58
60
|
|
|
59
61
|
previous_stage = self.reddener
|
|
62
|
+
full_rename_dict = catalog_utils.CatalogConfigBase.active_class().band_name_dict()
|
|
60
63
|
for key, val in error_models.items():
|
|
61
64
|
error_model_class = ceci.PipelineStage.get_stage(val['ErrorModel'], val['Module'])
|
|
65
|
+
if 'Bands' in val:
|
|
66
|
+
rename_dict = {band_: full_rename_dict[band_] for band_ in val['Bands']}
|
|
67
|
+
else: # pragma: no cover
|
|
68
|
+
rename_dict = full_rename_dict
|
|
62
69
|
the_error_model = error_model_class.make_and_connect(
|
|
63
70
|
name=f'error_model_{key}',
|
|
64
71
|
connections=dict(input=previous_stage.io.output),
|
|
65
72
|
hdf5_groupname='',
|
|
66
|
-
renameDict=
|
|
73
|
+
renameDict=rename_dict,
|
|
67
74
|
)
|
|
68
75
|
self.add_stage(the_error_model)
|
|
69
76
|
previous_stage = the_error_model
|
|
@@ -37,7 +37,7 @@ class TruthToObservedPipeline(RailPipeline):
|
|
|
37
37
|
DS.__class__.allow_overwrite = True
|
|
38
38
|
|
|
39
39
|
active_catalog_config = catalog_utils.CatalogConfigBase.active_class()
|
|
40
|
-
|
|
40
|
+
full_rename_dict = active_catalog_config.band_name_dict()
|
|
41
41
|
|
|
42
42
|
if error_models is None:
|
|
43
43
|
error_models = ERROR_MODELS.copy()
|
|
@@ -46,7 +46,7 @@ class TruthToObservedPipeline(RailPipeline):
|
|
|
46
46
|
selectors = SELECTORS.copy()
|
|
47
47
|
|
|
48
48
|
config_pars = CommonConfigParams.copy()
|
|
49
|
-
config_pars['colnames'] =
|
|
49
|
+
config_pars['colnames'] = full_rename_dict.copy()
|
|
50
50
|
config_pars['colnames']['redshift'] = active_catalog_config.redshift_col
|
|
51
51
|
|
|
52
52
|
self.reddener = Reddener.build(
|
|
@@ -61,11 +61,16 @@ class TruthToObservedPipeline(RailPipeline):
|
|
|
61
61
|
|
|
62
62
|
for key, val in error_models.items():
|
|
63
63
|
error_model_class = ceci.PipelineStage.get_stage(val['ErrorModel'], val['Module'])
|
|
64
|
+
if 'Bands' in val:
|
|
65
|
+
rename_dict = {band_: full_rename_dict[band_] for band_ in val['Bands']}
|
|
66
|
+
else: # pragma: no cover
|
|
67
|
+
rename_dict = full_rename_dict
|
|
68
|
+
|
|
64
69
|
the_error_model = error_model_class.make_and_connect(
|
|
65
70
|
name=f'error_model_{key}',
|
|
66
71
|
connections=dict(input=previous_stage.io.output),
|
|
67
72
|
hdf5_groupname='',
|
|
68
|
-
renameDict=
|
|
73
|
+
renameDict=rename_dict,
|
|
69
74
|
)
|
|
70
75
|
self.add_stage(the_error_model)
|
|
71
76
|
previous_stage = the_error_model
|
|
@@ -78,12 +83,12 @@ class TruthToObservedPipeline(RailPipeline):
|
|
|
78
83
|
)
|
|
79
84
|
self.add_stage(dereddener_errors)
|
|
80
85
|
previous_stage = dereddener_errors
|
|
81
|
-
|
|
86
|
+
|
|
82
87
|
for key2, val2 in selectors.items():
|
|
83
88
|
the_class = ceci.PipelineStage.get_stage(val2['Select'], val2['Module'])
|
|
84
89
|
the_selector = the_class.make_and_connect(
|
|
85
90
|
name=f'select_{key}_{key2}',
|
|
86
91
|
connections=dict(input=previous_stage.io.output),
|
|
87
92
|
**config_pars,
|
|
88
|
-
)
|
|
93
|
+
)
|
|
89
94
|
self.add_stage(the_selector)
|
|
@@ -371,10 +371,11 @@ class LSSTFluxToMagConverter(RailStage):
|
|
|
371
371
|
mag_conv = np.log(10)*0.4
|
|
372
372
|
|
|
373
373
|
inputs = [('input', PqHandle)]
|
|
374
|
-
outputs = [('output',
|
|
374
|
+
outputs = [('output', PqHandle)]
|
|
375
375
|
|
|
376
376
|
def _flux_to_mag(self, flux_vals):
|
|
377
|
-
|
|
377
|
+
vals = -2.5*np.log10(flux_vals) + self.config.mag_offset
|
|
378
|
+
return np.where(np.isfinite(vals), vals, np.nan)
|
|
378
379
|
|
|
379
380
|
def _flux_err_to_mag_err(self, flux_vals, flux_err_vals):
|
|
380
381
|
return flux_err_vals / (flux_vals*self.mag_conv)
|
|
@@ -383,6 +384,7 @@ class LSSTFluxToMagConverter(RailStage):
|
|
|
383
384
|
data = self.get_data('input', allow_missing=True)
|
|
384
385
|
out_data = {}
|
|
385
386
|
const = np.log(10.)*0.4
|
|
387
|
+
|
|
386
388
|
for band_ in self.config.bands:
|
|
387
389
|
flux_col_name = self.config.flux_name.format(band=band_)
|
|
388
390
|
flux_err_col_name = self.config.flux_err_name.format(band=band_)
|
|
File without changes
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/ISSUE_TEMPLATE/0-general_issue.md
RENAMED
|
File without changes
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/ISSUE_TEMPLATE/1-bug_report.md
RENAMED
|
File without changes
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/ISSUE_TEMPLATE/2-feature_request.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.github/workflows/publish-to-pypi.yml
RENAMED
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/.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
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/pz_rail_astro_tools.egg-info/SOURCES.txt
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
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/src/rail/pipelines/degradation/blending.py
RENAMED
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/tests/astro_tools/gcr_test_data/schema.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-1.1.0 → pz_rail_astro_tools-1.1.2}/tests/astro_tools/test_gcr_engine.py
RENAMED
|
File without changes
|
|
File without changes
|