Skip to content

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

Description

@DQuanR2

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions