Feature/add sh axis property multichannel#329
Draft
tluebeck wants to merge 5 commits into
Draft
Conversation
Allow caxis_spherical_harmonics to be a tuple
mberz
reviewed
May 21, 2026
mberz
left a comment
Member
There was a problem hiding this comment.
Looks very much feasible!
I think we'll need an update to the n_max property and additional checks to ensure that the order of each dimensions corresponding to spherical harmonic data matches.
Or would you suggest to allow different orders for each dimension?
Comment on lines
+288
to
+295
| # check if all sh_channels match | ||
| sh_channels = [data.shape[a] for a in axis] | ||
|
|
||
| if len(set(sh_channels)) != 1: | ||
| raise ValueError( | ||
| "All SH axes must have the same number of channels, " | ||
| f"but got {sh_channels}" | ||
| ) |
Member
There was a problem hiding this comment.
I think this check should not be necessary, since the order governs the total number of channels. So all axes containing spherical harmonic data should have the same length.
So this check should probably be moved to the respective SphericalHarmonic* classes.
| # check if all sh_channels match | ||
| sh_channels = [data.shape[a] for a in axis] | ||
|
|
||
| if len(set(sh_channels)) != 1: |
Member
There was a problem hiding this comment.
same comment as above. Implementing the check also makes individual checks in each function obsolete.
move check if all spherical harmonics axes have equal length to data init
test change_channel_convention and renormalize with mutlichannel data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue(s) are closed by this pull request?
Closes #327
Changes proposed in this pull request: