diff --git a/lc_classifier/lc_classifier/features/extractors/tde_extractor.py b/lc_classifier/lc_classifier/features/extractors/tde_extractor.py index 70d476233..e7d3168af 100644 --- a/lc_classifier/lc_classifier/features/extractors/tde_extractor.py +++ b/lc_classifier/lc_classifier/features/extractors/tde_extractor.py @@ -128,7 +128,7 @@ def fleet_model_jax(t, a, w, m_0, t0): class FleetExtractor(FeatureExtractor): - version = "1.0.1" + version = "1.0.2" unit = "diff_flux" def __init__(self, bands: List[str]): @@ -180,6 +180,7 @@ def compute_features_single_object(self, astro_object: AstroObject): sigma=y_err, p0=[0.6, -0.05, np.mean(y), 0], bounds=([0.0, -100.0, 0, -50], [10, 0, 30, 10000]), + max_nfev=800, # twice default value ) model_prediction = fleet_model( diff --git a/lc_classifier/lc_classifier/features/extractors/ulens_extractor.py b/lc_classifier/lc_classifier/features/extractors/ulens_extractor.py index 92802d82d..2864cee0c 100644 --- a/lc_classifier/lc_classifier/features/extractors/ulens_extractor.py +++ b/lc_classifier/lc_classifier/features/extractors/ulens_extractor.py @@ -39,7 +39,7 @@ def ulens_model_jax(t, u0, tE, fs, t0, mag_0): class MicroLensExtractor(FeatureExtractor): - version = "1.0.1" + version = "1.0.2" unit = "magnitude" def __init__(self, bands: List[str]): @@ -88,6 +88,7 @@ def compute_features_single_object(self, astro_object: AstroObject): [0, 0, 0, -np.inf, -np.inf], [np.inf, np.inf, 1, np.inf, np.inf], ), + max_nfev=1000, # twice default value ) model_prediction = ulens_model(band_observations["mjd"], *parameters) diff --git a/training/lc_classifier_ztf/feature_computation/dataset.py b/training/lc_classifier_ztf/feature_computation/dataset.py index 32c8f7dcf..d5a1899d7 100644 --- a/training/lc_classifier_ztf/feature_computation/dataset.py +++ b/training/lc_classifier_ztf/feature_computation/dataset.py @@ -21,7 +21,10 @@ def create_astro_object(lc_df: pd.DataFrame, object_info: pd.Series) -> AstroObj inplace=True) lc_df["fid"] = lc_df["fid"].map({1: "g", 2: "r", 3: "i"}) - lc_df = lc_df[lc_df["fid"].isin(["g", "r"])] + lc_df["procstatus"] = lc_df["procstatus"].astype(str) + + lc_df = lc_df[lc_df["fid"].isin(["g", "r"]) \ + & (lc_df["procstatus"] == "0")] if len(lc_df[lc_df["detected"]]) == 0: raise NoDetections() @@ -99,13 +102,13 @@ def create_astro_object(lc_df: pd.DataFrame, object_info: pd.Series) -> AstroObj if __name__ == "__main__": # Build AstroObjects - data_dir = "data_241015" + data_dir = "data_241209" data_out = data_dir + "_ao" lightcurve_filenames = os.listdir(data_dir) lightcurve_filenames = [f for f in lightcurve_filenames if "lightcurves_batch" in f] object_df = pd.read_parquet( - os.path.join(data_dir, "objects_with_wise_20241016.parquet") + os.path.join(data_dir, "objects_with_wise_20241209.parquet") ) object_df.set_index("oid", inplace=True)