%N flipper %F $MIR/src/subs/calphase.for
%D Flip phases into a continuous string
%: calibration, line up phases
%P lgm
%B
        SUBROUTINE flipper(timave,timmax,basediff)

        REAL    timave,timmax
        INTEGER basediff(2,*)

   Input:
       timave    max time interval allowed between data points within
                     a group of points to be vector averaged
                     if timave=0, it is set to 4 minutes
       timmax    max time interval over which to vector average data
                     if timmax=0, it is set to 20 minutes

   Output:
       basediff  dummy array output for compatability - all zeros

   Flipper attempts to correct the phases for phase wrapping
   It uses vector averaging, and hence needs to be supplied
   with an array specifiying how vector averaging is done.
   The source code is full of witty comments how it really
   works.
