add_rmg

USAGE add_rmg infile1 infile2 outfile width length sign conserve

sign: 1 (add) or -1 (subtract)
conserve: 1 makes out phase = zero if phase from either file is zero

infiles must be of same width and length, in rmg format.
rmg format contains alternating real and imaginary lines of real and imaginary pixels
Lines contain width pixels.
FUNCTION Add or subtract rmg image files.
PROCESS From infile1 we have line in_amp1 and line in_phi1 with width pixels each.
From infile2 we have line in_amp2 and line in_phi2 with width pixels each.
print lines of out_ampand out_phi to outfile

For each pixel:
out_amp = in_amp1
out_phi = in_phi1 + sign*in_phi2
unless conserve = 1,
then if in_phi1 = in_phi2 = 0, out_phi = 0;
CALLED BY add_rmg.pl
FILES USED infile1
infile2
FILES CREATED outfile


LAST UPDATE May 29, 1998
This software is part of the JPL/Caltech ROI_PAC suite.
Not for general distribution.
For more info:
roi_pac@gps.caltech.edu
roi_pac@jpl.nasa.gov