Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
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?
g.nacarts@gmail.com writes: > 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? Linear scaling on such images may result in low-contrast images. You may prefer a log-type scaling to improve the visual result: http://www.idlcoyote.com/ip_tips/xstretch.php Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Sepore ma de ni thue. ("Perhaps thou speakest truth.")
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