When convolving with a small kernel in the robust method the current NaN masking is producing some images full of NaNs!
The tricky bit here is that we're casting bools to floats when convolving the NaN mask. We can't just use mask_conv==0 since the area we want is full of floats. The current method to recast float to bool is:
mask_conv = ~np.isclose(mask_conv, 0)
I'll probably need to tweak the tolerance to make this more robust to this kind of numerical error.
When convolving with a small kernel in the robust method the current NaN masking is producing some images full of NaNs!
The tricky bit here is that we're casting bools to floats when convolving the NaN mask. We can't just use
mask_conv==0
since the area we want is full of floats. The current method to recast float to bool is:I'll probably need to tweak the tolerance to make this more robust to this kind of numerical error.