Skip to content

Commit

Permalink
BF: KFA is zero for small MKT values (MKT < tol, tol=1e-8)
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelNH committed Jun 14, 2021
1 parent f6f36ed commit 1094a97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dipy/reconst/dki.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,8 @@ def kurtosis_fractional_anisotropy(dki_params):
# Compute KFA
KFA = np.zeros(A.shape)
cond1 = B > 0 # Avoiding Singularity (if B = 0, KFA = 0)
cond2 = W > 0 # Avoiding overestimating KFA for MKT = 0
# Avoiding overestimating KFA for small MKT values (KFA=0, MKT < tol)
cond2 = W > 1e-8
cond = np.logical_and(cond1, cond2)
KFA[cond] = np.sqrt(A[cond]/B[cond])

Expand Down

0 comments on commit 1094a97

Please sign in to comment.