detect_outliers
- jwst.outlier_detection.spec.detect_outliers(input_models, save_intermediate_results, good_bits, maskpt, snr1, snr2, scale1, scale2, backg, resample_data, weight_type, pixfrac, kernel, fillval, make_output_path)[source]
Flag outliers in slit-like spectroscopic data.
- Parameters:
input_models (ModelContainer) – A container of data models.
save_intermediate_results (bool) – If True, save intermediate results.
good_bits (int) – Bit values indicating good pixels.
maskpt (float) – The percentage of the mean weight to use as a threshold for masking.
snr1 (float) – The signal-to-noise ratio threshold for first pass flagging, prior to smoothing.
snr2 (float) – The signal-to-noise ratio threshold for secondary flagging, after smoothing.
scale1 (float) – Scale factor used to scale the absolute derivative of the blot model for the first pass.
scale2 (float) – Scale factor used to scale the absolute dervative of the blot model for the second pass.
backg (float) – Scalar background level to add to the blotted image. Ignored if
input_model.meta.background.level
is not None butinput_model.meta.background.subtracted
is False.resample_data (bool) – If True, resample the data before detecting outliers.
weight_type (str) – The type of weighting kernel to use when resampling. Options are ‘ivm’ or ‘exptime’.
pixfrac (float) – The pixel shrinkage factor to pass to drizzle.
kernel (str) – The flux distribution kernel function to use when resampling.
fillval (str) – The value to use in the output for pixels with no weight or flux
make_output_path (function) – The functools.partial instance to pass to save_blot. Must be specified if save_blot is True.
- Returns:
The input models with outliers flagged.
- Return type: