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

Home » Public Forums » archive » Using 1D FFT to decompose the provided hurricane data in terms of wavenumbers.
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: Using 1D FFT to decompose the provided hurricane data in terms of wavenumbers. [message #90494 is a reply to message #90487] Thu, 05 March 2015 07:32 Go to previous messageGo to previous message
Burch is currently offline  Burch
Messages: 28
Registered: December 2013
Junior Member
On Wednesday, March 4, 2015 at 5:11:01 PM UTC-6, twie...@fiu.edu wrote:
> I have 240x240 array of hurricane wind speed.
>
> 1) I need to covert to polar coordinates and plot the speed on a contour map with a radius of [-108,108], however what I have doesn't appear to be correct.

> Theta=atan(Y/X)*2*!PI

Calculating theta in this way will give you incorrect results. For instance, notice that

IDL> y = 1.0/2.0
IDL> x = -1.0/2.0
IDL> print, atan(y/x)
-0.785398

and

IDL> y = -1.0/2.0
IDL> x = 1.0/2.0
IDL> print, atan(y/x)
-0.785398

give the same result even though the locations are in different quadrants! You should use the two argument form of atan()

Theta = atan(y, x)

This will give you results ranging from -pi to pi. To change to 0 to 2 pi do

Theta = (theta + 2.0*!pi) mod (2.0*!pi)

-Jeff
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: FG Bug -- Legend/Cleanup
Next Topic: FG Save method -- Gifs

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

Current Time: Wed Oct 08 15:55:50 PDT 2025

Total time taken to generate the page: 0.00330 seconds