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

Home » Public Forums » archive » binning a point clouds in the xy plane
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: binning a point clouds in the xy plane [message #87019 is a reply to message #87017] Fri, 20 December 2013 16:06 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nafiseh M writes:

> thanks a lot for the answer,
>
> But I thought with indicesz, i would have my new x and y for mean z values. I cannot figure it how can I calculate them?

Are you talking about how you calculate the new X and Y vectors that
describe the binned data? I think I would do it like this. Given that
you have this (and note I'm leaving out the max values since they will
not be used if you are specifying the bin size, as you are):

hist_xy=hist_nd(transpose([[x],[y]]),[0.05,0.05],$
min=[min(x),min(y)], reverse_indices=ri)

I would do this, where I add half a bin size to put the X and Y vector
values in the center of the bin:

dims = Size(hist_xy, /Dimensions)
xvector = Findgen(dims[0])*0.05 + Min(x) + 0.025
yvector = Findgen(dims[1])*0.05 + Min(y) + 0.025

> when I write
> print, indicesz
> I will get just some number which I don't know what are they.

They are the indices of the Z values that were placed into that bin.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bar plotting in IDL
Next Topic: Color bar colors not matching Image colors

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

Current Time: Fri Oct 10 20:00:56 PDT 2025

Total time taken to generate the page: 1.20018 seconds