Skip to content

DOC: Say adjacency=None is rarely right for sensor or source data in cluster tests - #14629

Merged
larsoner merged 2 commits into
mne-tools:mainfrom
PragnyaKhandelwal:doc-cluster-adjacency
Dec 2, 2026
Merged

larsoner merged 2 commits into
mne-tools:mainfrom
PragnyaKhandelwal:doc-cluster-adjacency

Conversation

@PragnyaKhandelwal

@PragnyaKhandelwal PragnyaKhandelwal commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Reference issue (if any)

Related to #14428.
Forum thread: https://mne.discourse.group/t/6800

What does this implement/fix?

  • The adjacency=None description in spatio_temporal_cluster_1samp_test (and the n-sample variant) says it assumes a regular lattice along the last
    dimension, which is accurate but doesn't warn that this is almost never meaningful when that dimension is sensors or source vertices — the array
    order doesn't reflect spatial neighbours.
  • Added one sentence to the spatio-temporal variants only, pointing to find_ch_adjacency / spatial_src_adjacency. The time-frequency variants
    are left unchanged because a lattice along time or frequency bins is correct.
  • The edit is in _if_none inside docdict in mne/utils/docs.py; the two docstrings in cluster_level.py were synced with check_static_docs.py.

Additional information

@larsoner larsoner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That note is helpful, thanks @PragnyaKhandelwal !

@larsoner
larsoner merged commit 1e4f45f into mne-tools:main Dec 2, 2026
26 checks passed
@PragnyaKhandelwal
PragnyaKhandelwal deleted the doc-cluster-adjacency branch December 2, 2026 17:39
larsoner added a commit to larsoner/mne-python that referenced this pull request Dec 2, 2026
* upstream/main:
  FIX: Limit NaN propagation during overlap-add FIR filtering (mne-tools#14614)
  ENH: Add save() to ConductorModel and InverseOperator (mne-tools#14612)
  FIX: Make minimum-phase firwin2 high-pass filters work with even filter lengths (mne-tools#14627)
  DOC: Note that cap montages do not line up with fsaverage in template-MRI tutorial (mne-tools#14628)
  DOC: Say adjacency=None is rarely right for sensor or source data in cluster tests (mne-tools#14629)
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.

2 participants