%N phaseamp %F $MIR/src/subs/calphase.for
%D Convert to phase/amplitude
%: calibration, phases
%P pjt
%B
        SUBROUTINE phaseamp( nbase, basediff, mark )

        INTEGER nbase, basediff(2, *)
        LOGICAL mark

       PhaseAmp converts the Rdata() from Real-Imag to Amp-Phase
       and also returns a list of 2pi wraps needed for closure
 NOTE:
       It's use is now OBSOLETE since the new flipper(). A bug('w',
       is called when phaseamp is used!
       
  Inputs:
       nbase    -- number of baselines used in basediff array
       mark     -- whether to also mark unclosed data as bad in 'rflags'

  Outputs:
       basediff -- list of 2pi wraps needed for closure
