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

Home » Public Forums » archive » How to represent the spatial distribution of a parameter
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: How to represent the spatial distribution of a parameter [message #64270 is a reply to message #64172] Wed, 10 December 2008 05:05 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
Hi,

I did something similar a while ago... here is part of it:

newX = Xdata / CellSizeX ;Agregate the data
newY = Ydata / CellSizeY

nbCol = ceil((maxX+1.0) / cellSizeX)
nbRow = ceil((maxY+1.0) / cellSizeY)
nPoint = n_elements(newX)

image = lonarr(nbCol, nbRow)
nbPointsXY = lonarr(nbCol, nbRow)

for i = 0L, nPoint-1 do begin
image[newX[i], newY[i]] += v[i]
nbPointsXY[newX[i], newY[i]] += 1
endfor

image /= nbPointsXY ;do the average

tvscl, image


Jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: % RESTORE: Procedure RUNFROMIDL can't be restored while active.
Next Topic: widget_tab

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

Current Time: Sun Oct 12 00:20:40 PDT 2025

Total time taken to generate the page: 1.99695 seconds