Spectral utilities in Python