From 6bd55688ee12f6fb443913d611a6566b3bc91e4a Mon Sep 17 00:00:00 2001 From: Alex Alarcon Date: Mon, 4 May 2026 14:47:05 +0200 Subject: [PATCH] Correcting the units of mass of halo MAHs for TNG, so that the output MAHs are in Msun --- diffmah/data_loaders/load_tng_mahs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/diffmah/data_loaders/load_tng_mahs.py b/diffmah/data_loaders/load_tng_mahs.py index e8b36e8..debc351 100644 --- a/diffmah/data_loaders/load_tng_mahs.py +++ b/diffmah/data_loaders/load_tng_mahs.py @@ -1,10 +1,10 @@ -"""Module loads mass assembly history data for diffmah -""" +"""Module loads mass assembly history data for diffmah""" import numpy as np import os BEBOP_TNG = "/lcrc/project/halotools/alarcon/data/" +H_TNG = 0.6774 def load_tng_data(data_drn=BEBOP_TNG): @@ -14,5 +14,6 @@ def load_tng_data(data_drn=BEBOP_TNG): log_mahs = _halos["mpeakh"] log_mahs = np.maximum.accumulate(log_mahs, axis=1) mahs = np.where(log_mahs == 0.0, 0.0, 10**log_mahs) + mahs = mahs * (1 / H_TNG) assert mahs.max() > 1e5 return tng_t, mahs