TCDSolar / CHIMERApy

1 stars 3 forks source link

Add doc gallery and paper figure example #36

Open samaloney opened 4 weeks ago

samaloney commented 4 weeks ago
codecov[bot] commented 4 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.61%. Comparing base (07772ed) to head (b0e1fad).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #36 +/- ## =========================================== + Coverage 11.90% 97.61% +85.71% =========================================== Files 1 1 Lines 252 252 =========================================== + Hits 30 246 +216 + Misses 222 6 -216 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

samaloney commented 4 weeks ago

Never mind it was the order of the interpolation.

So the test fail is due to deprecation of interp2d but it seems the replacement RectBivarateSpline doesn't give identical results for this case 🤯

from scipy.interpolate import RectBivariateSpline

data = fits.getdata(im171[0], ext=0) / (heda["EXPTIME"])
dn = scipy.interpolate.interp2d(x, x, data)
data_old = scipy.interpolate.interp2d(x, x, data)
rbs = RectBivariateSpline(x, x, data)
data_new = rbs(np.arange(0, 4096), np.arange(0, 4096))

(data_old - data_new).min()
# -866.2201822671041
(data_old - data_new).max()
# 394.46359265847195

plt.imshow(data_old - data_new)

image