comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: time vs longitude FFT
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: time vs longitude FFT [message #56552 is a reply to message #56542] Mon, 29 October 2007 11:41 Go to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
<knielsen73@gmail.com> wrote in message
news:1193671433.271745.268030@57g2000hsv.googlegroups.com...
> Hi,
>
> I have a time vs longitude plot and would like to do a 2-D FFT to get
> a frequency vs wavenumber plot. I used the IDL FFT but I am not sure
> what the output is...I didn't feel the IDL help was very helpful
> there. I found a post from 1998 but there were some non-defined
> functions and I wasn't exactly sure what they did.
>
> Does anybody have a good example on how to use 2D FFT in IDL or some
> good documentation?

a little example:nx = 100
ny = 200
x = (fltarr(ny)+1) ## findgen(nx)
y = findgen(ny) ## (fltarr(nx)+1)
kx = 20.5/nx
ky = 0./ny

;image
a =cos(2*!pi*(kx*x + ky*y))

;spectrum in 2d
spe = fft(a)

kxvalues = findgen(nx)/nx - 1./2
kyvalues = findgen(ny)/ny - 1./2


!p.multi=[0,1,2]
contour,a,/fill,nlevels=14

; shift to get the normal representation,
; i.e. (neg kx, 0, pos kx)
shiftspe = shift(spe,nx/2,ny/2)

contour,abs(shiftspe),kxvalues,kyvalues,/fill,nlevels=14


Note: it is symmetric about the origin.

Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL + Leopard
Next Topic: more IDL/Leopard issues

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 09:23:47 PDT 2025

Total time taken to generate the page: 0.24325 seconds