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_models
ModelContainer The input datamodels.
- median_datandarray
The median data array.
- median_wcs
WCS 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.levelis not None butinput_model.meta.background.subtractedisFalse.- median_errndarray, optional
The error array corresponding to the median data. If not provided, the error array stored the input model
errextension will be used.- save_blotbool
If
True, save the blotted image to FITS.- make_output_pathfunction
The
functools.partial()instance to pass tosave_blot. Must be specified ifsave_blotisTrue.
- input_models