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

SNEWPY Warren_2020 model errors on initialization #86

Open
sgriswol opened this issue Jun 23, 2023 · 0 comments
Open

SNEWPY Warren_2020 model errors on initialization #86

sgriswol opened this issue Jun 23, 2023 · 0 comments

Comments

@sgriswol
Copy link
Collaborator

When loading Warren_2020 model in ASTERIA, an error similar to the following is produced. Thanks to @jlazar17 for finding this.
I suspect it is due to a duplicate time entry in the model file, as was the case with SNEWS2/snewpy#210.

~/IceCube/ASTERIA/python/asteria/source.py in __init__(self, model, model_params)
    37         for flavor in Flavor:
    38             t = self.model.time
--> 39             self._interp_lum.update({flavor: PchipInterpolator(t, self.model.luminosity[flavor], extrapolate=False)})
    40             self._interp_meanE.update({flavor: PchipInterpolator(t, self.model.meanE[flavor], extrapolate=False)})
    41             self._interp_pinch.update({flavor: PchipInterpolator(t, self.model.pinch[flavor], extrapolate=False)})

/opt/anaconda3/lib/python3.8/site-packages/scipy/interpolate/_cubic.py in __init__(self, x, y, axis, extrapolate)
    232     """
    233     def __init__(self, x, y, axis=0, extrapolate=None):
--> 234         x, _, y, axis, _ = prepare_input(x, y, axis)
    235         xp = x.reshape((x.shape[0],) + (1,)*(y.ndim-1))
    236         dk = self._find_derivatives(xp, y)

/opt/anaconda3/lib/python3.8/site-packages/scipy/interpolate/_cubic.py in prepare_input(x, y, axis, dydx)
     59     dx = np.diff(x)
     60     if np.any(dx <= 0):
---> 61         raise ValueError("`x` must be strictly increasing sequence.")
     62 
     63     y = np.rollaxis(y, axis)

ValueError: `x` must be strictly increasing sequence.
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