flag_resampled_model_crs

jwst.outlier_detection.utils.flag_resampled_model_crs(input_model, median_data, median_wcs, snr1, snr2, scale1, scale2, backg, median_err=None, save_blot=False, make_output_path=None, pixmap_stepsize=1, pixmap_order=1)[source]

Flag outliers in a resampled model, updating DQ array in place.

Parameters:
input_modelJwstDataModel

The input datamodel.

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, optional

If True, save the blotted image to FITS.

make_output_pathfunction, optional

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

pixmap_stepsizefloat, optional

Indicates the spacing in pixels at which the WCS is evaluated when computing the pixel map. WCS coordinates of the full pixel map is computed by interpolating over this sparse pixel map when pixmap_stepsize > 1. Larger step sizes result in faster performance at the cost of accuracy. Default is 1.

pixmap_orderint, optional

Interpolating spline order for pixel map computation. Must be 1 or 3. Default is 1.