Skip to content

Commit

Permalink
Correct typo in SSD documentation (#12924)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
SHEscher and pre-commit-ci[bot] authored Oct 30, 2024
1 parent 98d55b4 commit f00deb4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions doc/changes/devel/12924.bugfix.rst
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`.
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

0 comments on commit f00deb4

Please sign in to comment.