예제 #1
0
def test_mapmri_isotropic_design_matrix_separability(radial_order=6):
    gtab = get_gtab_taiwan_dsi()
    tau = 1 / (4 * np.pi ** 2)
    qvals = np.sqrt(gtab.bvals / tau) / (2 * np.pi)
    q = gtab.bvecs * qvals[:, None]
    mu = 0.0003  # random value

    M = mapmri.mapmri_isotropic_phi_matrix(radial_order, mu, q)
    M_independent = mapmri.mapmri_isotropic_M_mu_independent(radial_order, q)
    M_dependent = mapmri.mapmri_isotropic_M_mu_dependent(radial_order, mu,
                                                         qvals)
    M_reconstructed = M_independent * M_dependent

    assert_array_almost_equal(M, M_reconstructed)
예제 #2
0
def test_mapmri_isotropic_design_matrix_separability(radial_order=6):
    gtab = get_gtab_taiwan_dsi()
    tau = 1 / (4 * np.pi**2)
    qvals = np.sqrt(gtab.bvals / tau) / (2 * np.pi)
    q = gtab.bvecs * qvals[:, None]
    mu = 0.0003  # random value

    M = mapmri.mapmri_isotropic_phi_matrix(radial_order, mu, q)
    M_independent = mapmri.mapmri_isotropic_M_mu_independent(radial_order, q)
    M_dependent = mapmri.mapmri_isotropic_M_mu_dependent(
        radial_order, mu, qvals)
    M_reconstructed = M_independent * M_dependent

    assert_array_almost_equal(M, M_reconstructed)
예제 #3
0
def test_mapmri_isotropic_design_matrix_separability(radial_order=6):
    gtab = get_gtab_taiwan_dsi()
    tau = 1 / (4 * np.pi**2)
    qvals = np.sqrt(gtab.bvals / tau) / (2 * np.pi)
    q = gtab.bvecs * qvals[:, None]
    mu = 0.0003  # random value

    with warnings.catch_warnings():
        warnings.filterwarnings("ignore",
                                message=descoteaux07_legacy_msg,
                                category=PendingDeprecationWarning)
        M = mapmri.mapmri_isotropic_phi_matrix(radial_order, mu, q)
        M_independent = mapmri.mapmri_isotropic_M_mu_independent(
            radial_order, q)
    M_dependent = mapmri.mapmri_isotropic_M_mu_dependent(
        radial_order, mu, qvals)
    M_reconstructed = M_independent * M_dependent

    assert_array_almost_equal(M, M_reconstructed)