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

Home » Public Forums » archive » Re: Histogram indeterminate results
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 indeterminate results [message #33188] Thu, 12 December 2002 15:12 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <ataqhb$prr$1@skates.gsfc.nasa.gov>,
thompson@orpheus.nascom.nasa.gov (William Thompson) wrote:

> I think the problem is that NBINS should be
>
> nbins = nx*ny*nz + 1
>
> to accommodate points which fall on exactly the maxima, i.e. points with
> x=360, y=1, and z=1000, or so close that round-off error makes it look that
> way. I would change your code to read

That is plausible, but the actual values of the input to histogram at
the time the error occurred are clearly not out of the range [0, nbins]

>> IDL> n = nx*ny*LONG((z0 - z_min)/dz) + $
>> IDL> nx*LONG((y0 - y_min)/dy) + $
>> IDL> LONG((x0 - x_min)/dx)
>> IDL> print, min(n), max(n), nbins
>>
>>
>> 30 143991 144000

> P.S. I would also check that there isn't some problem with the way the
> keyword
> SINE_LAT is handled.

I was worried about round-off error, in that calculation in particular,
but as the diagnosis shows, 0 is LE n and LT nbins.

The really disturbing thing is that running the same program repeatedly
on the same data generates errors in different places.

Ken
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Proper use of assoc
Next Topic: Histogram indeterminate results

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

Current Time: Wed Oct 08 19:03:43 PDT 2025

Total time taken to generate the page: 0.00177 seconds