Skip to content
Snippets Groups Projects
Commit 5aec769d authored by tomrink's avatar tomrink
Browse files

add new method...

parent c0b2f13a
No related branches found
No related tags found
No related merge requests found
......@@ -1330,9 +1330,10 @@ def downscale_2x(original, smoothing=False, samples_axis_first=False):
return lr
def resample(x, y, z, x_min, x_max, y_min, y_max):
def resample(x, y, z, x_new, y_new):
z_intrp = []
for k in range(z.shape[0]):
z_k = z[k, :, :]
z_intrp.append(RectBivariateSpline(x, y, z_k, [x_min, x_max, y_min, y_max]))
f = RectBivariateSpline(x, y, z_k)
z_intrp.append(f(x_new, y_new))
return np.stack(z_intrp)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment