Skip to content

Commit 87d07d0

Browse files
committed
fix sign on K correction
1 parent 325379e commit 87d07d0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/source/release-history.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Release History
33
===============
44

5+
Unreleased (2021-09-10)
6+
=======================
7+
- Fix sign on cosmological K correction
8+
59
v1.1.0 (2020-10-02)
610
===================
711
- Refactor hyperparameter optimization to make use of code in superphot.validate

superphot/extract.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ def flux_to_luminosity(row, R_filter):
6464
"""
6565
Return the flux-to-luminosity conversion factor for the transient in a given row of a data table.
6666
67+
Luminosities are per steradian (i.e., the factor of 4π is not included) for easy conversion to absolute magnitudes.
68+
69+
.. math:: \\frac{L_ν}{4π F_ν} = \\frac{D_L^2 10^{0.4 E(B-V) R}}{1+z}
70+
6771
Parameters
6872
----------
6973
row : astropy.table.row.Row
@@ -78,7 +82,7 @@ def flux_to_luminosity(row, R_filter):
7882
"""
7983
A_coeffs = row['MWEBV'] * np.array(R_filter)
8084
dist = cosmo.luminosity_distance(row['redshift']).to('dapc').value
81-
flux2lum = 10. ** (A_coeffs / 2.5) * dist ** 2. * (1. + row['redshift'])
85+
flux2lum = 10. ** (A_coeffs / 2.5) * dist ** 2. / (1. + row['redshift'])
8286
return flux2lum
8387

8488

0 commit comments

Comments
 (0)