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 #64263 is a reply to message #64172] Wed, 10 December 2008 09:37 Go to previous messageGo to previous message
duxiyu@gmail.com is currently offline  duxiyu@gmail.com
Messages: 88
Registered: March 2007
Member
Excuse me!
I do not understand your routine.
Could you show me an example? or give me some detailed explanations?

Du


On Dec 10, 9:05 pm, "Jean H." <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
wrote:
> 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 07:35:56 PDT 2025

Total time taken to generate the page: 1.44130 seconds