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

Home » Public Forums » archive » Using histogram (or cghistogram) to get top X percent of distribution?
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: Using histogram (or cghistogram) to get top X percent of distribution? [message #92623 is a reply to message #92620] Tue, 26 January 2016 06:37 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Monday, January 25, 2016 at 9:48:23 PM UTC, rj...@le.ac.uk wrote:
> I'm not sure if this is just me not quite understanding how histogram works.
>
> I have a large array containing data. I want to identify the array indices of the top 10% (for example) of the data. I thought I should be able to use histogram to do this quickly but can't figure out how.
>
> Any help much appreciated as always :-)

Hi,
I normally do something very similar to scale images: I clip the histogram around a few percent from the lowest and highest side. This can be a good reference to find those pixels...
Here is the histogram to perform the histogram percentage clipping: http://idl.marchetto.de/percentage-of-histogram/

It's not very clean, but works fine for me.

Cheers,
Helder

PS: previously I searched the cumulative histogram until I hit the percentage I wanted, but using value_locate is more efficient.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: USE of IDL in cl script for iraf???
Next Topic: DIST Function - 3D

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

Current Time: Wed Oct 08 13:54:31 PDT 2025

Total time taken to generate the page: 0.04943 seconds