Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Cieslak <[email protected]>
  • Loading branch information
tsalo and mattcieslak authored Nov 21, 2024
1 parent 07563ed commit 4bc9a8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qsiprep/utils/shm.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,8 @@ def calculate_max_order(n_coeffs):
\rarrow 2n = L^2 + 3L + 2
\rarrow L^2 + 3L + 2 - 2n = 0
\rarrow L^2 + 3L + 2(1-n) = 0
\rarrow L_{1,2} = \frac{-3 \\pm \\sqrt{9 - 8 (1-n)}}{2}
\rarrow L{1,2} = \frac{-3 \\pm \\sqrt{1 + 8n}}{2}
\rarrow L_{1,2} = \frac{-3 \pm \sqrt{9 - 8 (1-n)}}{2}
\rarrow L{1,2} = \frac{-3 \pm \sqrt{1 + 8n}}{2}
Finally, the positive value is chosen between the two options.
"""
Expand Down Expand Up @@ -934,7 +934,7 @@ def anisotropic_power(sh_coeffs, norm_factor=0.00001, power=2, non_negative=True
Calculate AP image based on a IxJxKxC SH coefficient matrix based on the
equation:
.. math::
AP = \\sum_{l=2,4,6,...}{\frac{1}{2l+1} \\sum_{m=-l}^l{|a_{l,m}|^n}}
AP = \sum_{l=2,4,6,...}{\frac{1}{2l+1} \sum_{m=-l}^l{|a_{l,m}|^n}}
Where the last dimension, C, is made of a flattened array of $l$x$m$
coefficients, where $l$ are the SH orders, and $m = 2l+1$,
Expand Down

0 comments on commit 4bc9a8f

Please sign in to comment.