SCL Function
Emulates BYTSCL function but for all integer and floating point data types.
Usage
out_array = SCL(in_array, top, ... keywords)
Input Parameters
in_array—Array to be scaled (can be of any valid dimension).
top—The maximum value of the scaled result.
Keyword Parameters
Base—The minimum value of the scaled result. If not specified, zero is used.
Max—The maximum value of array elements to be considered. If not specified, array is searched for its largest value.
Min—The minimum value of array elements to be considered. If not specified, array is searched for its smallest value.
Type—If present and non zero, specifies the output data type.
1—BYTE
2—INTEGER
3—LONG
4—FLOAT
5—DOUBLE
13–INT32
Byte—If present and non zero, specifies output data type BYTE.
Integer—If present and non zero, specifies output data type INTEGER.
Long—If present and non zero, specifies output data type LONG.
Float—If present and non zero, specifies output data type FLOAT.
Double—If present and non zero, specifies output data type DOUBLE.
I32—If present and non zero, specifies output data type INT32.
Returned Value
out_array—A copy of in_array whose values have been scaled.
Example
This example scales the in_array (0..99) into the range -50 to 50, considering only data values between 25 and 75.
in_array = INDGEN(100)
out_array = SCL(in_array, 50, Base=-50, Min=25, Max=75)