Example #1
0
def test_real_sym_sh_mrtrix():
    coef, expected, sphere = mrtrix_spherical_functions()

    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter("always")
        basis, m, n = real_sym_sh_mrtrix(8, sphere.theta, sphere.phi)

    npt.assert_equal(len(w), 2)
    npt.assert_(issubclass(w[0].category, DeprecationWarning))
    npt.assert_(
        "dipy.reconst.shm.real_sym_sh_mrtrix is deprecated, Please use "
        "dipy.reconst.shm.real_sh_tournier instead" in str(w[0].message))
    npt.assert_(issubclass(w[1].category, PendingDeprecationWarning))
    npt.assert_(tournier07_legacy_msg in str(w[1].message))

    func = np.dot(coef, basis.T)
    assert_array_almost_equal(func, expected, 4)
Example #2
0
def test_real_sym_sh_mrtrix():
    coef, expected, sphere = mrtrix_spherical_functions()
    basis, m, n = real_sym_sh_mrtrix(8, sphere.theta, sphere.phi)
    func = np.dot(coef, basis.T)
    assert_array_almost_equal(func, expected, 4)
Example #3
0
def test_real_sym_sh_mrtrix():
    coef, expected, sphere = mrtrix_spherical_functions()
    basis, m, n = real_sym_sh_mrtrix(8, sphere.theta, sphere.phi)
    func = np.dot(coef, basis.T)
    assert_array_almost_equal(func, expected, 4)