Skip to content

Commit 547d1e9

Browse files
committed
a few more fixes related to inhomogenous arrays issue, test suite passing locally
1 parent 3eeab91 commit 547d1e9

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

ares/populations/GalaxyCohort.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2492,11 +2492,11 @@ def _SAM_1z(self, z, y):
24922492
if not self.pf['pop_star_formation']:
24932493
fstar = SFR = 0.0
24942494
elif self.pf['pop_sfr'] is None:
2495-
fstar = self.SFE(**kw)
2495+
fstar = float(self.get_sfe(z=z, Mh=Mh))
24962496
SFR = PIR * fstar
24972497
else:
24982498
fstar = 1e-10
2499-
SFR = self.sfr(**kw) * dtdz
2499+
SFR = self.get_sfr(z=z, Mh=Mh) * dtdz
25002500

25012501
# "Quiet" mass growth
25022502
fsmooth = self.fsmooth(**kw)

ares/populations/GalaxyEnsemble.py

-2
Original file line numberDiff line numberDiff line change
@@ -1979,8 +1979,6 @@ def _cache_L(self, key):
19791979
if not hasattr(self, '_cache_L_'):
19801980
self._cache_L_ = {}
19811981

1982-
1983-
print('hey', key in self._cache_L_, key, self._cache_L_.keys())
19841982
if key in self._cache_L_:
19851983
return self._cache_L_[key]
19861984

tests/test_static_phot_synth.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def test(tol=0.25):
115115
"These should all be identical! z={}".format(z)
116116

117117
results = [mag_from_spec, mag_from_flux, mag_from_lum,
118-
mag_from_spec_20, mag_from_spec_50, mag_from_spec_100,
119-
mag_from_phot_mean, mag_from_phot_close, mag_from_phot_interp]
118+
mag_from_spec_20[0], mag_from_spec_50[0], mag_from_spec_100[0],
119+
mag_from_phot_mean, mag_from_phot_close[0], mag_from_phot_interp[0]]
120120

121121
assert np.all(np.abs(np.diff(results)) < tol), \
122122
"Error in magnitudes! z={}".format(z)

0 commit comments

Comments
 (0)