Skip to content

FIX: correct mode parameter in get_point_spread and get_cross_talk#13754

Open
Famous077 wants to merge 4 commits intomne-tools:mainfrom
Famous077:fix/resolution-matrix-mode-parameter
Open

FIX: correct mode parameter in get_point_spread and get_cross_talk#13754
Famous077 wants to merge 4 commits intomne-tools:mainfrom
Famous077:fix/resolution-matrix-mode-parameter

Conversation

@Famous077
Copy link
Contributor

@Famous077 Famous077 commented Mar 14, 2026

Reference issue (if any)

Fixed issue #13128

What does this implement/fix?

Found a bug where the mode parameter in get_point_spread() and
get_cross_talk() wasn't working as documented. The public API says
'max' and 'svd' are valid modes, but the internal helper function
_summarise_psf_ctf uses different names ('maxnorm' and 'pca'),
so passing 'max' or 'svd' just silently returned all vertices
without any summarisation — no error, no warning.

Changes made:

  • added validation so invalid mode values now raise a ValueError
  • map public names to internal ones before calling _summarise_psf_ctf
  • updated existing tests to use the correct public mode names

Additional information

Verified the fix works correctly with both individual vertex indices and labels.
All 3 existing tests pass after the changes.

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.

1 participant