check_res_fringes

jwst.residual_fringe.utils.check_res_fringes(res_fringe_fit, max_amp)[source]

Check for regions with bad fringe fits.

Set the beat where this happens to 0 to avoid making the fringes worse.

Parameters:
res_fringe_fitndarray

The residual fringe fit.

max_ampndarray

The maximum amplitude array.

Returns:
res_fringe_fit: ndarray

The residual fringe fit with bad fit regions removed and replaced with 0.

flags: ndarray

1D flag array indicating where the fit was altered, matching the size of the first dimension of res_fringe_fit. 1 indicates a bad fit region; 0 indicates a good region, left unchanged.