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

The cbc or power spectrum is not working properly due to an issue with the interpolate function #7

Open
DQuanR2 opened this issue Sep 28, 2022 · 0 comments

Comments

@DQuanR2
Copy link

DQuanR2 commented Sep 28, 2022

Hi, I found an issue when running the code from the examples e.g.,
python example.py -n 32 34 32 -l 0.565 0.6 0.565, this would call the cbc-spectrum as a default.
This crashes with a
ValueError: A value in x_new is below the interpolation range. given by the "scipy" function "interpolate".

This can be solved by adding the flag fill_value = "extrapolate" in the interp1d function:
self.especf = interpolate.interp1d(kcbc, ecbc,'cubic', fill_value="extrapolate")

Note:
I am unaware of the physical implication this might have.

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