badpix_selfcal

jwst.badpix_selfcal.badpix_selfcal.badpix_selfcal(minimg: ndarray, flagfrac_lower: float = 0.001, flagfrac_upper: float = 0.001, kernel_size: int = 15, dispaxis=None) ndarray[source]

Identify residual artifacts in a combined image.

Parameters:
minimgndarray

Selfcal data of shape (x, y), i.e., after some operation has already been taken to combine multiple exposures, typically a MIN operation.

flagfrac_lowerfloat

Fraction of pixels to flag on the low end

flagfrac_upperfloat

Fraction of pixels to flag on the high end

kernel_sizeint

Size of kernel for median filter

dispaxisint

Dispersion axis, either 1 or 2. If None, a two-dimensional median filter is applied.

Returns:
flagged_indicesndarray

Indices of the flagged pixels, shaped like output from numpy.where().