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

Home » Public Forums » archive » Re: Histogram Hot-shots Required
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: Histogram Hot-shots Required [message #16289] Fri, 16 July 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Liam Gumley (Liam.Gumley@ssec.wisc.edu) writes:

> Assuming I know the minimum and maximum values (the range) used in
> creating the histogram, the histogram binsize, and the number of bins,
> the zero-based bin index is given by
>
> bin_index = long(float(pixel_value - histogram_min_value) /
> float(binsize))
>
> and then to protect against pixel values LT histogram minimum value, or
> GE histogram maximum value
>
> bin_index = (bin_index > 0L) < (number_of_bins - 1L)
>
> At least, that's how it looks to me on paper....

Well, I think this is the correct answer, surely. But
I still have rather large differences on my plot between
this calculated value and the "perceived" value on
the graph. This must be a function of the distribution of
the data in certain bins and the way the graph is being
drawn.

To solve this I may have to go to a bar plot, which
I have *really* been trying to avoid. :-(

In any case, I appreciate the help very much.

Cheers,

David

P.S. I am going to pursue Ronn Kling's suggestions about
Reverse_Indices some more, even if I don't think it is the
answer in this case. I just love the irony of having a joke
throw-away line become the real answer. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: The position
Next Topic: Re: Q: about Richardson_Lucy Alg. (deconvolution)

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

Current Time: Fri Oct 10 15:49:56 PDT 2025

Total time taken to generate the page: 1.37298 seconds