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 #87012 is a reply to message #87011] Thu, 19 December 2013 14:13 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nafiseh Masoumzadeh writes:

> I have three vectors, x, y, z having same size which I want to bin x and y and have average value of z corresponding to bin. and then get resample data in point clouds as an output.
>
> rebin or reform are supposed to do it, but I couldn't find how, however I've studied http://www.idlcoyote.com/tips/rebin_magic.html. The example in this link for me it is more like to mask your data but I want to have an avarage of one of my vector z in bin x-y plane

I would use HIST_ND with the REVERSE_INDICES keyword to bin the data in
X and Y. Then, I would loop through each bin and with the output from
REVERSE_INDICES find the Z values falling in each bin and average those.

You can find NIST_ND in the Public directory of the Coyote Library, and
you might find cgReverseIndices handy for returning the indices of the Z
values in each bin:

http://www.idlcoyote.com/idldoc/cg/cgreverseindices.html

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 Nov 28 10:07:19 PST 2025

Total time taken to generate the page: 1.36611 seconds