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

Home » Public Forums » archive » Re: Vector representation of data.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Vector representation of data. [message #83672] Fri, 29 March 2013 14:18 Go to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Wednesday, March 27, 2013 8:04:24 AM UTC-6, dave poreh wrote:
> Folks
>
> Hi,
>
> I have data like x,y, z and z shows my intensity data (x and y are like coordinates). My data has low value in one corner and i was thinking maybe I could show the data like vectors; length of vector should show ||z|| and direction toward the lowest point in my 2D data (x-y). Can someone give me an idea about how could I do that please?
>
> Cheers,
>
> Dave

Hi Dave,

You should be able to use the VECTOR function to create the actual vector plot. You just need to compute the "U" and "V" components of the vectors, along with the X and Y locations. Then it is just:

v = VECTOR(U, V, X, Y)

The trick will be computing your angles, perhaps by computing some sort of "gradient" along your data? If you could get ||Z|| and angle Theta on a 2D grid, then you could just use:
U = ||Z|| cos(Theta)
V = ||Z|| sin(Theta).

Hope this helps a bit.

Cheers,
Chris
ExelisVIS
Re: Vector representation of data. [message #83809 is a reply to message #83672] Fri, 29 March 2013 16:38 Go to previous messageGo to next message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
Building off Chris's advice...

Assuming (y0,x0) is the "low point", then something like

ang = ATAN(y-y0, x-x0)
partvelvec, z*COS(ang), z*SIN(ang), x, y

should do the trick. This uses partvelvec from the astro library, http://idlastro.gsfc.nasa.gov/ftp/pro/plot/partvelvec.pro

You'll have to be careful with which way the vector points, if that's important.
Re: Vector representation of data. [message #83852 is a reply to message #83809] Thu, 04 April 2013 00:27 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Friday, March 29, 2013 3:38:01 PM UTC-8, Phillip Bitzer wrote:
> Building off Chris's advice...
>
>
>
> Assuming (y0,x0) is the "low point", then something like
>
>
>
> ang = ATAN(y-y0, x-x0)
>
> partvelvec, z*COS(ang), z*SIN(ang), x, y
>
>
>
> should do the trick. This uses partvelvec from the astro library, http://idlastro.gsfc.nasa.gov/ftp/pro/plot/partvelvec.pro
>
>
>
> You'll have to be careful with which way the vector points, if that's important.

Thanks guys, I am using partvelvec now and looks like it is working:)
Cheers,
Dave
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: the (Moore-Penrose) pseudo-inverse of a matrix - anything like scipy.linalg's pinv2 in IDL?
Next Topic: Multiple linear regression (MLR): significance of the calculated terms (2 sigma interval)

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

Current Time: Wed Oct 08 09:13:28 PDT 2025

Total time taken to generate the page: 0.00614 seconds