clean_wl

jwst.flatfield.flat_field.clean_wl(wl, dispaxis)[source]

Replace zeros and/or NaNs in the wavelength array.

Parameters:
wlndarray

Wavelength at each pixel of the 2-D slit array.

dispaxisint

1 is horizontal, 2 is vertical.

Returns:
wl_cndarray

A copy of wl, but with zero and negative values replaced with an average wavelength. For each column (row) in the dispersion direction, the average to find a replacement value is taken along the cross-dispersion direction.