Skip to content

Commit

Permalink
[444] Filter candidates with magnitude cut in hostless detection scie…
Browse files Browse the repository at this point in the history
…nce module
  • Loading branch information
utthishtastro committed Oct 23, 2024
1 parent cda6be8 commit 32b133c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion fink_science/hostless_detection/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"SN Ib-pec", "SN Ib/c", "SN Ibn", "SN Ic", "SN Ic-BL",
"SN Ic-pec", "SN Icn", "SN II", "SN II-pec", "SN IIb",
"SN IIL", "SN IIn", "SN IIn-pec", "SN IIP", "TDE"],
"cutout_timeframe": 45
"cutout_timeframe": 45,
"cutout_magnitude": 19.5
}
4 changes: 3 additions & 1 deletion fink_science/hostless_detection/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Transients
https://arxiv.org/abs/2404.18165
"""
import math

from line_profiler import profile
import os
Expand Down Expand Up @@ -130,7 +131,8 @@ def run_potential_hostless(
c4 = finkclass[index] in CONFIGS["finkclass"]
c5 = tnsclass[index] in CONFIGS["tnsclass"]
c6 = abs(deltat[index]) <= CONFIGS["cutout_timeframe"]
if ((c0[index] or c1[index] or c2[index] or c3[index] or c4 or c5) and c6):
c7 = sum(magpsf[index] <= CONFIGS["cutout_magnitude"]) > CONFIGS["minimum_number_of_alerts"]
if ((c0[index] or c1[index] or c2[index] or c3[index] or c4 or c5) and c6 and c7):
if number_of_alerts[index] >= CONFIGS["minimum_number_of_alerts"]:
science_stamp = cutoutScience[index]
template_stamp = cutoutTemplate[index]
Expand Down

0 comments on commit 32b133c

Please sign in to comment.