Harmonic analysis of time series in python