Re: Histogram Too Many Array Elements [message #67730] |
Mon, 24 August 2009 17:02 |
Chris[6]
Messages: 84 Registered: July 2008
|
Member |
|
|
On Aug 24, 12:40 pm, David Fanning <n...@dfanning.com> wrote:
> Folks,
>
> When I am working with large images, and I want to
> plot a histogram, there are occasions when Histogram
> complains about "too many array elements". On the
> current image I am working on, for example, I am
> passing an array to Histogram that has 1,727,194
> elements.
>
> It is an odd sort of error. And it is not even clear
> to me that this is too many elements per se. It almost
> seems like the bin size plays a role, too.
>
> In any case, does anyone know what, exactly, causes this
> error to occur? It seems to me it occurs most often
> when working with MODIS reflectance data where the data
> values are between 0 and 1. If it really is "too many"
> elements in the array, what would be the "just right"
> number?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
I think the "too many elements" error is a complaint that to make the
histogram with the requested range and binsize would require an array
with more elements than you can allocate. I run into it when I try to
make a histogram which has one outlier billions of bins away from the
rest of the distribution.
Chris
|
|
|