-
craftutils.observation.image.SigmaClip.__call__(data, axis=
None, masked=True, return_bounds=False, copy=True) Perform sigma clipping on the provided data.
Parameters¶
- dataarray-like or ~numpy.ma.MaskedArray
The data to be sigma clipped.
- axisNone or int or tuple of int, optional
The axis or axes along which to sigma clip the data. If None, then the flattened data will be used.
axisis passed to thecenfuncandstdfunc. The default is None.- maskedbool, optional
If True, then a ~numpy.ma.MaskedArray is returned, where the mask is True for clipped values. If False, then a ~numpy.ndarray is returned. The default is True.
- return_boundsbool, optional
If True, then the minimum and maximum clipping bounds are also returned.
- copybool, optional
If True, then the
dataarray will be copied. If False andmasked=True, then the returned masked array data will contain the same array as the inputdata(ifdatais a ~numpy.ndarray or ~numpy.ma.MaskedArray). If False andmasked=False, the input data is modified in-place. The default is True.
Returns¶
- resultarray-like
If
masked=True, then a ~numpy.ma.MaskedArray is returned, where the mask is True for clipped values and where the input mask was True.If
masked=False, then a ~numpy.ndarray is returned.If
return_bounds=True, then in addition to the masked array or array above, the minimum and maximum clipping bounds are returned.If
masked=Falseandaxis=None, then the output array is a flattened 1D ~numpy.ndarray where the clipped values have been removed. Ifreturn_bounds=Truethen the returned minimum and maximum thresholds are scalars.If
masked=Falseandaxisis specified, then the output ~numpy.ndarray will have the same shape as the inputdataand containnp.nanwhere values were clipped. If the inputdatawas a masked array, then the output ~numpy.ndarray will also containnp.nanwhere the input mask was True. Ifreturn_bounds=Truethen the returned minimum and maximum clipping thresholds will be be ~numpy.ndarrays.