pz-rail-astro-tools 1.0.5__tar.gz → 1.0.6__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.0.5 → pz_rail_astro_tools-1.0.6}/PKG-INFO +1 -1
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/pz_rail_astro_tools.egg-info/PKG-INFO +1 -1
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/pz_rail_astro_tools.egg-info/SOURCES.txt +0 -1
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/astro_tools/_version.py +2 -2
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/creation/degraders/unrec_bl_model.py +51 -13
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/tests/astro_tools/test_degraders.py +10 -6
- pz_rail_astro_tools-1.0.5/src/rail/creation/degraders/bl_demo.ipynb +0 -206
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.copier-answers.yml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/ISSUE_TEMPLATE/0-general_issue.md +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/ISSUE_TEMPLATE/1-bug_report.md +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/ISSUE_TEMPLATE/2-feature_request.md +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/pull_request_template.md +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/workflows/add-issue-to-project-tracker.yml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/workflows/linting.yml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/workflows/publish-to-pypi.yml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/workflows/smoke-test.yml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/workflows/testing-and-coverage.yml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.gitignore +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.pre-commit-config.yaml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/LICENSE +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/README.md +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/environment.yml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/pyproject.toml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/setup.cfg +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/setup.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/pz_rail_astro_tools.egg-info/dependency_links.txt +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/pz_rail_astro_tools.egg-info/requires.txt +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/pz_rail_astro_tools.egg-info/top_level.txt +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/astro_tools/__init__.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/creation/degraders/grid_selection.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/creation/degraders/observing_condition_degrader.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/creation/degraders/photometric_errors.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/creation/degraders/spectroscopic_degraders.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/creation/degraders/spectroscopic_selections.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/creation/engines/gcr_engine.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/examples_data/creation_data/data/HSC_grid_settings.pkl +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/examples_data/creation_data/data/hsc_ratios_and_specz.hdf5 +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/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.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/examples_data/creation_data/data/survey_conditions/DC2-mask-neg-nside-128.fits +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/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.0.5 → pz_rail_astro_tools-1.0.6}/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.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/examples_data/testdata/rubin_dm_dc2_example2.pq +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/pipelines/degradation/apply_phot_errors.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/pipelines/degradation/blending.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/pipelines/degradation/spectroscopic_selection_pipeline.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/tools/photometry_tools.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/tests/astro_tools/gcr_test_data/schema.yaml +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/tests/astro_tools/gcr_test_data/test_object_tract_4850.hdf5 +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/tests/astro_tools/test_core.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/tests/astro_tools/test_gcr_engine.py +0 -0
- {pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/tests/astro_tools/test_pipline.py +0 -0
{pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/pz_rail_astro_tools.egg-info/SOURCES.txt
RENAMED
|
@@ -22,7 +22,6 @@ 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/degraders/bl_demo.ipynb
|
|
26
25
|
src/rail/creation/degraders/grid_selection.py
|
|
27
26
|
src/rail/creation/degraders/observing_condition_degrader.py
|
|
28
27
|
src/rail/creation/degraders/photometric_errors.py
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from ceci.config import StageParameter as Param
|
|
4
4
|
from rail.creation.degrader import Degrader
|
|
5
|
+
from rail.core.data import PqHandle
|
|
5
6
|
import numpy as np, pandas as pd
|
|
6
7
|
import FoFCatalogMatching
|
|
7
8
|
|
|
@@ -27,6 +28,46 @@ class UnrecBlModel(Degrader):
|
|
|
27
28
|
b=Param(str, 'semi_minor', msg='semi minor axis column name'),
|
|
28
29
|
theta=Param(str, 'orientation', msg='orientation angle column name'))
|
|
29
30
|
|
|
31
|
+
outputs = [("output", PqHandle), ("compInd", PqHandle)]
|
|
32
|
+
|
|
33
|
+
def __call__(self, sample, seed: int = None):
|
|
34
|
+
"""The main interface method for ``Degrader``.
|
|
35
|
+
|
|
36
|
+
Applies degradation.
|
|
37
|
+
|
|
38
|
+
This will attach the sample to this `Degrader` (for introspection and
|
|
39
|
+
provenance tracking).
|
|
40
|
+
|
|
41
|
+
Then it will call the run() and finalize() methods, which need to be
|
|
42
|
+
implemented by the sub-classes.
|
|
43
|
+
|
|
44
|
+
The run() method will need to register the data that it creates to this
|
|
45
|
+
Estimator by using ``self.add_data('output', output_data)``.
|
|
46
|
+
|
|
47
|
+
Finally, this will return a PqHandle providing access to that output
|
|
48
|
+
data.
|
|
49
|
+
|
|
50
|
+
Parameters
|
|
51
|
+
----------
|
|
52
|
+
sample : table-like
|
|
53
|
+
The sample to be degraded
|
|
54
|
+
seed : int, default=None
|
|
55
|
+
An integer to set the numpy random seed
|
|
56
|
+
|
|
57
|
+
Returns
|
|
58
|
+
-------
|
|
59
|
+
output_data : PqHandle
|
|
60
|
+
A handle giving access to a table with degraded sample
|
|
61
|
+
"""
|
|
62
|
+
if seed is not None:
|
|
63
|
+
self.config.seed = seed
|
|
64
|
+
|
|
65
|
+
self.set_data("input", sample)
|
|
66
|
+
self.run()
|
|
67
|
+
self.finalize()
|
|
68
|
+
|
|
69
|
+
return {'output':self.get_handle("output"), 'compInd':self.get_handle("compInd")}
|
|
70
|
+
|
|
30
71
|
def __match_bl__(self, data):
|
|
31
72
|
|
|
32
73
|
"""Group sources with friends of friends"""
|
|
@@ -43,7 +84,7 @@ class UnrecBlModel(Degrader):
|
|
|
43
84
|
## adding the group id as the last column to data
|
|
44
85
|
matchData = pd.merge(data, results, left_index=True, right_index=True)
|
|
45
86
|
|
|
46
|
-
return matchData
|
|
87
|
+
return matchData, results
|
|
47
88
|
|
|
48
89
|
def __merge_bl__(self, data):
|
|
49
90
|
|
|
@@ -53,30 +94,25 @@ class UnrecBlModel(Degrader):
|
|
|
53
94
|
unique_id = np.unique(group_id)
|
|
54
95
|
|
|
55
96
|
ra_label, dec_label = self.config.ra_label, self.config.dec_label
|
|
56
|
-
|
|
57
|
-
cols = list(data.columns)
|
|
58
|
-
ra_ind = cols.index(ra_label)
|
|
59
|
-
dec_ind = cols.index(dec_label)
|
|
60
|
-
bands_ind = {b:cols.index(b) for b in self.config.bands}
|
|
97
|
+
cols = [ra_label, dec_label] + [b for b in self.config.bands] + ['group_id']
|
|
61
98
|
|
|
62
99
|
N_rows = len(unique_id)
|
|
63
100
|
N_cols = len(cols)
|
|
64
101
|
|
|
65
102
|
mergeData = np.zeros((N_rows, N_cols))
|
|
66
|
-
|
|
67
103
|
for i, id in enumerate(unique_id):
|
|
68
104
|
|
|
69
105
|
this_group = data.query(f'group_id=={id}')
|
|
70
106
|
|
|
71
107
|
## take the average position for the blended source
|
|
72
|
-
mergeData[i,
|
|
73
|
-
mergeData[i,
|
|
108
|
+
mergeData[i, cols.index(ra_label)] = this_group[ra_label].mean()
|
|
109
|
+
mergeData[i, cols.index(dec_label)] = this_group[dec_label].mean()
|
|
74
110
|
|
|
75
111
|
## sum up the fluxes into the blended source
|
|
76
112
|
for b in self.config.bands:
|
|
77
|
-
mergeData[i,
|
|
113
|
+
mergeData[i, cols.index(b)] = -2.5*np.log10(np.sum(10**(-this_group[b]/2.5)))
|
|
78
114
|
|
|
79
|
-
mergeData[
|
|
115
|
+
mergeData[:,cols.index('group_id')] = unique_id
|
|
80
116
|
mergeData_df = pd.DataFrame(data=mergeData, columns=cols)
|
|
81
117
|
mergeData_df['group_id'] = mergeData_df['group_id'].astype(int)
|
|
82
118
|
|
|
@@ -89,10 +125,12 @@ class UnrecBlModel(Degrader):
|
|
|
89
125
|
data = self.get_data("input")
|
|
90
126
|
|
|
91
127
|
# Match for close-by objects
|
|
92
|
-
matchData = self.__match_bl__(data)
|
|
128
|
+
matchData, compInd = self.__match_bl__(data)
|
|
93
129
|
|
|
94
130
|
# Merge matched objects into unrec-bl
|
|
95
131
|
blData = self.__merge_bl__(matchData)
|
|
96
132
|
|
|
97
|
-
# Return the new catalog
|
|
133
|
+
# Return the new catalog and component index in original catalog
|
|
98
134
|
self.add_data("output", blData)
|
|
135
|
+
self.add_data("compInd", compInd)
|
|
136
|
+
|
|
@@ -83,7 +83,7 @@ def data_for_bl():
|
|
|
83
83
|
DS.__class__.allow_overwrite = True
|
|
84
84
|
|
|
85
85
|
# generate random normal data
|
|
86
|
-
columns=['ra', 'dec', '
|
|
86
|
+
columns=['ra', 'dec', 'u', 'g', 'r', 'i', 'z', 'y']
|
|
87
87
|
rng = np.random.default_rng(0)
|
|
88
88
|
x = rng.normal(loc=23, scale=3, size=(1000, len(columns)))
|
|
89
89
|
|
|
@@ -91,9 +91,6 @@ def data_for_bl():
|
|
|
91
91
|
x[:, 0] = np.random.uniform(low=0, high=0.02, size=1000)
|
|
92
92
|
x[:, 1] = np.random.uniform(low=0, high=0.02, size=1000)
|
|
93
93
|
|
|
94
|
-
# replace redshifts with reasonable values
|
|
95
|
-
x[:, 2] = np.linspace(0, 2, x.shape[0])
|
|
96
|
-
|
|
97
94
|
# return data in handle wrapping a pandas DataFrame
|
|
98
95
|
df = pd.DataFrame(x, columns=columns)
|
|
99
96
|
return DS.add_data("data_for_bl", df, TableHandle, path="dummy_for_bl.pd")
|
|
@@ -423,12 +420,19 @@ def test_EucliErrorModel(data):
|
|
|
423
420
|
|
|
424
421
|
def test_BLModel(data_for_bl):
|
|
425
422
|
# Setup the stage
|
|
426
|
-
|
|
423
|
+
|
|
424
|
+
degrader = UnrecBlModel.make_stage(name='unrec_bl_model', ra_label='ra', dec_label='dec', linking_lengths=1.0, bands='ugrizy', seed=1234)
|
|
427
425
|
|
|
428
426
|
# Apply the degrader and get the data out
|
|
429
|
-
|
|
427
|
+
outputs = degrader(data_for_bl)
|
|
428
|
+
degraded_data = outputs['output'].data
|
|
429
|
+
truth_components = outputs['compInd'].data
|
|
430
430
|
|
|
431
431
|
# Check output data has less rows than input data
|
|
432
432
|
assert degraded_data.shape[0] < data_for_bl.data.shape[0]
|
|
433
433
|
|
|
434
|
+
# Check components has the same rows as input data
|
|
435
|
+
assert truth_components.shape[0] == data_for_bl.data.shape[0]
|
|
436
|
+
|
|
434
437
|
os.remove(degrader.get_output(degrader.get_aliased_tag("output"), final_name=True))
|
|
438
|
+
os.remove(degrader.get_output(degrader.get_aliased_tag("compInd"), final_name=True))
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cells": [
|
|
3
|
-
{
|
|
4
|
-
"cell_type": "markdown",
|
|
5
|
-
"id": "2610a0f0-0c71-4401-896f-734442bcd66d",
|
|
6
|
-
"metadata": {},
|
|
7
|
-
"source": [
|
|
8
|
-
"## Blending Degrader demo\n",
|
|
9
|
-
"\n",
|
|
10
|
-
"author: Shuang Liang\n",
|
|
11
|
-
"\n",
|
|
12
|
-
"This notebook demonstrate the use of `rail.creation.degradation.unrec_bl_model`, which uses Friends of Friends to finds sources close to each other and merge them into unrecognized blends"
|
|
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
|
-
"from rail.creation.degraders.unrec_bl_model import UnrecBlModel\n",
|
|
23
|
-
"\n",
|
|
24
|
-
"from rail.core.data import PqHandle\n",
|
|
25
|
-
"from rail.core.stage import RailStage\n",
|
|
26
|
-
"\n",
|
|
27
|
-
"import matplotlib.pyplot as plt\n",
|
|
28
|
-
"import pandas as pd, numpy as np"
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"cell_type": "code",
|
|
33
|
-
"execution_count": null,
|
|
34
|
-
"id": "6912a740-31ea-4987-b06d-81ff17cd895a",
|
|
35
|
-
"metadata": {},
|
|
36
|
-
"outputs": [],
|
|
37
|
-
"source": [
|
|
38
|
-
"DS = RailStage.data_store\n",
|
|
39
|
-
"DS.__class__.allow_overwrite = True\n"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"cell_type": "markdown",
|
|
44
|
-
"id": "a282c2ed-141b-4507-8254-dc8fbc9864dc",
|
|
45
|
-
"metadata": {},
|
|
46
|
-
"source": [
|
|
47
|
-
"### Create a random catalog with ugrizy+YJHF bands as the the true input"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"cell_type": "code",
|
|
52
|
-
"execution_count": null,
|
|
53
|
-
"id": "1078bc2a-fc54-41c3-bd30-6c447bb971d4",
|
|
54
|
-
"metadata": {},
|
|
55
|
-
"outputs": [],
|
|
56
|
-
"source": [
|
|
57
|
-
"data = np.random.normal(23, 3, size = (1000,12))\n",
|
|
58
|
-
"data[:, 0] = np.random.uniform(low=0, high=0.03, size=1000)\n",
|
|
59
|
-
"data[:, 1] = np.random.uniform(low=0, high=0.03, size=1000)\n",
|
|
60
|
-
"\n",
|
|
61
|
-
"data_df = pd.DataFrame(data=data, # values\n",
|
|
62
|
-
" columns=['ra', 'dec', 'u', 'g', 'r', 'i', 'z', 'y', 'Y', 'J', 'H', 'F'])\n",
|
|
63
|
-
"\n",
|
|
64
|
-
"data_truth = DS.add_data('input', data_df, PqHandle)"
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"cell_type": "code",
|
|
69
|
-
"execution_count": null,
|
|
70
|
-
"id": "33c99a4d-8375-4003-9a9a-70fa85a3eb82",
|
|
71
|
-
"metadata": {},
|
|
72
|
-
"outputs": [],
|
|
73
|
-
"source": [
|
|
74
|
-
"#data_df.to_parquet('bl_test.pq')"
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"cell_type": "code",
|
|
79
|
-
"execution_count": null,
|
|
80
|
-
"id": "a5636721-a734-4746-bd93-8101bc558b6e",
|
|
81
|
-
"metadata": {},
|
|
82
|
-
"outputs": [],
|
|
83
|
-
"source": [
|
|
84
|
-
"plt.scatter(data_truth.data['ra'], data_truth.data['dec'], s=5)\n",
|
|
85
|
-
"plt.xlabel(\"Ra [Deg]\", fontsize=14)\n",
|
|
86
|
-
"plt.ylabel(\"Dec [Deg]\", fontsize=14)\n",
|
|
87
|
-
"plt.show()\n"
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"cell_type": "markdown",
|
|
92
|
-
"id": "1da27deb-d167-4f38-8c59-f270184d6ab3",
|
|
93
|
-
"metadata": {},
|
|
94
|
-
"source": [
|
|
95
|
-
"### The blending model"
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"cell_type": "code",
|
|
100
|
-
"execution_count": null,
|
|
101
|
-
"id": "a07f72a0-e24c-4844-90f0-d5a49ac4362b",
|
|
102
|
-
"metadata": {},
|
|
103
|
-
"outputs": [],
|
|
104
|
-
"source": [
|
|
105
|
-
"## radius cut is in arcsecs\n",
|
|
106
|
-
"blModel = UnrecBlModel.make_stage(name='unrec_bl_model', ra_label='ra', dec_label='dec', linking_lengths=1.0, \\\n",
|
|
107
|
-
" bands='ugrizyYJHF')\n",
|
|
108
|
-
"blModel.get_config_dict()\n"
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"cell_type": "code",
|
|
113
|
-
"execution_count": null,
|
|
114
|
-
"id": "e5f4862a-0621-46d4-8901-7e84b461c424",
|
|
115
|
-
"metadata": {},
|
|
116
|
-
"outputs": [],
|
|
117
|
-
"source": [
|
|
118
|
-
"samples_w_bl = blModel(data_truth)\n",
|
|
119
|
-
"samples_w_bl()\n"
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"cell_type": "code",
|
|
124
|
-
"execution_count": null,
|
|
125
|
-
"id": "bc5158dd-f474-4731-b847-b4a7358656b9",
|
|
126
|
-
"metadata": {},
|
|
127
|
-
"outputs": [],
|
|
128
|
-
"source": [
|
|
129
|
-
"fig, ax = plt.subplots(figsize=(6, 5), dpi=100)\n",
|
|
130
|
-
"\n",
|
|
131
|
-
"ax.scatter(data_truth.data['ra'], data_truth.data['dec'], s=10, facecolors='none', edgecolors='b', label='Original')\n",
|
|
132
|
-
"ax.scatter(samples_w_bl.data['ra'], samples_w_bl.data['dec'], s=5, c='r', label='w. Unrec-BL')\n",
|
|
133
|
-
"\n",
|
|
134
|
-
"ax.legend(loc=2, fontsize=12)\n",
|
|
135
|
-
"ax.set_xlabel(\"Ra [Deg]\", fontsize=14)\n",
|
|
136
|
-
"ax.set_ylabel(\"Dec [Deg]\", fontsize=14)\n",
|
|
137
|
-
"\n",
|
|
138
|
-
"plt.show()\n"
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"cell_type": "code",
|
|
143
|
-
"execution_count": null,
|
|
144
|
-
"id": "268b3d37-b7fd-4ac1-8457-2104a87c9e6d",
|
|
145
|
-
"metadata": {},
|
|
146
|
-
"outputs": [],
|
|
147
|
-
"source": [
|
|
148
|
-
"b = 'r'\n",
|
|
149
|
-
"plt.hist(data_truth.data[b], bins=np.linspace(10, 30, 20), label='Original')\n",
|
|
150
|
-
"plt.hist(samples_w_bl.data[b], bins=np.linspace(10, 30, 20), fill=False, label='w. Unrec-BL')\n",
|
|
151
|
-
"\n",
|
|
152
|
-
"plt.xlabel(fr'Magnitude ${b}$', fontsize=14)\n",
|
|
153
|
-
"plt.legend(fontsize=12)\n",
|
|
154
|
-
"plt.show()\n"
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"cell_type": "code",
|
|
159
|
-
"execution_count": null,
|
|
160
|
-
"id": "a1d51c15-1e04-4b22-9abb-9b267965dbeb",
|
|
161
|
-
"metadata": {},
|
|
162
|
-
"outputs": [],
|
|
163
|
-
"source": [
|
|
164
|
-
"flux = 10**(-(data_truth.data[b]-28.10)/2.5) # r band zp for lsst is 28.10\n",
|
|
165
|
-
"flux_bl = 10**(-(samples_w_bl.data[b]-28.10)/2.5)\n",
|
|
166
|
-
"\n",
|
|
167
|
-
"plt.hist(flux, bins=np.linspace(0, 10000, 40), label='Original')\n",
|
|
168
|
-
"plt.hist(flux_bl, bins=np.linspace(0, 10000, 40), fill=False, label='w. Unrec-BL')\n",
|
|
169
|
-
"\n",
|
|
170
|
-
"plt.xlabel(fr'Flux ${b}$', fontsize=14)\n",
|
|
171
|
-
"plt.yscale('log')\n",
|
|
172
|
-
"plt.legend(fontsize=12)\n",
|
|
173
|
-
"plt.show()\n"
|
|
174
|
-
]
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"cell_type": "code",
|
|
178
|
-
"execution_count": null,
|
|
179
|
-
"id": "da2b37c8-4667-4ad2-ad09-b1c68d2612b8",
|
|
180
|
-
"metadata": {},
|
|
181
|
-
"outputs": [],
|
|
182
|
-
"source": []
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
"metadata": {
|
|
186
|
-
"kernelspec": {
|
|
187
|
-
"display_name": "Python 3 (ipykernel)",
|
|
188
|
-
"language": "python",
|
|
189
|
-
"name": "python3"
|
|
190
|
-
},
|
|
191
|
-
"language_info": {
|
|
192
|
-
"codemirror_mode": {
|
|
193
|
-
"name": "ipython",
|
|
194
|
-
"version": 3
|
|
195
|
-
},
|
|
196
|
-
"file_extension": ".py",
|
|
197
|
-
"mimetype": "text/x-python",
|
|
198
|
-
"name": "python",
|
|
199
|
-
"nbconvert_exporter": "python",
|
|
200
|
-
"pygments_lexer": "ipython3",
|
|
201
|
-
"version": "3.12.3"
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
"nbformat": 4,
|
|
205
|
-
"nbformat_minor": 5
|
|
206
|
-
}
|
|
File without changes
|
{pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/ISSUE_TEMPLATE/0-general_issue.md
RENAMED
|
File without changes
|
{pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.github/ISSUE_TEMPLATE/1-bug_report.md
RENAMED
|
File without changes
|
{pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.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.0.5 → pz_rail_astro_tools-1.0.6}/.github/workflows/publish-to-pypi.yml
RENAMED
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/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
|
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/src/rail/pipelines/degradation/blending.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/tests/astro_tools/gcr_test_data/schema.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pz_rail_astro_tools-1.0.5 → pz_rail_astro_tools-1.0.6}/tests/astro_tools/test_gcr_engine.py
RENAMED
|
File without changes
|
|
File without changes
|