flag_crs_in_models_with_resampling

jwst.outlier_detection.utils.flag_crs_in_models_with_resampling(input_models, median_data, median_wcs, snr1, snr2, scale1, scale2, backg, median_err=None, save_blot=False, make_output_path=None)[source]

Flag outliers in all input models, with resampling, modifying DQ array in place.

Parameters:
input_modelsModelContainer

The input datamodels.

median_datandarray

The median data array.

median_wcsWCS

A WCS corresponding to the median data.

snr1float

The signal-to-noise ratio threshold for first pass flagging, prior to smoothing.

snr2float

The signal-to-noise ratio threshold for secondary flagging, after smoothing.

scale1float

Scale factor used to scale the absolute derivative of the blot model for the first pass.

scale2float

Scale factor used to scale the absolute derivative of the blot model for the second pass.

backgfloat

Scalar background level to add to the blotted image. Ignored if input_model.meta.background.level is not None but input_model.meta.background.subtracted is False.

median_errndarray, optional

The error array corresponding to the median data. If not provided, the error array stored the input model err extension will be used.

save_blotbool

If True, save the blotted image to FITS.

make_output_pathfunction

The functools.partial() instance to pass to save_blot. Must be specified if save_blot is True.