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

Home » Public Forums » archive » BYTSCL function
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: BYTSCL function [message #91276 is a reply to message #91269] Thu, 25 June 2015 07:20 Go to previous message
Dick Jackson is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Extraction from *.txt file
Next Topic: HELP with IF statement

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

Current Time: Fri Oct 10 00:43:00 PDT 2025

Total time taken to generate the page: 0.48229 seconds