#! /usr/local/bin/pvtool

#define DOUBLE_INPUT 1
#define EXTRA_PARAMETERS 0

#define USAGE_MESSAGE "\
\tapplyenv <pv input file> <pv input envelope file> <pv output file>\n\
\n\
This utility does not strip the envelope off the first input file before\n\
applying the envelope.\n"

int
pvaction (void)
{
  int i, j;
  for (i = 0; i < OUTPUT_FRAMES; i++)
    for (j = 0; j < bins; j++)
      {
	OUTPUT_PHIDOT (i, j) = INPUT1_PHIDOT (i, j);
	OUTPUT_MAG (i, j) = INPUT1_MAG (i, j) * INPUT2_MAG (i, j);
      }
  return (0);
}
