median_without_resampling

jwst.outlier_detection.utils.median_without_resampling(input_models, maskpt, weight_type, good_bits, save_intermediate_results=False, make_output_path=None, buffer_size=None, return_error=False)[source]

Compute a median image without resampling.

The median is performed across input exposures, for both imaging and spectral modes.

Parameters:
input_modelsModelLibrary

The input datamodels.

maskptfloat

The weight threshold for masking out low weight pixels.

weight_typestr

The type of weighting to use when combining images. Options are: ‘ivm’ (inverse variance) or ‘exptime’ (exposure time).

good_bitsint

The bit values that are considered good when determining the data quality of the input.

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 if save_intermediate_results is True. 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_disk attribute set to False.

return_errorbool, optional

If True, an approximate median error is computed alongside the median science image.

Returns:
median_datandarray

The median data array.

median_wcsWCS

A WCS corresponding to the median data.

median_errorndarray, optional

A median error estimate, returned only if return_error is True.