interpflagspec

sofia_redux.spectroscopy.interpflagspec.interpflagspec(x, y, xout, nbits=8, cval=0)[source]

Performs a linear interpolation on a bit-set flag array

Parameters:
xarray_like of float

(N,) independent values of spectrum

yarray_like of int

(N,) dependent values of the bit-set flag array

xout(array_like of float) or float

(M,) new independent values of spectrum

nbitsint, optional

The number of bits to scan through. The assumption is that they are sequential starting with the first bit.

cvalfloat, optional

Value to fill in requested interpolation points outside the data range.

Returns:
numpy.ndarray (int)

(M,) new dependent values of the bit-set flag array at xout.