959bb1a6cd3e02463c06fb04ca1195bc6b3bc7b6,dipy/reconst/tests/test_shm.py,,test_real_full_sh_basis,#,163

Before Change


    sphere = Sphere(xyz=np.vstack((vertices, -vertices)))
    // Asymmetric spherical function composed of a hemisphere with a radius
    // of 1 and a hemisphere with a radius of 0.5
    sf = np.ones(sphere.vertices.shape[0])
    sf[np.int(vertices.shape[0]):] *= 0.5

    B, m, n = real_full_sh_basis(9, sphere.theta, sphere.phi)
    invB = smooth_pinv(B, L=np.zeros_like(n))
    sh_coefs = np.dot(invB, sf)

After Change


def test_real_full_sh_basis():
    vertices = hemi_icosahedron.subdivide(2).vertices
    mevals = np.array([[0.0015, 0.0003, 0.0003], [0.0015, 0.0003, 0.0003]])
    angles = [(0, 0), (60, 0)]
    odf = multi_tensor_odf(vertices, mevals, angles, [50, 50])

    mevals = np.array([[0.0015, 0.0003, 0.0003]])
    angles = [(0, 0)]
    odf2 = multi_tensor_odf(-vertices, mevals, angles, [100])

    sphere = Sphere(xyz=np.vstack((vertices, -vertices)))
    // Asymmetric spherical function with 162 coefficients
    sf = np.append(odf, odf2)

    // In order for our approximation to be precise enough, we
    // will use a SH basis of orders up to 10 (121 coefficients)
    B, m, n = real_full_sh_basis(10, sphere.theta, sphere.phi)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: nipy/dipy
Commit Name: 959bb1a6cd3e02463c06fb04ca1195bc6b3bc7b6
Time: 2020-07-20
Author: charles.poirier@usherbrooke.ca
File Name: dipy/reconst/tests/test_shm.py
Class Name:
Method Name: test_real_full_sh_basis


Project Name: NifTK/NiftyNet
Commit Name: 5af1994def9a52fe1ffd2847b2519f1e27cfbc64
Time: 2017-08-12
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/misc_io.py
Class Name:
Method Name: do_resampling


Project Name: nipy/dipy
Commit Name: 959bb1a6cd3e02463c06fb04ca1195bc6b3bc7b6
Time: 2020-07-20
Author: charles.poirier@usherbrooke.ca
File Name: dipy/reconst/tests/test_shm.py
Class Name:
Method Name: test_real_full_sh_mrtrix