Closed jrfarah closed 1 week ago
@achael if you or someone with write access could please link this PR to #192 that would be great! Thanks :)
thank you, @jrfarah!
@jrfarah are you able to look at the interp2d calls in rex.py? I will try to fix them myself later if not.
Thanks for the merge @achael ! My bad--I missed the interp2d
calls in rex.py
. I'll take a look and try to update those function calls as well! (I'll use the same branch for the PR).
Summary
scipy
has recently deprecated thescipy.interpolate.interp2d
function as of version 1.14 (see my issue here: https://github.com/achael/eht-imaging/issues/192) Instructions are given for moving to the new functions, chiefly,scipy.interpolate.RectBivariateSpline
. I implemented this inehtim
to return functionality primarily to theregrid_image
method in theImage
class, which relies oninterp2d
.Changes
Previously, interpolation in
regrid_image
was done viaThe new version of
scipy
requires we useRectBivariateSpline
, which operates a little bit differently thaninterp2d
. Also, theinterp
keyword ofregrid_image
can no longer be passed directly tointerp2d
, asRectBivariateSpline
requires the order of the interpolation to be an integer. The new code reads:Tests
I tested these changes using the following script:
This code works in the current version of
ehtim
on systems withscipy<1.14
but breaks ifscipy>=1.14
. However, with the changes, this script works in the new version ofscipy
and is also backwards compatible, so it will not break even if you do havescipy<1.14
installed.