kernels.minmax_1d
kernels.minmax_1d(values, *, mask=None, n_min=1, n_max=1, validate=True)Reject the n_min smallest and n_max largest unmasked values at each pixel. Single-pass (1-D variant).
Parameters
values : (ndarray, shape(N))-
One-dimensional value vector. Accepted dtypes are
uint8,uint16,int16,int32,float32, andfloat64. Integer inputs are promoted to the package’s floating workspace whenvalidateisTrue. mask : ndarray of bool = None-
Input mask;
Truemeans already masked. Must have shape(N,). n_min : int or float = 1-
Number of minimum-side values to reject at each pixel. Values
>= 1are treated as a frame count. Values in[0, 1)are treated as a fraction of the total frame countNand converted viaint(N * n_min + 0.001), matching IRAF’s internal fraction arithmetic. n_max : int or float = 1-
Same convention as
n_min, applied to the maximum-side tail. validate : bool = True-
If
True, check dimensionality and normalize dtype/contiguity before entering the Rust kernel. IfFalse, callers must provide inputs that satisfy the compiled kernel assumptions.
Returns
mask_rej : ndarray of bool, shape (N,)-
Truewhere a value was rejected by this kernel. std : scalar or None-
Spread used by sigma/CCD clipping.
Nonefor rejection algorithms without a spread diagnostic. low : scalar-
Lower retained-value bound. Bounds are inclusive: values equal to
loware retained. upp : scalar-
Upper retained-value bound. Bounds are inclusive: values equal to
uppare retained. nit : scalar-
Iteration count.
output_flags : scalar-
Bit-coded status using the same bit meanings as the stack kernel.