Skip to content

Commit

Permalink
Use filter for SIMBAD statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPeloton committed Jan 18, 2024
1 parent f4895df commit 9acfce6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/daily_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from fink_broker.loggingUtils import get_fink_logger, inspect_application

from fink_filters.classification import extract_fink_classification
from fink_filters.filter_simbad_candidates.filter import simbad_candidates


def main():
Expand Down Expand Up @@ -95,9 +96,10 @@ def main():
out_dic['sci'] = n_sci_alert

# matches with SIMBAD
n_simbad = df_sci.select('cdsxmatch')\
.filter(df_sci['cdsxmatch'] != 'Unknown')\
.count()
n_simbad = df_sci.withColumn(
"is_simbad",
simbad_candidates("cdsxmatch")
).filter(F.col("is_simbad")).count()

out_dic['simbad_tot'] = n_simbad

Expand Down

0 comments on commit 9acfce6

Please sign in to comment.