clipped_mean

sofia_redux.instruments.hawc.steps.basehawc.clipped_mean(data, mask, sigma=5.0)[source]

Compute a sigma-clipped mean of the input data.

Mean is computed along the zeroth axis. Data is assumed to have three dimensions.

Parameters:
dataarray-like of float

Input data. Must have three dimensions.

maskarray-like of int

Mask for bad values in input data. Must match data dimensions. 0 indicates good value, 1 indicates bad. Updated in place.

sigmafloat, optional

The sigma-clipping threshold.

Returns:
datameanarray-like

The mean array.

datastdarray-like

The standard deviation array.