You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was converting ODFs files, saved using spherical harmonics (SH), from the MRtrix3 format (Tournier) to DIPY (Descoteaux) and had issue with this function. It currently flips the SH coefficients when m is odd and <0 : out_sh_coeffs = sh_coeffs * np.where(m < 0, (-1.)**m, 1.).
However, I noticed that the coeffifient that I needed to flip to get a working files were the 'even' m numbers. As mentionned in the DIPY theory (https://dipy.org/documentation/1.4.0./theory/sh_basis/) : "the effect of this change is a sign flip for the SH functions of even degree m<0".
If I understand correctly, shouldn't the code line be replaced with out_sh_coeffs = sh_coeffs * np.where(m < 0, -1*(-1.)**m, 1.) ?
With:
DIPY==1.5.0
MRtrix==3.0.2
The text was updated successfully, but these errors were encountered:
Description
I was converting ODFs files, saved using spherical harmonics (SH), from the MRtrix3 format (Tournier) to DIPY (Descoteaux) and had issue with this function. It currently flips the SH coefficients when m is odd and <0 :
out_sh_coeffs = sh_coeffs * np.where(m < 0, (-1.)**m, 1.)
.However, I noticed that the coeffifient that I needed to flip to get a working files were the 'even' m numbers. As mentionned in the DIPY theory (https://dipy.org/documentation/1.4.0./theory/sh_basis/) : "the effect of this change is a sign flip for the SH functions of even degree m<0".
If I understand correctly, shouldn't the code line be replaced with
out_sh_coeffs = sh_coeffs * np.where(m < 0, -1*(-1.)**m, 1.)
?With:
DIPY==1.5.0
MRtrix==3.0.2
The text was updated successfully, but these errors were encountered: