%N getxy %F $MIR/src/subs/getxy.for
%D Return information on the XY phase of a dataset.
%P rjs
%: utilities
%B
        subroutine GetXY(tno,fac,xyphase,count,mxant,nants)

        implicit none
        integer tno,mxant,nants,count(mxant)
        real xyphase(mxant),fac

  This determines the average XY phase, and its standard deviation, of
  the gains of a visibility data-set. The information is derived
  from the "gains" item.

  Input:
    tno        Handle of the input visibility data-set.
    mxant      Max number of antennae.
  Output:
    fac        RMS gain amplitude.
    xyphase    Mean xyphase, in radians.
    count      Number of gains used in the average. This can be 0!
    nants      Number of antenna found. This will be zero of the xyphase
               could not be determined at all.
