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

Home » Public Forums » archive » Pair Counts in an Annulus, for large data sets
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: Pair Counts in an Annulus, for large data sets [message #51515 is a reply to message #51262] Thu, 23 November 2006 07:58 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
fatcat3131@gmail.com writes:

> i've been tinkering with things, and i simply don't understand the
> histogram principle (i even read the tutorial!). would you mind
> explaining in slightly more detail?
>
> it's really not clicking with me how setting the binsize to Delta-R
> would allow me to count the points which lie in the distances (R to
> Delta-R) from a point P, and do this for all N points. i am interested
> in just one Delta-R, and counting the point-point pairs for this
> Delta-R.

Humm. Let's see. You have a data set containing the
distance from some point, R. Suppose your delta-R, or
bin size, is 1. If you run a histogram on R, it will
tell you how many Rs are in the bin 0 to 1, 1 to 2, etc.
Moreover, the reverse indices of the histogram will tell
you which points in R are in each bin.

Suppose, for example, you are interested in which points
have a radius between 2 and 3 in your R vector.
This would be the third bin of the histogram:

h = Histogram(R, BINSIZE=1, OMIN=0, REVERSE_INDICES=ri)
Print, 'Number of points with radius between 2-3: ', h[2]

Now, which points in R are in this bin? That information is contained
in the reverse indices:

indices_of_R_in_Bin3 = ri[ri[2]:ri[3]-1]

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: write_png weirdness
Next Topic: Re: 'from lon-lat to TM' source code?

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

Current Time: Sun Oct 12 04:18:47 PDT 2025

Total time taken to generate the page: 1.91776 seconds