MinMaxClip
MinMaxClip(n_min=1, n_max=1, grow=None)Reject the smallest and largest unmasked values at each pixel.
Parameters
n_min : int or float = 1-
Number of minimum-side values to reject. Values
>= 1are a frame count. Values in[0, 1)are a fraction of the total frame countN, converted viaint(N * n_min + 0.001). n_max : int or float = 1-
Same convention as
n_min, applied to the maximum-side tail. grow : float or None = None-
Optional radius in pixels used to grow
mask_rejspatially after rejection. Axis 0 is the stack axis and is never grown across.Nonedisables growth and skips the extra calculation.
Attributes
| Name | Description |
|---|---|
| n_max | int([x]) -> integer |
| n_min | int([x]) -> integer |
Methods
| Name | Description |
|---|---|
| apply | Apply MinMaxClip to an image stack. |
apply
MinMaxClip.apply(arr, mask=None, *, validate=True)Apply MinMaxClip to an image stack.
Parameters
arr : (ndarray, shape(N, *spatial))-
Image stack. Inputs with more than 3 dimensions are flattened internally; output shapes match the trailing spatial dimensions of the input.
mask : ndarray of bool = None-
Input mask;
Truemeans already masked. Must have the same shape asarrbefore any internal flattening. validate : bool = True-
If
True, validate inputs before calling the kernel.
Returns
: mask_rej, std, low, upp, nit, output_flags : tuple of ndarray-
Rejection mask and diagnostics from :func:
imcombiners.kernels.minmax.stdis the per-pixel spread used by sigma/CCD clipping andNonefor rejection algorithms without a spread diagnostic.