scipy.special.sph_harm 是计算球谐函数的数值。当参数取值过大,精确度失控,可能会出现'nan'结果。换...
r, theta, phi = cart2sphere(x, y, z)# Find the sh coefficients to smooth the signalB_dwi = real_sph_harm(m, n, theta[:,None], phi[:,None]) invB = smooth_pinv(B_dwi, np.sqrt(regul) * L) sh_coeff = np.dot(data[..., idx], invB.T)# Find the smoothed signal from ...