DATAMANIP commands


PROGRAM NAME

kreal2cmplx - Output = Input 1 + j(Input 2)

DESCRIPTION

The Real to Complex operator (kreal2cmplx) generates a complex Output object (o) containing complex data compiled from the supplied source object(s), Real Input (i1) and Imaginary Input (i2). The data type of the output, which will be complex or double complex, is determined from the highest of the source data types. Only one source object must be specified.

Single Source Object: If only one source object is specified, the other component of the complex pair will be the Real Constant (real) or Imaginary Constant (imag). If the source object has map data, the operation will be performed on the map only. For the single source case, location, time, and mask data are not needed or modified.

Two Source Objects If both real and imaginary source objects are specified, and both contain map data and no value data the operation is performed directly on the map, and the output object will contain a map. For this case of two sources that have no value data, location, time, and mask data are not modified, but are transferred to the output.

If either source object contains both map and value data, then both objects must have value data, and the data will be mapped before processing. The output object will have value data and no map data.

If the source objects are the same size, then location and time data can be ignored.

If the source objects are different sizes, then location and time data are checked, and if they exist, the real to complex conversion will only continue if the grid type is uniform. The destination size will be the maximum of both source sizes. If padding is required by the Real Input object, it will be padded with the Real Constant. If padding is required by the Imaginary Input, it will be padded with the Imaginary Constant.

Validity Mask If either source object has a validity mask, the destination object will get a mask. If both source objects have masks, the masks will be combined (logical AND) after processing.

Failure Modes Real to complex conversion will fail if neither source object is supplied; if the source objects do not contain at least value or map data; or if either source object is already complex.

REQUIRED ARGUMENTS

-o
type: outfile
desc: Resulting output data object

Group; you must specify AT LEAST ONE of:

-i1
type: infile
desc: Input to be used as real component
default: {none}
AND/OR
-i2
type: infile
desc: Input to be used as imaginary component
default: {none}

OPTIONAL ARGUMENTS

-real
type: double
desc: Value to be used as real component if no i1, or if padding occurs
default: 0
bounds: no range checking
-imag
type: double
desc: Value to be used as imaginary component if no i2, or if padding occurs
default: 0
bounds: no range checking

EXAMPLES

SEE ALSO

RESTRICTIONS

REFERENCES

COPYRIGHT

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