median_with_resampling
- jwst.outlier_detection.utils.median_with_resampling(input_models, resamp, maskpt, save_intermediate_results=False, make_output_path=None, buffer_size=None, return_error=False)[source]
Compute a median image with resampling.
The median is performed across resampled groups, for both imaging and spectral modes.
- Parameters:
- input_models
ModelLibrary The input datamodels.
- resamp
ResampleImage The controlling object for the resampling process.
- maskptfloat
The weight threshold for masking out low weight pixels.
- save_intermediate_resultsbool
If
True, save the drizzled models and median model to FITS.- make_output_pathfunction or None
The
functools.partial()instance to pass to internal function for saving the median image. Must be specified ifsave_intermediate_resultsisTrue. Default is None.- buffer_sizeint
The size of chunk in bytes that will be read into memory when computing the median. This parameter has no effect if the input library has its
on_diskattribute set toFalse.- return_errorbool, optional
If
True, an approximate median error is computed alongside the median science image.
- input_models
- Returns: