Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct typo in SSD documentation #12924

Merged
merged 7 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/devel/12942.bugfix.rst
SHEscher marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix typos in the Spatio-Spectral Decomposition example, by :newcontrib:`Simon M. Hofmann`_.
SHEscher marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
.. _Simeon Wong: https://github.com/dtxe
.. _Simon Kern: https://skjerns.de
.. _Simon Kornblith: https://simonster.com
.. _Simon M. Hofmann: https://github.com/SHEscher
.. _Sondre Foslien: https://github.com/sondrfos
.. _Sophie Herbst: https://github.com/SophieHerbst
.. _Stanislas Chambon: https://github.com/Slasnista
Expand Down
18 changes: 9 additions & 9 deletions examples/decoding/ssd_spatial_filters.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
.. _ex-ssd-spatial-filters:

===========================================================
Compute Spectro-Spatial Decomposition (SSD) spatial filters
===========================================================
================================================================
Compute spatial filters with Spatio-Spectral Decomposition (SSD)
================================================================

In this example, we will compute spatial filters for retaining
oscillatory brain activity and down-weighting 1/f background signals
Expand Down Expand Up @@ -33,7 +33,7 @@

# Prepare data
raw = mne.io.read_raw_ctf(fname)
raw.crop(50.0, 110.0).load_data() # crop for memory purposes
raw.crop(tmin=50.0, tmax=110.0).load_data() # crop for memory purposes
raw.resample(sfreq=250)

raw.pick_types(meg=True, ref_meg=False)
Expand Down Expand Up @@ -63,9 +63,9 @@


# %%
# Let's investigate spatial filter with max power ratio.
# Let's investigate spatial filter with the max power ratio.
# We will first inspect the topographies.
# According to Nikulin et al. 2011 this is done by either inverting the filters
# According to Nikulin et al. (2011), this is done by either inverting the filters
# (W^{-1}) or by multiplying the noise cov with the filters Eq. (22) (C_n W)^t.
# We rely on the inversion approach here.

Expand All @@ -86,7 +86,7 @@
# Note that this is not necessary if sort_by_spectral_ratio=True (default).
spec_ratio, sorter = ssd.get_spectral_ratio(ssd_sources)

# Plot spectral ratio (see Eq. 24 in Nikulin 2011).
# Plot spectral ratio (see Eq. 24 in Nikulin et al., 2011).
fig, ax = plt.subplots(1)
ax.plot(spec_ratio, color="black")
ax.plot(spec_ratio[sorter], color="orange", label="sorted eigenvalues")
Expand All @@ -100,7 +100,7 @@
# the sorting might make a difference.

# %%
# Let's also look at the power spectrum of that source and compare it to
# Let's also look at the power spectrum of that source and compare it
# to the power spectrum of the source with lowest SNR.

below50 = freqs < 50
Expand All @@ -121,7 +121,7 @@
# %%
# Epoched data
# ------------
# Although we suggest to use this method before epoching, there might be some
# Although we suggest using this method before epoching, there might be some
# situations in which data can only be treated by chunks.

# Build epochs as sliding windows over the continuous raw file.
Expand Down
Loading