code: def test_circle():
      def hx(x):
          return np.array([x[0], x[3]])
  
      F = np.array(
          [
              [1.0, 1.0, 0.5, 0.0, 0.0, 0.0],
              [0.0, 1.0, 1.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 1.0, 0.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 1.0, 1.0, 0.5],
              [0.0, 0.0, 0.0, 0.0, 1.0, 1.0],
              [0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
          ]
      )
  
      def fx(x, dt):
          return np.dot(F, x)
  
      x = np.array([50.0, 0.0, 0, 0, 0.0, 0.0])
      P = np.eye(6) * 100.0
      f = EnKF(x=x, P=P, dim_z=2, dt=1.0, N=30, hx=hx, fx=fx)
  
      std_noise = 0.1
  
      f.R *= std_noise**2
      f.Q[0:3, 0:3] = Q_discrete_white_noise(3, 1.0, 0.001)
      f.Q[3:6, 3:6] = Q_discrete_white_noise(3, 1.0, 0.001)
  
      measurements = []
      results = []
  
      zs = []
      for t in range(0, 300):
          a = t / 300000
          x = cos(a) * 50.0
          y = sin(a) * 50.0
          # create measurement = t plus white noise
          z = np.array([x, y])
          zs.append(z)
  
          f.predict()
          f.update(z)
  
          # save data
          results.append(f.x)
          measurements.append(z)
  
      # test that __repr__ doesn't assert
      str(f)
  
      results = np.asarray(results)
      measurements = np.asarray(measurements)
  
      if DO_PLOT:
          plt.plot(results[:, 0], results[:, 2], label="EnKF")
          plt.plot(
              measurements[:, 0], measurements[:, 1], c="r", label="z"
          )
          # plt.plot (results-ps, c='k',linestyle='--', label='3$\sigma$')
          # plt.plot(results+ps, c='k', linestyle='--')
          plt.legend(loc="best")
          plt.axis("equal")
  
file_path: filterpy/filterpy/kalman/tests/test_enkf.py
imports: from numpy.random import randn
  import numpy
  import matplotlib.pyplot
  from filterpy.kalman import EnsembleKalmanFilter
  from filterpy.common import Q_discrete_white_noise, Saver
  from math import cos, sin
label_desc: Use image node_id 2 for calling a global function with example usage: test_circle() and returns: np, np