def test_geodesic_riemann_0(): """Test riemannian geodesic when alpha = 0""" A = 0.5*np.eye(3) B = 2*np.eye(3) assert_array_almost_equal(geodesic_riemann(A,B,0),A)
def test_geodesic_riemann_1(): """TTest riemannian geodesic when alpha = 1""" A = 0.5*np.eye(3) B = 2*np.eye(3) assert_array_almost_equal(geodesic_riemann(A,B,1),B)
def test_geodesic_riemann_middle(): """Test riemannian geodesic when alpha = 0.5""" A = 0.5*np.eye(3) B = 2*np.eye(3) Ctrue = np.eye(3) assert_array_almost_equal(geodesic_riemann(A,B,0.5),Ctrue)
def test_alm_mean_2matrices(get_covmats): """Test the ALM mean with 2 matrices""" n_matrices, n_channels = 2, 3 covmats = get_covmats(n_matrices, n_channels) C = mean_alm(covmats) assert np.all(C == geodesic_riemann(covmats[0], covmats[1], alpha=0.5))