Help for F2COMP

PURPOSE:
  F2COMP is a special purpose VICAR program to handle arithmetic
  operations on complex input data. It will take a most two input
  data sets.  The operations available are:
       ADD   (complex+complex, or complex+real)
       SUB   (complex-complex, or complex-real, or real-complex)
       MULT  (complex*complex, or complex*real, or real*complex)
       DIV   (complex/complex, or complex/read, or real/complex)
       CABS  (absolute value of complex input, output=real*4)
       CONJ  (complex conjugate of complex input, output=complex)
       COMP  (1st data set will be real, 2nds data set will be complex)
       REAL2COMPREAL
             (turns a real data set into a complex real data set)
       REAL2COMPIMAG
             (turns a real data set into a complex imaginary data set)
       COMP2REAL
             (extracts the real part of the complex data set and
              stores it as a real data set)
       COMP2IMAG
             (extracts the imaginary part of the complex data set
              and stores it as a real data set)
In mixed real and complex operations, the output will always be
COMPLEX*8. In mixed operations, real values are coverted to complex
with zero imaginary part before the operation is carried out.
Divide by zero protection is accomplished by setting the result
of an attempted divide-by-zero to zero on output.
EXECUTION:

  F2COMP  INP  OUT  PARAMS

  where INP and OUT are input and output file parameters, and PARAMS are
  the usual size field parameters plus the keyword OP. For example:

  f2comp inp=(A,B) out=C op=mult

  If the input data sets are of different size, F2COMP will truncate to
  the smallest number of lines and smallest number of samples in the
  two images.

TIMING: 
  As fast as C can read and write the lines.  

ORIGINAL PROGRAMMER:     P. KIM          22 Oct 2007
Based on the version by: J.E. Solomon    02 Apr 1985

REVISIONS:
  2007-11-29 P. Kim - Modified and delivered to vdev
  2007-12-29 W. Bunch - Switched to USES_ANSI_C AND LIB_CARTO; misc cleanup
  2009-07-07 P. Kim - Fixed format string length from 5 to 8
  2015-11-24 W. Bunch - Migrated to MIPL
 

PARAMETERS:


INP

Input file name.

OUT

Output file name.

SIZE

Standard VICAR size field

SL

Starting Line.

SS

Starting Sample.

NL

Number of Lines.

NS

Number of Samples.

OP

Operation to be performed; allowed strings are: add, sub, mult, div, cabs, conj, comp, real2compreal, real2compimag, comp2real, comp2imag

SCALAR

Specifies whether to perform a scalar operation instead of a complex operation

See Examples:


Cognizant Programmer: