Skip to content

Commit

Permalink
Some additions to the dipole orientation tutorial. (#12960)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmvanvliet authored Nov 12, 2024
1 parent 9832d4b commit c3c1f29
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/changes/devel/12960.other.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Mention some gotchas that arise from the fact that by default, we pool across dipole orientations when performing source estimation, by `Marijn van Vliet`_
23 changes: 20 additions & 3 deletions tutorials/inverse/35_dipole_orientations.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@
tutorial, we will look at the various options available to restrict the
orientation of the dipoles and the impact on the resulting source estimate.
.. warning::
A common "gotcha!" is that by default, dipole orientation information is discarded
in the source estimate. Only the magnitude of the activity is retained. This means
that by default, the source-level values are always positive. This has some
implications that may not be immediately obvious:
* Averaging across source estimated epochs does not produce a source estimated
evoked response. Since values are always positive, noise does not "cancel out".
This means the default settings are probably not suitable for things like
performing linear regression or computing correlations across epochs in source
space.
* Oscillatory signals are distorted, as for example a sine wave will become a series
of bumps. Hence, frequency analysis in source space is not meaningful when using
the default settings.
See :ref:`inverse_orientation_constraints` for related information.
"""

Expand Down Expand Up @@ -88,7 +105,7 @@
fig=fig,
)

mne.viz.set_3d_view(figure=fig, azimuth=180, distance=0.25)
mne.viz.set_3d_view(figure=fig, azimuth=180, distance=0.1, focalpoint="auto")

# %%
# .. _plot_dipole_orientations_fixed_orientations:
Expand Down Expand Up @@ -131,7 +148,7 @@
fig=fig,
)

mne.viz.set_3d_view(figure=fig, azimuth=180, distance=0.1)
mne.viz.set_3d_view(figure=fig, azimuth=180, distance=0.1, focalpoint="auto")

# %%
# Restricting the dipole orientations in this manner leads to the following
Expand Down Expand Up @@ -198,7 +215,7 @@
fig=fig,
)

mne.viz.set_3d_view(figure=fig, azimuth=180, distance=0.1)
mne.viz.set_3d_view(figure=fig, azimuth=180, distance=0.1, focalpoint="auto")

# %%
# When computing the source estimate, the activity at each of the three dipoles
Expand Down

0 comments on commit c3c1f29

Please sign in to comment.