You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A way to improve the current mask is to change the order of operations. As of now, we uses the mask of ones and NaN and interpolate the mask to match the dimensions of the target OutputVar. This is not a good method because the mask needs to be stored as Float64 (due to the NaN), which limits the resolution of the mask. Furthermore, by having NaN, the NaN poisons the computation when interpolating which results in NaN near the borders.
Another approach for this is to do the following:
Do not modify the mask, so that it is still 0s and 1s.
Interpolate to make a mask with the right dimensions (may need to cast the values of the mask to a type that can represent values between 0 and 1)
Replace the 0 and 1 with the appropriate values such as NaN.
Use broadcasting to multiply the data and create the masked OutputVar.
Similar to this issue, it would be nice to have mask-aware interpolation for masking
OutputVar
s and plotting.The text was updated successfully, but these errors were encountered: