[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function BYTSCL



David Fanning (davidf@dfanning.com) writes:

> What BYTSCL does is take the data, finds the minimum
> and maximum of the data, then linearly maps the min
> and max to 0 and 255. This is the scaling function.
> Then, it adds a translation to the scaled vector, so
> that the minimum value is set to zero. Then, it converts
> the whole thing to BYTE type.

I was driving home from the bookstore trying to think
of an excuse to give my wife for why I was 45 minutes
late picking up my son from school, when it suddenly
occurred to me that this problem is *exactly* like
trying to convert Fahrenheit to Celsius degrees!

Funny how and when these things come to you, isn't it. :-)

Cheers,

David

-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155