clip_spectral_features

jwst.residual_fringe.utils.clip_spectral_features(signal, sigma=4.0)[source]

Clip out large spectral features.

Parameters:
signalndarray

Signal data. Input is expected to be the relative difference of the spectrum from a smoothed spline fit to the lower envelope of the spectrum.

sigmafloat, optional

Upper threshold for clipping features.

Returns:
weightsndarray

1D array matching signal dimensions, containing 0 values for large features and 1 values where no features were detected.