Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Gilman committed Sep 13, 2024
1 parent cc4edb8 commit 1f150f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions pyHalo/Rendering/MassFunctions/mass_function_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def draw(self):

mH = 10 ** self._logmhigh
mL = 10 ** self._logmlow

if self._draw_poisson:
ndraw = np.random.poisson(self.n_mean)
else:
Expand Down
9 changes: 3 additions & 6 deletions tests/test_rendering/test_mass_functions/test_sheth_tormen.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setup_method(self):
geometry_class = Geometry(cosmo, zlens, zsource, opening_angle, 'DOUBLE_CONE')
delta_power_law_index = -0.1
kwargs_model = {}
kwargs_model['m_pivot'] = 10.0**8
kwargs_model['m_pivot'] = 10.0 ** 8
kwargs_model['log_mlow'] = 6.0
kwargs_model['log_mhigh'] = 10.0
kwargs_model['LOS_normalization'] = 1.0
Expand Down Expand Up @@ -56,11 +56,8 @@ def setup_method(self):

def test_draw_poisson(self):

m = self.mass_function.draw()
m_poisson = self.mass_function_poisson.draw()
n1 = len(m)
n2 = len(m_poisson)
npt.assert_equal(True, n1!=n2)
npt.assert_equal(False, self.mass_function._draw_poisson)
npt.assert_equal(True, self.mass_function_poisson._draw_poisson)

def test_from_redshift(self):
mfunc = ShethTormen.from_redshift(**self._kwargs_from_redshift)
Expand Down

0 comments on commit 1f150f4

Please sign in to comment.