%N uvgetbl %F $MIR/src/subs/uvgetbl.for
%D Get the baseline number, and conjugate the data if needed.
%P mchw
%: uv-i/o, uv-data, uv-selection
%B
        subroutine uvgetbl(preambl,data,nread,bl)

        implicit none
        integer nread,bl
        double precision preambl(4)
        complex data(nread)

  Determine the baseline number, and conjugate the data if necessary.
  The baseline number is a number between 1 and N*(N-1)/2 for
  pure cross correlating pairs.
  This routine does not allow auto-correlations to occur in the data.

  Input:
    nread      The number of channels.
  Output:
    bl         baseline number.
  Input/Output:
    preambl    Preamble.
    data       The correlation data to be averaged.
