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

Home » Public Forums » archive » "4D" Plots
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
"4D" Plots [message #52904] Wed, 07 March 2007 11:45
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
Hello all-

I can't believe this question hasn't been answered yet, but I can't
seem to find it anywhere. Maybe I just missed it...

I have 2 data sets, one containing x,y,z points and the other
containing some value (say intensity) for each of those spatial
points. I want to plot the intensity at each x,y,z point.

The long way of doing this is to simply loop over the spatial array
and pull the intensity out for each point. This is dreadfully slow. Is
there a better way that you are aware of?

Maybe some sample code will help clear up what I'm saying:

;this just gets the array from a data set
NCDF_VARGET, ID, 0, HM ;size = 301,301,33
NCDF_VARGET, ID, 2, LONx ;size = 301
NCDF_VARGET, ID, 3, LATy ;size=301
NCDF_VARGET, ID, 4, z ;size=33

;Not sure how to do this w/o using a for loop . . .
FOR i=0, 300 DO BEGIN
FOR j=0,300 DO BEGIN
FOR k=0, 32 DO BEGIN
IF hm[i,j,k] EQ -32768 THEN sym=0 ELSE
sym=FIX(hm[i,j,k]) ;gets rid of bad data
tempX=FLTARR(1) & tempX[0] = lonx[i]
tempY=FLTARR(1) & tempY[0] = laty[j]
tempZ=FLTARR(1) & tempZ[0] = z[k]
plots, tempX,tempY,tempZ,/T3D,psym=sym,continue= 0
ENDFOR
ENDFOR
ENDFOR
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: mapping volume data
Next Topic: Re: "4D" Plots

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

Current Time: Sat Oct 11 09:14:27 PDT 2025

Total time taken to generate the page: 0.72047 seconds