strange behaviour of bytscl by large arrays [message #79963] |
Mon, 23 April 2012 07:01  |
Klemen
Messages: 80 Registered: July 2009
|
Member |
|
|
Hi folks,
is there any explanation of why I don't get the same or at least similar results using the code below by:
a) using DINDGEN in line 3
b) using FINDGEN in line 3
pro test
s = 10000
a = sin(findgen(s, s)/100000.)
b = bytscl(a)
write_tiff, 'b.tif', b
end
The tif file I get using the DINDGEN function has waves all over the image. The option using FINDGEN produces strange results (a couple of waves and then wide bands of constant values). See the following link for the (resized) results.
https://picasaweb.google.com/112572300011512591455/Eumetsat# 5734593216558178098
I came across this problem as I tried to scale (using HIST_EQUAL and BYTSCL functions) 16-bit 5-band RapidEye data to 24-bit RGB image. Scaling the whole image produced results that were all black, smaller subsets seemed ok.
Does anybody have a suggestion how to handle this issue?
Cheers, Klemen
|
|
|