spectral analysis functions