From 3008f8185bd3659f770657e3e2c9da7dca6d787a Mon Sep 17 00:00:00 2001 From: JulienPeloton Date: Thu, 7 Dec 2023 08:14:06 +0100 Subject: [PATCH] Refactor --- fink_broker/science.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/fink_broker/science.py b/fink_broker/science.py index 43619759..78c1052c 100644 --- a/fink_broker/science.py +++ b/fink_broker/science.py @@ -505,7 +505,7 @@ def apply_science_modules_elasticc(df: DataFrame) -> DataFrame: df = df.withColumn('cats_broad_class', mapping_cats_general_expr[df['argmax']]) df = df.withColumn('cats_broad_max_prob', F.array_max(df['cbpf_preds'])) - # AGN + # AGN & SLSN args_forced = [ 'diaObject.diaObjectId', 'cmidPointTai', 'cpsFlux', 'cpsFluxErr', 'cfilterName', 'diaSource.ra', 'diaSource.decl', @@ -513,14 +513,6 @@ def apply_science_modules_elasticc(df: DataFrame) -> DataFrame: 'diaObject.hostgal_ra', 'diaObject.hostgal_dec' ] df = df.withColumn('rf_agn_vs_nonagn', agn_elasticc(*args_forced)) - - # SLSN - args_forced = [ - 'diaObject.diaObjectId', 'cmidPointTai', 'cpsFlux', 'cpsFluxErr', 'cfilterName', - 'diaSource.ra', 'diaSource.decl', - 'diaObject.hostgal_zphot', 'diaObject.hostgal_zphot_err', - 'diaObject.hostgal_ra', 'diaObject.hostgal_dec' - ] df = df.withColumn('rf_slsn_vs_nonslsn', slsn_elasticc(*args_forced)) # Drop temp columns