clean_amplifier_residuals

grizli.prep.clean_amplifier_residuals(files, extensions=[1, 2], minpix=500000.0, max_percentile=99, seg_hdu=None, skip=10, polynomial_degree=3, verbose=True, imsh_kwargs={'cmap': 'magma', 'vmax': 0.001, 'vmin': -0.001})[source]

Fit and remove a 2D polynomial fit to the detector-frame UVIS/WFC images

Parameters
fileslist

List of FLC files

extensionslist

List of extensions to consider (ACS and UVIS have two). Extensions will be addressed as im['SCI',ext].

minpixint

Minimum number of unmasked pixels required to perform the fit

seg_hduImageHDU

Optional HDU defining a mask for the individual exposures. Will be blotted to the FLC frame and valid pixels are taken to be where seg_hdu.data == 0 (e.g., a segmentation image).

skipint

Pass every skip (unmasked) pixel to the polynomial fit.

polynomial_degreeint

Order of the Polynomial2D model to use.

verbosebool

Print status information

imsh_kwargsdict

Args to pass to imshow for the figure