Skip to content

Commit

Permalink
Merge pull request #106 from sagasurvey/marlageha-imf
Browse files Browse the repository at this point in the history
Update calc_sfr.py
  • Loading branch information
yymao authored Dec 21, 2023
2 parents e5feb3b + 5248a52 commit a556e9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions SAGA/objects/calc_sfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

__all__ = ["calc_SFR_NUV", "calc_SFR_Halpha"]

# Salpeter -> Koupa IMF using Madua & Dickinson 2014 (Figure 4)
_IMF_FACTOR = 0.66


def calc_SFR_NUV(NUV_mag, NUV_mag_err, dist_mpc, internal_ext=0.9):
"""
Expand Down Expand Up @@ -32,9 +35,8 @@ def calc_SFR_NUV(NUV_mag, NUV_mag_err, dist_mpc, internal_ext=0.9):
# CONVERT TO SOLAR LUMINOSITY
l_nuv_msun = log_L_nuv - np.log10(3.826e33)

# CONVVERT TO SFR: EQ 3, inglesias- paramo 2006
# AND ACCOUNT FOR IMF
log_SFR_NUV = l_nuv_msun - 9.33 - np.log10(1.5)
# CONVVERT TO SFR: EQ 3, inglesias- paramo 2006, also account for Salpeter -> Koupa IMF
log_SFR_NUV = l_nuv_msun - 9.33 + np.log10(_IMF_FACTOR)
log_SFR_NUV_err = log_flux_nuv_err

return log_SFR_NUV, log_SFR_NUV_err
Expand All @@ -59,10 +61,9 @@ def calc_SFR_Halpha(EW_Halpha, EW_Halpha_err, spec_z, Mr, EWc=2.5, BD=3.25):
L_Halpha = term1 * term2 * term3
L_Halpha_err = term1_err * term2 * term3

# EQ 3, Bauer et al above
# Account for IMF
SFR = L_Halpha / (1.27e34 * 1.5)
SFR_err = L_Halpha_err / (1.27e34 * 1.5)
# EQ 3, Bauer et al above, also account for Salpeter -> Koupa IMF
SFR = (L_Halpha * _IMF_FACTOR) / 1.27e34
SFR_err = (L_Halpha_err * _IMF_FACTOR) / 1.27e34

log_Ha_SFR = np.log10(SFR)

Expand Down
2 changes: 1 addition & 1 deletion SAGA/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
SAGA package version
"""
__version__ = "0.68.2"
__version__ = "0.68.3"

0 comments on commit a556e9b

Please sign in to comment.