Skip to content

Commit

Permalink
edit mbh preset model
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Gilman committed Jan 18, 2025
1 parent 735e858 commit 53e5a9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion pyHalo/Halos/halo_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ def c(self):
"""
Computes the halo concentration (once)
"""

raise Exception('this class does not have a well-defined concentration parameter')

@property
Expand Down
7 changes: 4 additions & 3 deletions pyHalo/PresetModels/mbh.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pyHalo.PresetModels.cdm import CDM
from pyHalo.realization_extensions import RealizationExtensions


def CDM_plus_BH(z_lens,
z_source,
log10_mass_ratio,
Expand Down Expand Up @@ -48,8 +47,7 @@ def CDM_plus_BH(z_lens,

cdm = CDM(z_lens, z_source, sigma_sub, log_mlow, log_mhigh,
log10_sigma_sub, shmf_log_slope=shmf_log_slope, cone_opening_angle_arcsec=cone_opening_angle_arcsec,
log_m_host=log_m_host, LOS_normalization=LOS_normalization, geometry_type=geometry_type,
add_globular_clusters=add_globular_clusters, kwargs_globular_clusters=kwargs_globular_clusters)
log_m_host=log_m_host, LOS_normalization=LOS_normalization, geometry_type=geometry_type)
ext = RealizationExtensions(cdm)
mbh = ext.add_black_holes(log10_mass_ratio,
10**log10_occupation_frac,
Expand All @@ -59,4 +57,7 @@ def CDM_plus_BH(z_lens,
log10_mass_maximum,
LOS_normalization)
realization = cdm.join(mbh)
if add_globular_clusters:
ext = RealizationExtensions(realization)
realization = ext.add_globular_clusters(**kwargs_globular_clusters)
return realization
1 change: 0 additions & 1 deletion tests/test_preset_models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from pyHalo.PresetModels.cdm import CDM, CDMCorrelatedStructure
from pyHalo.PresetModels.wdm import WDM, WDM_mixed
from pyHalo.PresetModels.mbh import CDM_plus_BH
from pyHalo.PresetModels.sidm import SIDM_core_collapse, SIDM_parametric
from pyHalo.PresetModels.uldm import ULDM
from pyHalo.preset_models import preset_model_from_name
Expand Down

0 comments on commit 53e5a9e

Please sign in to comment.