Add functions for spectral analysis.