Skip to content

Commit

Permalink
Update mmbulge test to use mamp_log10 (instead of deprecated mamp)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzkelley committed Apr 10, 2024
1 parent 757564a commit 941c189
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion holodeck/tests/test_host_relations__mmbulge.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,14 @@ def mbh_from_mbulge_KH2013(mbulge):
"""This is a manually-coded version of the TRUE [KH2013]_ relation to use for comparisons."""

# [KH2013] Eq. 10
AMP = 0.49 * (1e9 * MSOL)
# AMP = 0.49 * (1e9 * MSOL)
AMP_LOG10 = 8.69
PLAW = 1.17
# EPS = 0.28
X0 = 1e11 * MSOL

AMP = (10.0 ** AMP_LOG10) * MSOL

def func_KH2013(xx):
yy = AMP * np.power(xx/X0, PLAW)
return yy
Expand All @@ -209,9 +212,11 @@ class host:
vals = mmbulge_relation.mbh_from_host(host, scatter=False)
truth = truth_func(host.mbulge)

err = (vals - truth) / truth
print(f"mbulge [grams] = {host.mbulge}")
print(f"vals = {vals}")
print(f"truth = {truth}")
print(f"errors = {err}")
assert np.allclose(vals, truth)

# mbh ==> mbulge
Expand Down

0 comments on commit 941c189

Please sign in to comment.