From 941c189b8b7cdd1fdc9639edf3b59a96b3e43f5d Mon Sep 17 00:00:00 2001 From: Luke Zoltan Kelley Date: Wed, 10 Apr 2024 11:51:10 -0700 Subject: [PATCH] Update mmbulge test to use mamp_log10 (instead of deprecated mamp) --- holodeck/tests/test_host_relations__mmbulge.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/holodeck/tests/test_host_relations__mmbulge.py b/holodeck/tests/test_host_relations__mmbulge.py index afac0440..129c459e 100644 --- a/holodeck/tests/test_host_relations__mmbulge.py +++ b/holodeck/tests/test_host_relations__mmbulge.py @@ -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 @@ -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