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

[BUG] lightcone.lightcone_redshifts error #393

Open
JasperSolt opened this issue May 21, 2024 · 2 comments
Open

[BUG] lightcone.lightcone_redshifts error #393

JasperSolt opened this issue May 21, 2024 · 2 comments
Labels

Comments

@JasperSolt
Copy link

JasperSolt commented May 21, 2024

When I run the following code in the v4-prep branch:

lc = p21c.outputs.LightCone.read(fname, lc_path)
print(lc.lightcone_redshifts)

I get an error. This is because internally, when calling z_at_value, it is written like this:

z_at_value(self.cosmo_params.cosmo.comoving_distance, d)

An easy fix is to rewrite it as this:

f = lambda x: self.cosmo_params.cosmo.comoving_distance(x).value
z_at_value(f, d)

Just wanted to bring this to your attention.

@JasperSolt JasperSolt added the bug label May 21, 2024
@steven-murray
Copy link
Member

I think this was just fixed in #392 -- can you try it?

@JasperSolt
Copy link
Author

I've tried it and now I have an entirely different issue where I can't open my lightcones at all, I'll open a new issue for clarity

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

No branches or pull requests

2 participants