%N zedrho %F $MIR/src/subs/zed.for
%D Estimate Zeeman splitting, for spectrally correlated noise.
%P nebk
%: zeeman
%B
      subroutine ZedRho(mode,ispect,vspect,m,n,rho,a,b,siga,sigb,sigi,
     *                                        convrg)

      character mode*(*)
      integer m,n
      real ispect(m),vspect(m),rho,a,b,siga,sigb,sigi
      logical convrg
  ---------------------------------------------------------------------
  This finds the maximum likelihood solution, when there is correlation
  between adjacent channels.  This performs a proper treatment.  There
  are no approximations.

  Inputs:
    ispect,vspect Measured I and V spectra.
    m          Number of data points in the I and V spectra.
    n          Number of spectra. Currently this must be 1.
    mode       Currently ignored.
    rho        Channel-to-channel correlation coefficient.
  Output:
    a,b        Estimated a and b parameters.
    siga,sigb  Estimates of the error in a and b.
    sigi       Estimate of the rms noise.
    convrg     True if the procedure converged.  It is generally safe
               to ignore this.  Even when it indicates the algorithm
               has failed to converge, it actually means that it is
               essentially at the minimum, but not all conditions for
               convergence have yet to be satisfied.
  Limitations:
    Unlike Zed, this does not handle multiple spectra, leakage terms,
    2-sided derivative nor does it do extra searching to avoid spurious
    minima. Its estimate of siga is not as good as Zed's. Generally
    it is faster and just as accurate (more accurate in siga) to call
    the combination of Zed and ZedFudge.
