Outlier Detection Utils

stcal.outlier_detection.median Module

Compute median of large datasets in memory- and runtime-efficient ways.

Functions

nanmedian3D(cube[, overwrite_input])

Compute the nanmedian of a cube.

Classes

MedianComputer(full_shape, in_memory[, ...])

Top-level class to treat median computation uniformly, whether in memory or on disk.

Class Inheritance Diagram

Inheritance diagram of stcal.outlier_detection.median.MedianComputer

stcal.outlier_detection.utils Module

Utility functions for outlier detection routines

Functions

medfilt(arr, kern_size)

scipy.signal.medfilt (and many other median filters) have undefined behavior for nan inputs.

compute_weight_threshold(weight, maskpt)

Compute the weight threshold for a single image or cube.

flag_crs(sci_data, sci_err, blot_data, snr)

Straightforward detection of outliers for non-dithered data since sci_err includes all noise sources (photon, read, and flat for baseline).

flag_resampled_crs(sci_data, sci_err, ...)

Detect outliers (CRs) using resampled reference data.

gwcs_blot(median_data, median_wcs, ...[, ...])

Resample the median data to recreate an input image based on the blot wcs.

calc_gwcs_pixmap(in_wcs, out_wcs, in_shape)

Return a pixel grid map from input frame to output frame.

reproject(wcs1, wcs2)

Given two WCSs return a function which takes pixel coordinates in wcs1 and computes them in wcs2.