Skip to content

Commit c55937f

Browse files
erusseilEtienne Russeil
andauthored
FIX ISSUE #640 (#641)
* Removed the i band Removed the i band conversion that should never exists in ZTF * fix error on the check of per point per band * Update tests to match the fix * Update tests to match the fix * Fix hard coded min duration --------- Co-authored-by: Etienne Russeil <etru7215@localhost.localdomain>
1 parent 4c41118 commit c55937f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

fink_science/ztf/superluminous/kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
bolometric = "bazin"
2525
min_points_total = 7
2626
min_points_perband = 3
27-
min_duration = 20
27+
min_duration = 30
2828
not_sl_threshold = -19.75

fink_science/ztf/superluminous/processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def superluminous_score(
124124
# Initialise all probas to -1
125125
probas_total = np.zeros(len(objectId), dtype=float) - 1
126126
transient_mask = pdf["is_transient"]
127-
old_enough_mask = pdf["jd"] - pdf["jdstarthist"] >= 30
127+
old_enough_mask = pdf["jd"] - pdf["jdstarthist"] >= kern.min_duration
128128
mask_valid = transient_mask & old_enough_mask
129129

130130
if sum(mask_valid) == 0:

fink_science/ztf/superluminous/slsn_classifier.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,9 @@ def extract_features(data):
580580
581581
# Only the fake alert should pass the cuts
582582
>>> np.testing.assert_equal(
583-
... np.array(np.sum(full_features.iloc[:30].isnull(), axis=1)),
584-
... np.array([ 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0,
585-
... 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 29, 29, 0, 29, 29, 29, 29]))
583+
... np.array(np.sum(full_features.iloc[-30:].isnull(), axis=1)),
584+
... np.array([ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
585+
... 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0]))
586586
587587
>>> list(full_features.columns) == ["distnr", "ra", "dec", "ebv", "duration",
588588
... "flux_amplitude", "kurtosis", "max_slope", "skew", "peak_mag", "std_flux", "q15",

0 commit comments

Comments
 (0)