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

Home » Public Forums » archive » 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 #16341 is a reply to message #16297] Tue, 20 July 1999 00:00 Go to previous messageGo to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Martin Downing wrote:
> Liam Gumley <Liam.Gumley@ssec.wisc.edu> wrote in message
> news:378F33E4.984726C5@ssec.wisc.edu...
>> 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)
>>
>
> I agree with the first part, but HISTOGRAM ignores values outside the
> specified range, so you would want to check the index and throw away if LT 0
> or GE "num_bins"

which is done by the the statement

bin_index = (bin_index > 0L) < (number_of_bins - 1L)

Cheers,
Liam.

--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Contour `wrapping' problem
Next Topic: Re: Compile Problem with IDL5.2

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

Current Time: Sun Oct 12 14:17:29 PDT 2025

Total time taken to generate the page: 2.32208 seconds