DATAMANIP commands


PROGRAM NAME

kclipout - Clip Data Values Outside of the Specified Range

DESCRIPTION

The Clip Outside operator (kclipout) performs clipping on the Input data object (i) outside of the range defined by the specified Lower and Upper Cutoff Values (lc, uc). All data values in the Input object that are LESS THAN the Lower Cutoff are set to the Lower Cutoff in the resulting Output object, unless the alternate "Lower Cutoff Output Value" (fval) is explicitly provided. If this value is provided, clipped data are set to that value instead of the Lower Cutoff. Likewise, data values GREATER THAN the Upper Cutoff are set to the Upper Cutoff, unless the alternate "Upper Cutoff Output Value" is explicitly provided. All other data remain the same.

The following histogram defines the clipping operation.


                                |<-A->|<-B->|<-C->|
                                |     | :   | .   |
                                |    .:.:.  .:::  |
                                |:. .::::::.::::: |
                                |::::::::::::::::.|
                                ------|-----|------
                                     lc     uc
 
        A:  if value <  lc                  output = lc or fval
        B:  if value >= lc AND value <= uc  output = input
	C:  if value >  uc                  output = uc or tval

P "Data Type" 5 The data type of the output object is the same as the input object's data type. Internally, the data is processed using one of the following: unsigned byte, long, unsigned long, double, or double complex. Data will not be cast to a lower type for processing.

Map Data If the input object contains a map, then the operation is performed on the map data. If the input object does not have a map but has value data, then the operation is performed on the value data.

Validity Mask If there is a validity mask associated with the input object, the mask is transferred to the output object. To decrease processing time, the operation will still be performed on those data that have corresponding mask values equal to zero. If the data under the mask is genuinely fInotfP processable, such as NaN or infinity, the user can specify that a value be substituted in place of the original value when it is accessed. The masked data substitution attributes for a data object can be explicitly set and stored using the fISet AttributefP operator, DATAMANIP::ksetdattr.

Explicit Location and Time Data If the input object has time data or location data, it is transferred to the output object.

Failure Modes This program fails if the input object lacks both map data and value data.

Executing Clip Outside runs the program kclip with the -thresh option set to FALSE (-thresh 0).

REQUIRED ARGUMENTS

-i
type: infile
desc: Input file
-o
type: outfile
desc: output file

OPTIONAL ARGUMENTS

-lc
type: double
desc: Lower cutoff value
default: 64
bounds: no range checking
-uc
type: double
desc: Upper cutoff value
default: 128
bounds: no range checking
-fval
type: double
desc: Output value when data is LESS THAN lower cutoff
default: 0
bounds: no range checking
-tval
type: double
desc: Output value when data is GREATER THAN upper cutoff
default: 1
bounds: no range checking

EXAMPLES

SEE ALSO

DATAMANIP::kclipabove, DATAMANIP::kclipbelow, DATAMANIP::kclipin, DATAMANIP::kmegaclip, DATAMANIP::kclip

RESTRICTIONS

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.