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_modelsModelContainer
A container of data models.
- save_intermediate_resultsbool
If True, save intermediate results.
- good_bitsint
Bit values indicating good pixels.
- maskptfloat
The percentage of the mean weight to use as a threshold for masking.
- 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 dervative 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 butinput_model.meta.background.subtracted
is False.- resample_databool
If True, resample the data before detecting outliers.
- weight_typestr
The type of weighting kernel to use when resampling. Options are ‘ivm’ or ‘exptime’.
- pixfracfloat
The pixel shrinkage factor to pass to drizzle.
- kernelstr
The flux distribution kernel function to use when resampling.
- fillvalstr
The value to use in the output for pixels with no weight or flux
- make_output_pathfunction
The functools.partial instance to pass to save_blot. Must be specified if save_blot is True.
- Returns:
- ModelContainer
The input models with outliers flagged.