parameters: (A, mu, sigma, x, y, bg)
docstring: bvg is the bivariate gaussian.  This function is a convenient wrapper for
      multivariate_normal.
      Intput:
          A: amplitude
          mu: 2 element array containing [muX, muY]
          sigma: SIGMA matrix [[sigX**2, sigX*sigY*sigP],[sigX*sigY*sigP,sigY**2]]
          x: numy array containing the x coordinates (e.g. theta for detector space)
          y: numy array containing the y coordinates (e.g. phi_az for detector space)
          bg: constant for the background
      Output:
          a numpy array with the same shape as x.  If sigma is not positive-definite,
          this array will contain all zeros.  Otherwise, the BVG will be evaluated
          at each point at the value is returned.
docstring_summary: bvg is the bivariate gaussian.  This function is a convenient wrapper for
      multivariate_normal.
      Intput:
          A: amplitude
          mu: 2 element array containing [muX, muY]
          sigma: SIGMA matrix [[sigX**2, sigX*sigY*sigP],[sigX*sigY*sigP,sigY**2]]
          x: numy array containing the x coordinates (e.g. theta for detector space)
          y: numy array containing the y coordinates (e.g. phi_az for detector space)
          bg: constant for the background
      Output:
          a numpy array with the same shape as x.  If sigma is not positive-definite,
          this array will contain all zeros.  Otherwise, the BVG will be evaluated
          at each point at the value is returned.
docstring_tokens: bvg is the bivariate gaussian . This function is a convenient wrapper for multivariate_normal . Intput : A : amplitude mu : 2 element array containing [ muX muY ] sigma : SIGMA matrix [[ sigX ** 2 sigX * sigY * sigP ] [ sigX * sigY * sigP sigY ** 2 ]] x : numy array containing the x coordinates ( e . g . theta for detector space ) y : numy array containing the y coordinates ( e . g . phi_az for detector space ) bg : constant for the background Output : a numpy array with the same shape as x . If sigma is not positive - definite this array will contain all zeros . Otherwise the BVG will be evaluated at each point at the value is returned .
function: def bvg(A, mu, sigma, x, y, bg):
      """
      bvg is the bivariate gaussian.  This function is a convenient wrapper for
      multivariate_normal.
      Intput:
          A: amplitude
          mu: 2 element array containing [muX, muY]
          sigma: SIGMA matrix [[sigX**2, sigX*sigY*sigP],[sigX*sigY*sigP,sigY**2]]
          x: numy array containing the x coordinates (e.g. theta for detector space)
          y: numy array containing the y coordinates (e.g. phi_az for detector space)
          bg: constant for the background
      Output:
          a numpy array with the same shape as x.  If sigma is not positive-definite,
          this array will contain all zeros.  Otherwise, the BVG will be evaluated
          at each point at the value is returned.
      """
  
      if is_pos_def(sigma):
          f = bivariate_normal(x, y, sigmax=np.sqrt(sigma[0, 0]), sigmay=np.sqrt(sigma[1, 1]),
                               sigmaxy=sigma[1, 0], mux=mu[0], muy=mu[1])
          return A * f + bg
      else:
          system.information('   BVGFT:bvg:not PSD Matrix')
          return 0.0 * np.ones_like(x)
function_tokens: def bvg ( A , mu , sigma , x , y , bg ) : if is_pos_def ( sigma ) : f = bivariate_normal ( x , y , sigmax = np . sqrt ( sigma [ 0 , 0 ] ) , sigmay = np . sqrt ( sigma [ 1 , 1 ] ) , sigmaxy = sigma [ 1 , 0 ] , mux = mu [ 0 ] , muy = mu [ 1 ] ) return A * f + bg else : system . information ( '   BVGFT:bvg:not PSD Matrix' ) return 0.0 * np . ones_like ( x )