From db7b81dc12bdb7e9cfc46ebf39d32bc524f69f25 Mon Sep 17 00:00:00 2001 From: Cayenne Matt <59581529+CayenneMatt@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:01:58 -0400 Subject: [PATCH 1/4] Update host_relations.py Add evolution to MMBulge slope (power law) --- holodeck/host_relations.py | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/holodeck/host_relations.py b/holodeck/host_relations.py index 0c4d97f8..e8bd1155 100644 --- a/holodeck/host_relations.py +++ b/holodeck/host_relations.py @@ -803,8 +803,9 @@ class MMBulge_Redshift(MMBulge_Standard): """Mbh-Mbulge relation with an additional redshift power-law dependence. Provides black hole mass as a function of galaxy bulge mass and redshift with a normalization - that depends on redshift. ``zplaw=0`` (default) is identical to MMBulge_Standard. - ``mamp = mamp0 * (1 + z)**zplaw``. + that depends on redshift. ``zplaw_amp=0``, ``zplaw_slope=0`` (default) is identical to MMBulge_Standard. + ``mamp = mamp0 * (1 + z)**zplaw_amp``. + ``mplaw = mplaw0 * (1 + z)**zplaw_slope``. TODO: make sure all of the inherited methods from `MMBulge_Standard` are appropriate for redshift dependencies!! In particular, check `dmstar_dmbh` @@ -817,17 +818,21 @@ class MMBulge_Redshift(MMBulge_Standard): MASS_PLAW = 1.0 MASS_REF = 1.0e11 * MSOL SCATTER_DEX = 0.0 - Z_PLAW = 0.0 + Z_PLAW_AMP = 0.0 + Z_PLAW_SLOPE = 0.0 _PROPERTIES = ['mbulge', 'redz'] - def __init__(self, *args, zplaw=None, **kwargs): + def __init__(self, *args, zplaw_amp=None, zplaw_slope=None, **kwargs): super().__init__(*args, **kwargs) - if zplaw is None: - zplaw = self.Z_PLAW + if zplaw_amp is None: + zplaw_amp = self.Z_PLAW_AMP + if zplaw_slope is None: + zplaw_slope = self.Z_PLAW_SLOPE - self._zplaw = zplaw + self._zplaw_amp = zplaw_amp + self._zplaw_slope = zplaw_slope return def mbh_from_host(self, pop, scatter): @@ -844,14 +849,16 @@ def mbh_from_mbulge(self, mbulge, redz, scatter): redz = np.broadcast_to(redz, mbulge.T.shape).T except: redz = redz - zmamp = self._mamp * (1.0 + redz)**self._zplaw - mbh = _log10_relation(mbulge, zmamp, self._mplaw, scatter_dex, x0=self._mref) + zmamp = self._mamp * (1.0 + redz)**self._zplaw_amp + zmplaw = self._mplaw * (1.0 + redz)**self._zplaw_slope + mbh = _log10_relation(mbulge, zmamp, zmplaw, scatter_dex, x0=self._mref) return mbh def mbulge_from_mbh(self, mbh, redz, scatter): scatter_dex = self._scatter_dex if scatter else None - zmamp = self._mamp * (1.0 + redz)**self._zplaw - mbulge = _log10_relation_reverse(mbh, zmamp, self._mplaw, scatter_dex, x0=self._mref) + zmamp = self._mamp * (1.0 + redz)**self._zplaw_amp + zmplaw = self._mplaw * (1.0 + redz)**self._zplaw_slope + mbulge = _log10_relation_reverse(mbh, zmamp, zmplaw, scatter_dex, x0=self._mref) return mbulge @@ -867,7 +874,8 @@ class MMBulge_Redshift_MM2013(MMBulge_Redshift): MASS_REF = MSOL * 1e11 # 1e11 Msol MASS_PLAW = 1.05 # 1.05 ± 0.11 SCATTER_DEX = 0.34 - Z_PLAW = 0.0 + Z_PLAW_AMP = 0.0 + Z_PLAW_SLOPE = 0.0 class MMBulge_Redshift_KH2013(MMBulge_Redshift): @@ -882,7 +890,8 @@ class MMBulge_Redshift_KH2013(MMBulge_Redshift): MASS_REF = MSOL * 1e11 # 1e11 Msol MASS_PLAW = 1.17 # 1.17 ± 0.08 SCATTER_DEX = 0.28 - Z_PLAW = 0.0 + Z_PLAW_AMP = 0.0 + Z_PLAW_SLOPE = 0.0 def get_mmbulge_relation(mmbulge: Union[_MMBulge_Relation, Type[_MMBulge_Relation]] = None) -> _MMBulge_Relation: From c1cfe856eacbdcc9ab00ae890d8092cd66e695b2 Mon Sep 17 00:00:00 2001 From: Cayenne Matt <59581529+CayenneMatt@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:05:52 -0400 Subject: [PATCH 2/4] Update sam.py Added evolution to MMBulge slope (power law) --- holodeck/sams/sam.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/holodeck/sams/sam.py b/holodeck/sams/sam.py index f8761dbc..b68106e5 100644 --- a/holodeck/sams/sam.py +++ b/holodeck/sams/sam.py @@ -352,7 +352,7 @@ def static_binary_density(self): # so far we have ``dn_gal / [dlog10(M_gal) dq_gal dz]`` # dn / [dM dq dz] = (dn_gal / [dM_gal dq_gal dz]) * (dM_gal/dM_bh) * (dq_gal / dq_bh) - mplaw = self._mmbulge._mplaw + mplaw = self._mmbulge._mplaw * (1.0 + redz)**self._mmbulge._zplaw_slope dqbh_dqgal = mplaw * np.power(mstar_rat, mplaw - 1.0) # (dMstar-pri / dMbh-pri) * (dMbh-pri/dMbh-tot) = (dMstar-pri / dMstar-tot) * (dMstar-tot/dMbh-tot) # ==> (dMstar-tot/dMbh-tot) = (dMstar-pri / dMbh-pri) * (dMbh-pri/dMbh-tot) / (dMstar-pri / dMstar-tot) @@ -1086,7 +1086,7 @@ def _ndens_mbh(self, mass_gal, mrat_gal, redz): # this is d^3 n / [dlog10(M_gal-pri) dq_gal dz] nd_gal = self._ndens_gal(mass_gal, mrat_gal, redz) - mplaw = self._mmbulge._mplaw + mplaw = self._mmbulge._mplaw * (1.0 + redz)**self._mmbulge._zplaw_slope dqbh_dqgal = mplaw * np.power(mrat_gal, mplaw - 1.0) dmstar_dmbh__pri = self._mmbulge.dmstar_dmbh(mass_gal) # [unitless] From a139ae6af9728221718e43b30d3a74271928d768 Mon Sep 17 00:00:00 2001 From: Cayenne Matt <59581529+CayenneMatt@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:18:39 -0400 Subject: [PATCH 3/4] Update host_relations.py Added zplaw_amp and zplaw_slope attributes to the non-evolving relations for use in sam.py. They are set to zero (no evolution). --- holodeck/host_relations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/holodeck/host_relations.py b/holodeck/host_relations.py index e8bd1155..ef2b0c12 100644 --- a/holodeck/host_relations.py +++ b/holodeck/host_relations.py @@ -699,6 +699,8 @@ def __init__( self._mplaw = mplaw #: Mass Power-law index self._mref = mref #: Reference Mass (argument normalization) self._scatter_dex = scatter_dex + self._zplaw_amp = 0.0 #: Mass-Amplitude evolution parameter (0 for no evolution) + self._zplaw_slope = 0.0 #: Mass Power-law index (0 for no evolution) if len(kwargs) > 0: warn = f"Unused parameters passed to {self}! {kwargs=}" From 148021392dc764e5b9949fca08061bf35ce56dca Mon Sep 17 00:00:00 2001 From: Cayenne Matt <59581529+CayenneMatt@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:52:14 -0400 Subject: [PATCH 4/4] Update host_relations.py Added comment about negative slope evolution --- holodeck/host_relations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/holodeck/host_relations.py b/holodeck/host_relations.py index ef2b0c12..f044edd1 100644 --- a/holodeck/host_relations.py +++ b/holodeck/host_relations.py @@ -808,6 +808,8 @@ class MMBulge_Redshift(MMBulge_Standard): that depends on redshift. ``zplaw_amp=0``, ``zplaw_slope=0`` (default) is identical to MMBulge_Standard. ``mamp = mamp0 * (1 + z)**zplaw_amp``. ``mplaw = mplaw0 * (1 + z)**zplaw_slope``. + Amplitude evolution can be positive, negative, or zero. + Slope evolution can be positive or zero only for the time being. TODO: make sure all of the inherited methods from `MMBulge_Standard` are appropriate for redshift dependencies!! In particular, check `dmstar_dmbh`