%N oneamp %F $MIR/src/subs/uvsubs.for
%D Convert visibility to amp/phase or real/imag
%P mchw
%: complex-data, uv-data
%B
        real function oneamp(vis,flag)

        implicit none
        complex vis
        character*(*) flag

  Converts a complex vis to 'Amp' 'Phase' 'Real' 'Imag' part.

  Input:
    vis        complex,input)   visibility
    flag       One of : 'a' 'p' 'r' 'i'
  Output:
               The amplitude, phase(degrees), real, or imaginary part.
