DATAMANIP commands
PROGRAM NAME
karith1 - Single Operator Pointwise Arithmetic
DESCRIPTION
karith1 performs the operation specified by the operator flag (-abs,
-sqrt, etc.) on each point in the input data object, Input.
The karith1 operators are: absolute value, square root, cube root,
negative, reciprocal, ceiling, floor, truncate, fraction, lgamma, error
function, complementary error function, bitwise NOT, bitwise CLEAR,
bitwise SET,
sine, arc-sine, cosine, arc-cosine, tangent, arc-tangent, hyperbolic
sin and arc-sine, hyperbolic cosine and arc-cosine, hyperbolic tangent and
arc-tangent, and the sinc (sin(x)/x) function.
Data Type
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.
REQUIRED ARGUMENTS
- -i
-
type: infile
desc: input data object
- -o
-
type: outfile
desc: resulting output data object
Mutually Exclusive Group; you must specify ONE of:
- -abs
-
type: flag
desc: Output = Absolute Value of input
OR
- -sin
-
type: flag
desc: Output = Sine of Input
OR
- -sqrt
-
type: flag
desc: Output = Square Root of Input
OR
- -asin
-
type: flag
desc: Output = Arc Sine of Input
OR
- -cbrt
-
type: flag
desc: Output = Cube Root of Input
OR
- -cos
-
type: flag
desc: Output = Cosine of Input
OR
- -neg
-
type: flag
desc: Output = Negative of Input
OR
- -acos
-
type: flag
desc: Output = Arc Cosine of Input
OR
- -recip
-
type: flag
desc: Output = Reciprocal of Input
OR
- -tan
-
type: flag
desc: Output = Tangent of Input
OR
- -ceil
-
type: flag
desc: Output = integer Ceiling of Input
OR
- -atan
-
type: flag
desc: Output = Arc Tangent of Input
OR
- -floor
-
type: flag
desc: Output = Integer Floor of Input
OR
- -sinh
-
type: flag
desc: Output = Hyperbolic Sine of Input
OR
- -trunc
-
type: flag
desc: Output = integer Truncate of Input
OR
- -asinh
-
type: flag
desc: Output = Hyperbolic Arc Sine of Input
OR
- -fract
-
type: flag
desc: Output = Fractional Part of Input
OR
- -cosh
-
type: flag
desc: Output = Hyperbolic Cosine of Input
OR
- -lgamma
-
type: flag
desc: Output = Natural log of Gamma Function of Input
OR
- -acosh
-
type: flag
desc: Output = Hyperbolic Arc Cosine of Input
OR
- -erf
-
type: flag
desc: Output = Error Function of Input
OR
- -tanh
-
type: flag
desc: Output = Hyperbolic Tangent of Input
OR
- -erfc
-
type: flag
desc: Output = Complementary Error Function of Input
OR
- -atanh
-
type: flag
desc: Output = Hyperbolic Arc Tangent of Input
OR
- -sinc
-
type: flag
desc: Output = Sinc Function: sin(x)/x
OR
- -not
-
type: flag
desc: Bitwise NOT operation
OR
- -clear
-
type: flag
desc: Bitwise CLEAR: set all valid bits to 0
OR
- -set
-
type: flag
desc: Bitwise SET: set all valid bits to 1
OPTIONAL ARGUMENTS
none
EXAMPLES
SEE ALSO
RESTRICTIONS
Operations on complex data are not supported at this time.
For the bitwise operations (not, set, clear), if the source data is
floating point, it is cast to long integer before processing. This
may result in loss of precision. A warning will be presented on the standard
output if this condition occurs.
REFERENCES
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.