function spectrum, ts,tinc ; ; From a time serie of length T=tinc*N ; Return power spectrum and array of periods ; N=n_elements(ts) N21 = N/2 ps=ABS(FFT(ts, -1)) ps=ps(0:N21-1) period=tinc*N/(findgen(N21)+0.0000000000001) period(0)=99999999999. ret=findgen(2,N21) ret(1,*)=ps ret(0,*)=period return, ret end