update_mask¶
- sofia_redux.toolkit.resampling.update_mask(weights, mask)[source]¶
Updates a mask, setting False values where weights are zero or non-finite.
Utility function update a boolean
mask
in place givenweights
. mask values where weights are zero or non-finite will be set toFalse
, and the total number ofTrue
values is returned as output.- Parameters:
- weightsnumpy.ndarray (N,)
The weight values.
- masknumpy.ndarray of bool (N,)
The mask array to update in place.
- Returns:
- countsint
The number of
True
mask values following the update.