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
maskin place givenweights. mask values where weights are zero or non-finite will be set toFalse, and the total number ofTruevalues 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
Truemask values following the update.