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

Home » Public Forums » archive » Re: strange behaviour of bytscl by large arrays
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: strange behaviour of bytscl by large arrays [message #80048 is a reply to message #79953] Mon, 23 April 2012 13:54 Go to previous message
Klemen is currently offline  Klemen
Messages: 80
Registered: July 2009
Member
Hmm today I don't have just the usual problems with IDL, but also with thist post... I would assume that everything is online once you press post... Anyway, short version once again.

Lajos, thank you very much. It's nice to know that I am not the only one seeing a miracle. :) Although the sky is not falling. :) And what I find really interesting is that you observed also the correlation to the number of CPU.

David, sorry that I was not clear in the first post. Yes the thing is that using BYTSCL and HIST_EQAL have some difficulties when processing large arrays. Using the above example of Lajos, see the output of the histogram.


pro test
cpu, tpool_nthreads=1
n=10l^8
nn=n-1
a3=fltarr(n)
count=0ll
for j=0l, nn do a3[j]=count++ ; better implementation
h = histogram(a3, binsize=10L^6)
print, h
b = byte(a3)
h = histogram(b)
print, h
end

IDL prints:

1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 999999 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 1000000 999999 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 999998 1000000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 1000000 1000000 1000000 1000000 1000000
1000000 1000000 4
2073833 65536 131072 65536 655360 65536 131072
65536 1816871 65536 131072 65536 655360 65536
131072 65536 2073833 65536 131072 65536 655360
65536 131072 65536 1816871 65536 131072 65536
655360 65536 131072 65536 2073833 65536 131072
65536 655360 65536 131072 65536 1816871 65536
131072 65536 655360 65536 131072 65536 2073833
65536 131072 65536 655360 65536 131072 65536
1816871 65536 131072 65536 655360 65536 131072
65536 2073833 65536 131072 65536 655360 65536
131072 65536 1816871 65536 131072 65536 655360
65536 131072 65536 2073833 65536 131072 65536
655360 65536 131072 65536 1816871 65536 131072
65536 655360 65536 131072 65536 2073833 65536
131072 65536 655360 65536 131072 65536 1816871
65536 131072 65536 655360 65536 131072 65536
2073833 65536 131072 65536 655360 65536 131072
65536 1816871 65536 131072 65536 655360 65536
131072 65536 2073833 65536 131072 65536 655360
65536 131072 65536 1816871 65536 131072 65536
655360 65536 131072 65536 2073833 65536 131072
65536 655360 65536 131072 65536 1816871 65536
131072 65536 655360 65536 131072 65536 2073833
65536 131072 65536 655360 65536 131072 65536
1816871 65536 131072 65536 655360 65536 131072
65536 2073833 65536 131072 65536 655360 65536
131072 65536 1816871 65536 131072 65536 655360
65536 131072 65536 2073833 65536 131072 65536
655360 65536 131072 65536 1816871 65536 131072
65536 655360 65536 131072 65536 2073833 65536
131072 65536 655360 65536 131072 65536 1816871
65536 131072 65536 655360 65536 131072 65536
2073833 65536 131072 65536 655360 65536 131072
65536 1816871 65536 131072 65536 655360 65536
131072 65536 2073833 65536 131072 65536 655360
65536 131072 65536 1816871 65536 131072 65536
655360 65536 131072 65536

Isn't that strange - after scaling to BYTE each histogram bin should contain the same number of values, just like the original histogram. This is not a prblem if I set n no 10^7.

Cheers, Klemen
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using OOB Colors with Filled Contour Plots
Next Topic: IDLDE crashes when opening menus

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

Current Time: Wed Oct 08 19:33:02 PDT 2025

Total time taken to generate the page: 0.00477 seconds