glidertools.cleaning.mask_bad_dive_fraction¶
-
glidertools.cleaning.
mask_bad_dive_fraction
(mask, dives, var, mask_frac=0.2)¶ Find bad dives - where more than a fraction of the dive is masked
Parameters: - mask (array, dtype=bool, shape=[n, ]) – boolean 1D array with masked values
- dives (array, dtype=float, shape=[n, ]) – discrete dive numbers (down round, up n.5)
- var (array, dtype=float, shape=[n, ]) – series or array containing data that will be masked with NaNs
- mask_frac (int=0.2) – fraction of the dive that is masked for the whole dive to be bad
Returns: - var (array, dtype=float, shape=[n, ]) – the same as the input, but has been masked
- mask_dives (array, dtype=bool) – a mask array that has full dives that are deemed “bad” masked out