icecube / flarestack

Unbinned likelihood analysis code for astroparticle physics datasets
https://flarestack.readthedocs.io/en/latest/?badge=latest
MIT License
8 stars 7 forks source link

Deprecation of `scipy.interpolate.interp2d` #270

Open mlincett opened 1 year ago

mlincett commented 1 year ago

From current unit testing output:

DeprecationWarning: `interp2d` is deprecated!
`interp2d` is deprecated in SciPy 1.10 and will be removed in SciPy 1.12.0.
For legacy code, nearly bug-for-bug compatible replacements are
`RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
scattered 2D data.
In new code, for regular grids use `RegularGridInterpolator` instead.
For scattered data, prefer `LinearNDInterpolator` or
`CloughTocher2DInterpolator`.

Here are the occurrences:

flarestack/core/llh.py:        f = scipy.interpolate.interp2d(dec_bins, gamma_bins, acc.T, kind="linear")
flarestack/icecube_utils/reference_sensitivity.py:    sens_ref = interp2d(np.array(sindecs), np.array(gammas), np.log(sens.T))
flarestack/icecube_utils/reference_sensitivity.py:    disc_ref = interp2d(np.array(sindecs), np.array(gammas), np.log(disc.T))
flarestack/icecube_utils/reference_sensitivity.py:    sens_ref = interp2d(np.array(sindecs), np.array(gammas), np.log(sens.T))
flarestack/icecube_utils/reference_sensitivity.py:    sens_ref = interp2d(np.array(sindecs), np.array(gammas), np.log(sens.T))
flarestack/utils/percentile_SoB.py:    spline = scipy.interpolate.interp2d(x, y, np.log(ratio))