Skip to main content

SigClip

SigClip(
    sigma=(3.0, 3.0),
    maxiters=5,
    cenfunc='median',
    clip_cen=None,
    stdfunc='std',
    ddof=0,
    nkeep=0,
    maxrej=None,
    revert_on_nkeep=False,
    grow=None,
)

Reusable, immutable settings for axis-0 sigma clipping.

Parameters

sigma : float or (float, float) = (3.0, 3.0)

Lower/upper thresholds; default (3.0, 3.0).

maxiters : int = 5

Maximum attempted passes; default 5.

cenfunc : str = 'median'

Rejection center: "median" (default), "lmedian", or "mean".

clip_cen : str or None = None

Dispersion center; None follows cenfunc.

stdfunc : str = 'std'

"std" (default) or scaled "mad".

ddof : int = 0

Degrees of freedom for standard deviation; default 0.

nkeep : int = 0

Survivor rollback minimum; default 0.

maxrej : int or None = None

Maximum total exclusions before rollback; default None (unlimited).

revert_on_nkeep : bool = False

Enable survivor rollback; default False.

grow : float or None = None

Euclidean mask-growth radius within each plane; default None.

Notes

This object stores settings, not mutable Rust workspace. Its apply() method returns the same six outputs as sigclip().

Attributes

Name Description
cenfunc str(object=’’) -> str
clip_cen The type of the None singleton.
ddof int([x]) -> integer
grow The type of the None singleton.
maxiters int([x]) -> integer
maxrej The type of the None singleton.
nkeep int([x]) -> integer
revert_on_nkeep Returns True when the argument is true, False otherwise.
sigma Built-in immutable sequence.
stdfunc str(object=’’) -> str

Methods

Name Description
apply Clip an axis-0 stack using this object’s stored settings.

apply

SigClip.apply(arr, mask=None, *, validate=True)

Clip an axis-0 stack using this object’s stored settings.

Parameters

arr : (ndarray, shape(N, *spatial))

Input values; the sample axis is axis 0.

mask : ndarray or None = None

Same-shape input exclusions; True means excluded.

validate : bool = True

Validate and normalize arrays; default True.

Returns

result : tuple

(mask_rej, std, low, upp, nit, output_flags) from sigclip().