can handle pixels which are masked in all timestamps
@@ -488,6 +488,10 @@ class LinearInterpolationNumba(InterpolationTask):
for y_value in range(height):
for x_value in range(width):
mask1d = ~np.isnan(data[:, y_value, x_value, band])
+ if (~mask1d).all():
+ new_data = np.empty((len(resampled_times)))
+ new_data[:] = np.nan
+ else:
new_data = np.interp(resampled_times, times[mask1d], data[:, y_value, x_value, band][mask1d])
true_index = np.where(mask1d)
@@ -525,6 +529,10 @@ class LinearInterpolationNumba(InterpolationTask):
for y_value in prange(height):
for x_value in prange(width):
mask1d = ~np.isnan(data[:, y_value, x_value, band])
+ if (~mask1d).all():
+ new_data = np.empty((len(resampled_times)))
+ new_data[:] = np.nan
+ else:
new_data = np.interp(resampled_times, times[mask1d], data[:, y_value, x_value, band][mask1d])
true_index = np.where(mask1d)
