[Thread Prev][Thread Next][Index]

Re: [ferret_users] lag correlations: time-lag products for all lags



Hi Billy,

Can I do this without a massive REPEAT loop? For instance, is there a way to promote the time series DATA to 2-d where the 2nd dimension is the time-shifted terms as above?

I'm not sure, but if Ferret can do complex FFT,

  let fdata = (complex Fourier transform of) data
  let r = j[j=0:2R] * delta_t
  let fdata_2d = exp(2 * pi * img * r) * fdata
  let data_2d = (complex inverse Fourier transform of) fdata_2d
  !!^^^ The "y" direction is the "columns" of your matrix.

because shift r in time in the real space is a multiplication of exp(2*pi*img*r) in the Fourier space.  In this case, the shift is cyclic, I think.  But I haven't tested this idea. Anyway, this may be more complex, in terms of memory use and computational cost, than the REPEAT loop you want to avoid. . . .

Cheers,

Ryo


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement