Skip to content

Commit b060760

Browse files
Use ndet>=8 in training set
1 parent d23a131 commit b060760

File tree

1 file changed

+5
-2
lines changed
  • training/lc_classifier_ztf/feature_computation

1 file changed

+5
-2
lines changed

training/lc_classifier_ztf/feature_computation/dataset.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
from tqdm import tqdm
77

88

9+
NDET_MIN = 8
10+
11+
912
class NoDetections(Exception):
1013
pass
1114

@@ -27,7 +30,7 @@ def create_astro_object(lc_df: pd.DataFrame, object_info: pd.Series) -> AstroObj
2730
& ((lc_df["procstatus"] == "0") \
2831
| (lc_df["procstatus"] == "57"))]
2932

30-
if len(lc_df[lc_df["detected"]]) < 2:
33+
if len(lc_df[lc_df["detected"]]) < NDET_MIN:
3134
raise NoDetections()
3235

3336
diff_flux = lc_df[
@@ -104,7 +107,7 @@ def create_astro_object(lc_df: pd.DataFrame, object_info: pd.Series) -> AstroObj
104107
# Build AstroObjects
105108

106109
data_dir = "data_241209"
107-
data_out = data_dir + "_ao"
110+
data_out = data_dir + "_ndetge" + str(NDET_MIN) + "_ao"
108111
lightcurve_filenames = os.listdir(data_dir)
109112
lightcurve_filenames = [f for f in lightcurve_filenames if "lightcurves_batch" in f]
110113

0 commit comments

Comments
 (0)