Skip to content

Conversation

@skjerns
Copy link
Contributor

@skjerns skjerns commented Jan 14, 2026

fixes #13581

I've added some more information on eSSS and how to apply it. I'm far from an expert in SSS, so please let me know if my wording is correct.

Additional information

I think it might also be nice to have a full workflow in the example section that applys teSSS, together with head movement correction. Is there a dataset which would be used for that? Else we could record a small dataset for this purpose and upload it somewhere.

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

Just a few minor commits, I'll push and then merge when green, thanks @skjerns !

@larsoner
Copy link
Member

Oh I just saw draft and main comments, so I won't mark for merge

I think it might also be nice to have a full workflow in the example section that applys teSSS, together with head movement correction. Is there a dataset which would be used for that? Else we could record a small dataset for this purpose and upload it somewhere.

skjerns and others added 2 commits January 14, 2026 17:37
Added external example link for teSSS with movement compensation.
@skjerns
Copy link
Contributor Author

skjerns commented Jan 14, 2026

Oh I just saw draft and main comments, so I won't mark for merge

I think it might also be nice to have a full workflow in the example section that applys teSSS, together with head movement correction. Is there a dataset which would be used for that? Else we could record a small dataset for this purpose and upload it somewhere.

Okay, given the complexity of adding a new dataset, I guess it's easiest to link the tutorial.

Generally it would be great to have an improved MaxFilter tutorial that shows all the variants that SSS can have (with/without movement correction, move to default head position, move to average head position of other participants, tSSS, eSSS, etc etc), as some of the functionality is slightly underdocumented currently. But generally the information is there, it's just in different examples/tutorials/docstrings

@skjerns
Copy link
Contributor Author

skjerns commented Jan 15, 2026

Sorry, I don't know how to make the sphinx happy 😒 her riddles are to hard

/home/circleci/project/doc/auto_tutorials/preprocessing/60_maxwell_filtering_sss.rst:954: ERROR: Unexpected indentation. [docutils]
/home/circleci/project/doc/auto_tutorials/preprocessing/60_maxwell_filtering_sss.rst:955: WARNING: Block quote ends without a blank line; unexpected unindent. [docutils]

I guess its about these lines?

# Extended SSS (eSSS) is a variant of SSS that improves suppression of external
# interference especially, when the “ideal” external model is not perfect
# (e.g., because of small calibration/geometry errors). It does this by
# extending the *external* part of the SSS model with interference patterns
# learned from a separate empty-room recording :footcite:`HelleEtAl2021`.
#
# Practical notes:
# - Keep the number of added components small (the ~8 in the original paper);
#   adding too many can worsen numerical conditioning and increase noise.
# - Prefer empty-room data from the same session/environment.
# - eSSS can be combined with tSSS (“teSSS”, i.e. setting ``st_duration=X``).
# - You can get projections from an empty room recording via
#   :func:`mne.compute_proj_raw` like::
#
#       proj = mne.compute_proj_raw(
#           noise_raw, n_grad=3, n_mag=3, n_eeg=0, meg="combined",
#       )

@drammock
Copy link
Member

Sorry, I don't know how to make the sphinx happy 😒 her riddles are to hard

Yeah, the line numbers are not informative because they refer to the .rst file that is compiled from the .py file by sphinx-gallery. It usually helps narrow it down to look at the rendered page: https://output.circle-artifacts.com/output/job/80da2061-c65f-42d6-afc6-a70f6e8ad372/artifacts/0/html/auto_tutorials/preprocessing/60_maxwell_filtering_sss.html#extended-sss-esss

First thing I notice is that the first bullet of your bullet list is misformatted as a blockquote; first thing I'd try is adding a blank line before the first bullet. The rest of it looks like it's rendering correctly so maybe that's all? (Of course, if you build the docs locally before pushing to GitHub, then the intermediate .rst files will be available locally, so then the line numbers are actually informative if you look at the intermediate files. They'll be in the same directory as the .py source of the tutorial)

@skjerns
Copy link
Contributor Author

skjerns commented Jan 15, 2026

First thing I notice is that the first bullet of your bullet list is misformatted as a blockquote; first thing I'd try is adding a blank line before the first bullet. The rest of it looks like it's rendering correctly so maybe that's all? (Of course, if you build the docs locally before pushing to GitHub, then the intermediate .rst files will be available locally, so then the line numbers are actually informative if you look at the intermediate files. They'll be in the same directory as the .py source of the tutorial)

will try, thanks!

I've previously tried setting up building the docs locally but after trying quite a bit it still didn't work. Something doesn't seem to work on my local installation (maybe a Windows problem?), but I'll try again tomorrow

@skjerns
Copy link
Contributor Author

skjerns commented Jan 16, 2026

that seems to have fixed it, thanks!

@drammock drammock merged commit f337a0d into mne-tools:main Jan 16, 2026
32 checks passed
@drammock
Copy link
Member

thanks @skjerns !

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.

More information on eSSS for MaxFilter algorithm

3 participants