Spaces:
Runtime error
Runtime error
Commit
·
adcaa7a
1
Parent(s):
f237a9d
fix redsfhit cut in sample selection
Browse files- temps/archive.py +12 -5
temps/archive.py
CHANGED
@@ -54,8 +54,14 @@ class archive():
|
|
54 |
|
55 |
|
56 |
|
57 |
-
self._set_training_data(cat,
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
|
61 |
def _extract_fluxes(self,catalogue):
|
@@ -73,7 +79,9 @@ class archive():
|
|
73 |
return color,color_err
|
74 |
|
75 |
def _set_combiend_target(self, catalogue):
|
76 |
-
catalogue['target_z'] = catalogue.apply(lambda row: row['z_spec_S15']
|
|
|
|
|
77 |
|
78 |
return catalogue
|
79 |
|
@@ -206,9 +214,8 @@ class archive():
|
|
206 |
|
207 |
elif target=='L15':
|
208 |
catalogue = self._select_L15_sample(catalogue)
|
209 |
-
catalogue = catalogue[(catalogue.target_z>0.2)&(catalogue.target_z<2.6)]
|
210 |
self.target_z_test = catalogue['target_z'].values
|
211 |
-
|
212 |
|
213 |
self.cat_test=catalogue
|
214 |
|
|
|
54 |
|
55 |
|
56 |
|
57 |
+
self._set_training_data(cat,
|
58 |
+
only_zspec=only_zspec,
|
59 |
+
extinction_corr=extinction_corr,
|
60 |
+
convert_colors=convert_colors)
|
61 |
+
self._set_testing_data(cat_test,
|
62 |
+
target=target_test,
|
63 |
+
extinction_corr=extinction_corr,
|
64 |
+
convert_colors=convert_colors)
|
65 |
|
66 |
|
67 |
def _extract_fluxes(self,catalogue):
|
|
|
79 |
return color,color_err
|
80 |
|
81 |
def _set_combiend_target(self, catalogue):
|
82 |
+
catalogue['target_z'] = catalogue.apply(lambda row: row['z_spec_S15']
|
83 |
+
if row['z_spec_S15'] > 0
|
84 |
+
else row['photo_z_L15'], axis=1)
|
85 |
|
86 |
return catalogue
|
87 |
|
|
|
214 |
|
215 |
elif target=='L15':
|
216 |
catalogue = self._select_L15_sample(catalogue)
|
|
|
217 |
self.target_z_test = catalogue['target_z'].values
|
218 |
+
|
219 |
|
220 |
self.cat_test=catalogue
|
221 |
|