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

Home » Public Forums » archive » Re: Flow3 procedure
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: Flow3 procedure [message #39294] Thu, 06 May 2004 12:01 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Adhara writes:

> 1. Can someone tell me why do I get an error message that says:
>
> % FLOW3: Incorrect number of arguments.
> % Execution halted at: $MAIN$ 49 C:\RSI\IDL55\lib\velocity3.pro
>
> When I include in the FLOW3 argument the sx,sy,sz arrays?
>
> Flow3, Vx, Vy, Vz, sx,sy,sz

These arguments are keywords. And the way you are extracting
them, they will be 2D vectors (which will probably also cause
an error). Try something like this:

Flow2, Vx, Vy, Vz, SX=Reform(sx), SY=Reform(sy), SZ=Reform(sz)

> 2. If I erase sx,sy,sz, my vectors appear extremelly small! How can I fix this?

Don't know about this. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Flow3 procedure [message #39325 is a reply to message #39294] Sat, 15 May 2004 16:43 Go to previous messageGo to next message
eoraptor is currently offline  eoraptor
Messages: 5
Registered: January 2004
Junior Member
I'm trying to help Adhara get her flow velocity data to plot using
FLOW3.

FLOW3, Vx, Vy, Vz [,ARROWSIZE=value] [,/BLOB] [,LEN=value]
[,NSTEPS=value] [,NVECS=value] [,SX=vector,SY=vector,SZ=vector]

She has 3 float arrays named Vx, Vy, and Vz that are of dimensioned
(90,360,360). Vx contains the magnitude of the flow vector in the x
direction, Vy is the magnitude in the y direction, etc.

The actual values in the arrays Vx, Vy, and Vz are almost all zero.
The few values that are non-zero are +/- in the range of e-005.

Since most of the values in her arrays are zero, should she be using
WHERE to extract out the non-zero magnitudes before calling FLOW3?
The arrays of SX, SY, and SZ in FLOW3 could be used to give the x,y,z
coordinates of the non-zero magnitudes, right?

Thanks,
Richard
Re: Flow3 procedure [message #39346 is a reply to message #39294] Thu, 13 May 2004 11:48 Go to previous messageGo to next message
adharac is currently offline  adharac
Messages: 23
Registered: April 2004
Junior Member
Hello, I tried what you suggested me to do, but now, the program is crashing...
Do you have any thing else in mind that can help me out?
Thanks.
Adhara



David Fanning <david@dfanning.com> wrote in message news:<MPG.1b043979dabbb0bf98973f@news.frii.com>...
> Adhara writes:
>
>> 1. Can someone tell me why do I get an error message that says:
>>
>> % FLOW3: Incorrect number of arguments.
>> % Execution halted at: $MAIN$ 49 C:\RSI\IDL55\lib\velocity3.pro
>>
>> When I include in the FLOW3 argument the sx,sy,sz arrays?
>>
>> Flow3, Vx, Vy, Vz, sx,sy,sz
>
> These arguments are keywords. And the way you are extracting
> them, they will be 2D vectors (which will probably also cause
> an error). Try something like this:
>
> Flow2, Vx, Vy, Vz, SX=Reform(sx), SY=Reform(sy), SZ=Reform(sz)
>
>> 2. If I erase sx,sy,sz, my vectors appear extremelly small! How can I fix this?
>
> Don't know about this. :-(
>
> Cheers,
>
> David
Re: Flow3 procedure and WHERE [message #39491 is a reply to message #39325] Sun, 23 May 2004 09:32 Go to previous message
adharac is currently offline  adharac
Messages: 23
Registered: April 2004
Junior Member
hello, So I followed the advice.... from the 32400 records that I
initially had, now all my coordinate arrays (sx,sy,sz) and velocity
arrays (vx,vy,vz) are of 521 records each (i.e. sxx, syy, szz and vxx,
vyy and vzz).


However, I am getting and error message that I have not been able to
fix...

IDL> .COMPILE "C:\RSI\IDL55\lib\mycount.pro"
% Compiled module: $MAIN$.
IDL> .CONTINUE
% Type of FOR statement index variable <No name> may not be changed.
% Execution halted at: $MAIN$ 309
C:\RSI\IDL55\lib\mycount.pro

How can I fix this?
Thank you in advance for any asistance that you can give me.
Regards,
Adhara


Here is the new version of my code:



openr,q,'VOa.dat',/Get_Lun ;open files for reading
A=fltarr(6,90*360L) ;create arrays to hold data in files
readf,q,A ;read files into arrays
Free_Lun,q ;close files and clear logical unit assigned to each
file

Vx=fltarr(360,360,90) ;create 3 dimensional arrays to hold vector
data.
Vy=fltarr(360,360,90) ;the indices will be Vx(x,y,z)
Vz=fltarr(360,360,90)

factor = 0
For i = 0, 32399L Do Begin ;change here the number of records
ifneeded.

Vx(A(2,i)-1,A(1,i)-1,A(0,i)-1) = A(3,i)*10.0^factor
Vy(A(2,i)-1,A(1,i)-1,A(0,i)-1) = A(4,i)*10.0^factor
Vz(A(2,i)-1,A(1,i)-1,A(0,i)-1) = A(5,i)*10.0^factor

Endfor

Vxx=WHERE(Vx NE 0,count1)
Vyy=WHERE(Vy NE 0,count2)
Vzz=WHERE(Vz NE 0,count3)

sx=A[2,*]
sy=A[1,*]
sz=A[0,*]

Sxx=where(Vxx)
Syy=where(Vyy)
Szz=where(Vzz)

vol = FLTARR(360, 360, 90)

WINDOW, XSIZE = 390, YSIZE = 400

CREATE_VIEW, XMAX = 360, YMAX = 360, ZMAX = 100


Scale3, zr=[0,10], yr=[0,120], xr = [0,120] ;create 3D scaling
system
Scale3, zr=[0,90], yr=[0,360], xr = [0,360]


Flow3, Vxx, Vyy, Vzz, SXX=Reform(sxx), SYY=Reform(syy),
SZZ=Reform(szz)
end

















eoraptor@aol.com (Richard Hoffpauir) wrote in message news:<77bd9c11.0405151543.e20d23b@posting.google.com>...
> I'm trying to help Adhara get her flow velocity data to plot using
> FLOW3.
>
> FLOW3, Vx, Vy, Vz [,ARROWSIZE=value] [,/BLOB] [,LEN=value]
> [,NSTEPS=value] [,NVECS=value] [,SX=vector,SY=vector,SZ=vector]
>
> She has 3 float arrays named Vx, Vy, and Vz that are of dimensioned
> (90,360,360). Vx contains the magnitude of the flow vector in the x
> direction, Vy is the magnitude in the y direction, etc.
>
> The actual values in the arrays Vx, Vy, and Vz are almost all zero.
> The few values that are non-zero are +/- in the range of e-005.
>
> Since most of the values in her arrays are zero, should she be using
> WHERE to extract out the non-zero magnitudes before calling FLOW3?
> The arrays of SX, SY, and SZ in FLOW3 could be used to give the x,y,z
> coordinates of the non-zero magnitudes, right?
>
> Thanks,
> Richard
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: will pay
Next Topic: Re: Extremely Strange Program Behavior

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

Current Time: Fri Nov 28 07:45:27 PST 2025

Total time taken to generate the page: 0.23128 seconds