fill_bad_regions

jwst.refpix.irs2_subtract_reference.fill_bad_regions(data0, ngroups, ny, nx, row, scipix_n, refpix_r, pad, hnorm, hnorm1)[source]

Fill the bad regions in the data.

Use Fourier filter/interpolation to replace:

  1. bad pixel, gaps, and reference data in the time-ordered normal data

  2. gaps and normal data in the time-ordered reference data

This “improves” upon the cosine interpolation performed above.

Parameters:
data0ndarray

Input data array. Modified in place.

ngroupsint

Number of groups in input data.

nyint

Number of rows in input data.

nxint

Number of columns in input data.

rowint

See replace_bad_pixels().

scipix_nint

Number of regular samples before stepping out to collect reference samples.

refpix_rint

Number of reference samples before stepping back in to collect regular samples.

padint

The effective number of pixels sampled during the pause at the end of each row (new-row overhead). The padding is needed to preserve the phase of temporally periodic signals.

hnormndarray

Array of column indices for normal pixels.

hnorm1ndarray

Shifted index values for normal pixels.