#! /usr/local/bin/pvtool

#define EXTRA_PARAMETERS 0
#define NO_OUTPUT 1

int
pvaction (void)
{
  int i, j;
  float tot_freq, tot_mag;
  for (j = 0; j < bins; j++)
    {
      tot_freq = tot_mag = 0;
      for (i = 0; i < INPUT1_FRAMES; i++)
	{
	  tot_freq += INPUT1_PHIDOT (i, j);
	  tot_mag += INPUT1_MAG (i, j);
	}
      printf ("Bin Freq: %f\tAv Freq: %f\tAv Mag: %f\n",
	      bin_to_freq (j),
	      tot_freq / (float) INPUT1_FRAMES,
	      tot_mag / (float) INPUT1_FRAMES);
    }
  return (0);
}
