Skip to content

Commit eca944e

Browse files
author
Etienne Russeil
committed
Fixed positive K-correction
1 parent 58e832a commit eca944e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fink_science/ztf/superluminous/slsn_classifier.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ def abs_peak(app_peak, lambda_angstrom, z, zerr, ebv):
134134
Examples
135135
--------
136136
>>> abs_peak(19, 4000, 0.2, 0.05, 0.1)
137-
array([-20.62290051, -21.26637279, -21.76731053])
137+
array([-20.92638971, -21.66227902, -22.25186059])
138138
>>> abs_peak(19, 4000, 0.2, 0.05, -1)
139-
array([-20.18163613, -20.8251084 , -21.32604614])
139+
array([-20.48512533, -21.22101463, -21.81059621])
140140
>>> abs_peak(19, 4000, 0.2, np.nan, 0.1)
141141
array([ nan, nan, nan])
142142
>>> abs_peak(19, 4000, np.nan, 0.05, 0.1)
143143
array([ nan, nan, nan])
144144
>>> abs_peak([18, 18], [4400, 6600], 0.12, 0.01, 0.5)
145-
array([-22.52065879, -22.71399318, -22.89208381])
145+
array([-22.74727368, -22.96008329, -23.15747603])
146146
"""
147147
# In case the user gives a single value instead of a list
148148
app_peak_is_num = (type(app_peak) is float) | (type(app_peak) is int)
@@ -171,7 +171,7 @@ def abs_peak(app_peak, lambda_angstrom, z, zerr, ebv):
171171
M = (
172172
app_peak[band]
173173
- 5 * np.log10(D_L / 10)
174-
+ 2.5 * np.log10(1 + effective_z)
174+
- 2.5 * np.log10(1 + effective_z)
175175
- compute_milky_way_extinction(ebv, lambda_angstrom[band])
176176
)
177177
Ms.append(M)

0 commit comments

Comments
 (0)