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

Home » Public Forums » archive » Re: zero values with flow3
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: zero values with flow3 [message #39487 is a reply to message #39343] Sun, 23 May 2004 14:53 Go to previous message
adharac is currently offline  adharac
Messages: 23
Registered: April 2004
Junior Member
Hello Craig, thank you for your advice using WHERE!
I fortunately got rid of the zeros at Vx, Vy and Vz. However, I want
to get the respective coordinates at which the velocity components are
not zeros (Sx,Sy and Sz).

How can I do this?
thanks
Adhara


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,*]

;here is my question...how to define these arguments!!!!!
Sxx=where(Vxx NE 0)
Syy=where(Vyy)
Szz=where(Vzz)

end











Craig Markwardt <craigmnet@REMOVEcow.physics.wisc.edu> wrote in message news:<onbrkrrj28.fsf@cow.physics.wisc.edu>...
> adharac@hotmail.com (Adhara) writes:
>
>
>> Dear all,
>> I have a very large set of data in an array of 6 columns and 32400
>> rows. The columns are the coordinates x,y,z and the velocity
>> components Vx,Vy,Vz. There is a large number of these points that are
>> zero for vx, vy, vz. However, I my macro is plotting these points.
>> How can I avoid this?
>
>
> You probably want to use WHERE to select the non-zero points.
>
> Craig
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Extremely Strange Program Behavior
Next Topic: Smoothing Data with optimal wiener filter

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

Current Time: Sun Oct 12 19:52:19 PDT 2025

Total time taken to generate the page: 0.96411 seconds