code: def discrim(x):
      
      X=np.real(x)        # X is the real part of the received signal
      Y=np.imag(x)        # Y is the imaginary part of the received signal
      b=np.array([1, -1]) # filter coefficients for discrete derivative
      a=np.array([1, 0])  # filter coefficients for discrete derivative
      derY=signal.lfilter(b,a,Y)  # derivative of Y, 
      derX=signal.lfilter(b,a,X)  #    "          X,
      disdata=(X*derY-Y*derX)/(X**2+Y**2)
      return disdata
docs: function disdata = discrim(x)
      where x is an angle modulated signal in complex baseband form.
      
      Mark Wickert