Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baryons instance requires cosmo when accessed through the cosmology object #1223

Open
carlosggarcia opened this issue Feb 12, 2025 · 0 comments

Comments

@carlosggarcia
Copy link
Contributor

If you do

baryons = ccl.baryons.BaryonsSchneider15()
cosmo = ccl.CosmologyVanillaLCDM(baryonic_effects=baryons)
cosmo.baryons.boost_factor([0.1], [1])

it fails with

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[38], line 1
----> 1 cosmo2.baryons.boost_factor([0.1], [1])

TypeError: BaryonsSchneider15.boost_factor() missing 1 required positional argument: 'a'

because it expects cosmo2.baryons.boost_factor(cosmo, [0.1], [1]).

Ideally, if you access the Baryons object through cosmo, you shouldn't need to pass it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant