BYTSCL function [message #91269] |
Thu, 25 June 2015 04:41  |
g.nacarts
Messages: 148 Registered: November 2013
|
Senior Member |
|
|
I am using the BYTSCL function to scale all values of my array and also because I want to be returned in byte type.
For the array A with max = 4745.34 and min = -726643. I used the BYTSCL(A, min=0., max=160.)
For the array B with max = 7.82217e+007 and min = -5.47788e+008 I tried to used only BYTSCL(B) but my image is not good. I guess that's because the max and min values are very large and small respectively?
|
|
|
|
Re: BYTSCL function [message #91276 is a reply to message #91269] |
Thu, 25 June 2015 07:20  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
On Thursday, 25 June 2015 04:41:18 UTC-7, g.na...@gmail.com wrote:
> I am using the BYTSCL function to scale all values of my array and also because I want to be returned in byte type.
>
> For the array A with max = 4745.34 and min = -726643. I used the BYTSCL(A, min=0., max=160.)
>
> For the array B with max = 7.82217e+007 and min = -5.47788e+008 I tried to used only BYTSCL(B) but my image is not good. I guess that's because the max and min values are very large and small respectively?
(You didn't say in what way your "image is not good", so we have to guess... please clarify if we are guessing wrong)
Careful with those keywords to BYTSCL(): MIN= and MAX= refer to the *original* data values, which will come out in the result as 0 and 255, respectively (all original values at or below 0 would come out black, values above 160 would come out white). I wonder if you actually want the result that you'd get with simply using BYTSCL(A) and BYTSCL(B), where the extreme values are the only ones that are black or white, everything else in shades of grey.
If you were meaning that 0-160 is the range you want for the output values, then TOP=160 is the keyword to add.
Cheers,
-Dick
Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com
|
|
|