conditionalSigmaClip#
- lsst.ts.wep.utils.conditionalSigmaClip(array, sigmaClipKwargs, stdMin=0.005)#
Apply conditional sigma clipping to an array. Note this function applies sigma clipping to each column of the input array, and replaces the column with the clipped data while maintaining masked elements as NaN. Sigma clipping is only applied if the standard deviation exceeds std_min. This function is used in the combineZernikesSigmaClipTask
- Parameters:
array (np.ndarray) – Input array to be processed.
sigma (float) – Number of standard deviations for the clipping limit.
stdMin (float) – Minimum standard deviation to apply sigma clipping.
stdFunc (str) – Function to calculate the standard deviation. Can be either “mad_std” or “std”
sigmaClipKwargs (
dict)
- Returns:
Processed array with conditional sigma clipping applied.
- Return type:
np.ndarray
- Raises:
ValueError – If stdFunc is not “mad_std” or “std”