Skip to content

New appendix page: spherical harmonics#104

Merged
Lestropie merged 4 commits intobep-016from
sh_to_appendix
Mar 25, 2026
Merged

New appendix page: spherical harmonics#104
Lestropie merged 4 commits intobep-016from
sh_to_appendix

Conversation

@Lestropie
Copy link
Copy Markdown
Collaborator

Closes #100.

I'm not 100% happy with the structure: there's a section on "truncated spherical harmonics", and there there are tables relating maximal spherical harmonic degree to number of coefficients, yet the former don't reside in the latter. But they can't just be moved because of other order dependencies.

Copy link
Copy Markdown
Collaborator

@arokem arokem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the order issue, maybe add a "see below in XXX"?


![SH functions](https://latex.codecogs.com/gif.latex?Y_l^m(\theta,\phi)&space;=&space;\sqrt{\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}}&space;P_l^m(\cos&space;\theta)&space;e^{im\phi}")

for integer *order* *l*, *phase* *m*, associated Legendre polynomials *P*.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider "phase factor" instead of "phase"? See dipy/dipy#3086 (comment) and preceding discussing there.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lately I've tried to consistently use "degree" rather than "order" for l. Wikipedia uses "degree" and "order". "Phase factor" is at risk of erroneous conflation with specifically the Condon-Shortley phase factor. So I wonder if adopting "degree" and "order" here would be better?
(I'd likely modify the MRtrix3 online documentation accordingly)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would really prefer to use "order" here (rather than "degree") for the reasons mentioned in that PR discussion in DIPY (i.e., to be consistent with the dMRI literature). But I agree that "phase" is fine, even though it implies something continuous, it is easy to understand what it means.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdtournier any strong opinions? I have some limited sense that we've tried to transition to "degree" for l, but our own SH docs page conflicts, other docs self-conflict, and I'm not able to find any discussions online.

PS. This terminology is not just for the appendix, there's also a metadata field specifying maximal l. Could call it "SphericalHarmonicLmax" or the like if there's too much contention.

Co-authored-by: Ariel Rokem <arokem@gmail.com>
@Lestropie
Copy link
Copy Markdown
Collaborator Author

Excess """ characters at ends of equations were in the code prior to this review, so some copy-and-paste error was made upstream.

@arokem
Copy link
Copy Markdown
Collaborator

arokem commented May 18, 2024

Excess """ characters at ends of equations were in the code prior to this review, so some copy-and-paste error was made upstream.

That's probably something I did 😄

Conflicts:
	src/derivatives/05-diffusion-derivatives.md
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.71%. Comparing base (1ce38c2) to head (0d5afae).
⚠️ Report is 928 commits behind head on bep-016.

Additional details and impacted files
@@             Coverage Diff             @@
##           bep-016     #104      +/-   ##
===========================================
- Coverage    88.04%   82.71%   -5.34%     
===========================================
  Files           16       20       +4     
  Lines         1380     1608     +228     
===========================================
+ Hits          1215     1330     +115     
- Misses         165      278     +113     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Use of "order" has been adopted across the documentation.
@Lestropie Lestropie merged commit 58afad6 into bep-016 Mar 25, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move spherical harmonics to its own Appendix

2 participants