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

[MRG][DOC] Add GFP to the glossary #5804

Merged
merged 3 commits into from
May 29, 2019
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 11 additions & 11 deletions doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,19 @@ Under the assumption that the baseline does not contain a systematic signal
(time-locked to the event of interest), the whitened baseline signal should be
follow a multivariate Gaussian distribution, i.e.,
whitened baseline signals should be between -1.96 and 1.96 at a given time sample.
Based on the same reasoning, the expected value for the global field power (GFP)
is 1 (calculation of the GFP should take into account the true degrees of
freedom, e.g. ``ddof=3`` with 2 active SSP vectors)::
Based on the same reasoning, the expected value for the :term:`Global Field
Power (GFP) <GFP>` is 1 (calculation of the :term:`GFP` should take into account the true
degrees of freedom, e.g. ``ddof=3`` with 2 active SSP vectors)::

>>> evoked = epochs.average() # doctest: +SKIP
>>> evoked.plot_white(cov) # doctest: +SKIP

This plot displays both, the whitened evoked signals for each channels and
the whitened GFP. The numbers in the GFP panel represent the estimated rank of
the data, which amounts to the effective degrees of freedom by which the
squared sum across sensors is divided when computing the whitened GFP.
The whitened GFP also helps detecting spurious late evoked components which
can be the consequence of over- or under-regularization.
This plot displays both, the whitened evoked signals for each channels and the
whitened :term:`GFP`. The numbers in the :term:`GFP` panel represent the
estimated rank of the data, which amounts to the effective degrees of freedom by
which the squared sum across sensors is divided when computing the whitened
:term:`GFP`. The whitened :term:`GFP` also helps detecting spurious late evoked
components which can be the consequence of over- or under-regularization.

Note that if data have been processed using signal space separation (SSS) [2]_,
gradiometers and magnetometers will be displayed jointly because both are
Expand All @@ -266,8 +266,8 @@ For expert use cases or debugging the alternative estimators can also be compare
>>> evoked = epochs.average() # doctest: +SKIP
>>> evoked.plot_white(covs) # doctest: +SKIP

This will plot the whitened evoked for the optimal estimator and display the GFPs
for all estimators as separate lines in the related panel.
This will plot the whitened evoked for the optimal estimator and display the
:term:`GFPs <GFP>` for all estimators as separate lines in the related panel.

References
----------
Expand Down
77 changes: 42 additions & 35 deletions doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,9 @@ MNE-Python core terminology and general concepts
sleep scores, sleep events (spindles, K-complex) etc.
An :class:`Annotations` object is a container of multiple annotations.
See :class:`Annotations` page for the API of the corresponding
object class and :doc:`auto_tutorials/intro/plot_object_annotations`
object class and :ref:`tut-annotations`
for a tutorial on how to manipulate such objects.

channels
Channels refer to MEG sensors, EEG electrodes or any extra electrode
or sensor such as EOG, ECG or sEEG, ECoG etc. Channels have typically
a type, such as gradiometer, and a unit, such as Tesla/Meter that
is used in the code base, e.g. for plotting.

BEM
BEM is the acronym for boundary element method or boundary element
model. Both are related to the forward model computation and more
Expand All @@ -44,9 +38,24 @@ MNE-Python core terminology and general concepts
:func:`mne.bem.make_watershed_bem` or :func:`mne.bem.make_flash_bem`.
See :ref:`tut-forward` for usage demo.

channels
Channels refer to MEG sensors, EEG electrodes or any extra electrode
or sensor such as EOG, ECG or sEEG, ECoG etc. Channels have typically
a type, such as gradiometer, and a unit, such as Tesla/Meter that
is used in the code base, e.g. for plotting.

dipole
See :term:`equivalent current dipole`.

epochs
Epochs (sometimes called "trials" in other software packages) are
equal-length spans of data extracted from raw continuous data. Usually,
epochs are extracted around stimulus events or subject responses,
though sometimes sequential or overlapping epochs are extracted (e.g.,
for analysis of resting-state activity). See :class:`Epochs` for the
API of the corresponding object class, and :ref:`tut-epochs-class` for
a narrative overview.

equivalent current dipole
An equivalent current dipole (ECD) is an approximate representation of
post-synaptic activity in a small region of cortex. The intracellular
Expand All @@ -58,14 +67,12 @@ MNE-Python core terminology and general concepts
are well-approximated by (i.e., "equivalent" to) fields generated by
idealized point sources (dipoles) located on the cortical surface.

epochs
Epochs (sometimes called "trials" in other software packages) are
equal-length spans of data extracted from raw continuous data. Usually,
epochs are extracted around stimulus events or subject responses,
though sometimes sequential or overlapping epochs are extracted (e.g.,
for analysis of resting-state activity). See :class:`Epochs` for the
API of the corresponding object class, and :ref:`tut-epochs-class` for
a narrative overview.
events
Events correspond to specific time points in raw data; e.g.,
triggers, experimental condition events, etc. MNE represents events with
integers that are stored in numpy arrays of shape (n_events, 3). Such arrays
are classically obtained from a trigger channel, also referred to as
stim channel.

evoked
Evoked data are obtained by averaging epochs. Typically, an evoked object
Expand All @@ -74,13 +81,6 @@ MNE-Python core terminology and general concepts
See :class:`EvokedArray` for the API of the corresponding
object class, and :ref:`tut-evoked-class` for a narrative overview.

events
Events correspond to specific time points in raw data; e.g.,
triggers, experimental condition events, etc. MNE represents events with
integers that are stored in numpy arrays of shape (n_events, 3). Such arrays
are classically obtained from a trigger channel, also referred to as
stim channel.

first_samp
The attribute of raw objects called ``first_samp`` is an integer that
refers to the number of time samples passed between the onset of the
Expand All @@ -101,6 +101,13 @@ MNE-Python core terminology and general concepts
:term:`boundary element model <BEM>` and
:class:`mne.bem.ConductorModel`).

GFP
Global Field Power (abbr. ``GFP``) is a measure of the (non-)uniformity
of the electromagnetic field at the sensors. It is typically calculated
as the standard deviation of the sensor values at each time point; thus
it is a one-dimensional time series capturing the spatial variability
of the signal across sensor locations.

info
Also called ``measurement info``, it is a collection of metadata regarding
a Raw, Epochs or Evoked object; e.g.,
Expand Down Expand Up @@ -152,17 +159,8 @@ MNE-Python core terminology and general concepts
See :class:`~io.RawArray` for the API of the corresponding
object class, and :ref:`tut-raw-class` for a narrative overview.

source space
A source space (abbr. ``src``) specifies where in the brain one wants
to estimate the
source amplitudes. It corresponds to locations of a set of
candidate equivalent current dipoles (ECD). MNE mostly works
with source spaces defined on the cortical surfaces estimated
by FreeSurfer from a T1-weighted MRI image. See
:ref:`tut-forward` to read on
how to compute a forward operator on a source space.
See :class:`SourceSpaces` for the API of the corresponding
object class.
selection (abbr. sel)
A set of picks. E.g., all sensors included in a Region of Interest.

source estimates (abbr. ``stc``)
Source estimates, commonly referred to as STC (Source Time Courses),
Expand All @@ -177,8 +175,17 @@ MNE-Python core terminology and general concepts
:class:`VectorSourceEstimate`, :class:`MixedSourceEstimate`,
for the API of the corresponding object classes.

selection (abbr. sel)
A set of picks. E.g., all sensors included in a Region of Interest.
source space
A source space (abbr. ``src``) specifies where in the brain one wants
to estimate the
source amplitudes. It corresponds to locations of a set of
candidate equivalent current dipoles (ECD). MNE mostly works
with source spaces defined on the cortical surfaces estimated
by FreeSurfer from a T1-weighted MRI image. See
:ref:`tut-forward` to read on
how to compute a forward operator on a source space.
See :class:`SourceSpaces` for the API of the corresponding
object class.

stim channel
A stim channel, a.k.a. trigger channel, is a channel that encodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
The objective is to show you how to explore spectrally localized
effects. For this purpose we adapt the method described in [1]_ and use it on
the somato dataset. The idea is to track the band-limited temporal evolution
of spatial patterns by using the Global Field Power (GFP).
of spatial patterns by using the :term:`Global Field Power(GFP) <GFP>`.

We first bandpass filter the signals and then apply a Hilbert transform. To
reveal oscillatory activity the evoked response is then subtracted from every
single trial. Finally, we rectify the signals prior to averaging across trials
by taking the magniude of the Hilbert.
Then the GFP is computed as described in [2]_, using the sum of the squares
but without normalization by the rank.
Baselining is subsequently applied to make the GFPs comparable between
frequencies.
Then the :term:`GFP` is computed as described in [2]_, using the sum of the
squares but without normalization by the rank.
Baselining is subsequently applied to make the :term:`GFPs <GFP>` comparable
between frequencies.
The procedure is then repeated for each frequency band of interest and
all GFPs are visualized. To estimate uncertainty, non-parametric confidence
intervals are computed as described in [3]_ across channels.
all :term:`GFPs <GFP>` are visualized. To estimate uncertainty, non-parametric
confidence intervals are computed as described in [3]_ across channels.

The advantage of this method over summarizing the Space x Time x Frequency
output of a Morlet Wavelet in frequency bands is relative speed and, more
Expand Down
2 changes: 1 addition & 1 deletion examples/visualization/plot_roi_erpimage_by_rt.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
event_id={"square": 2})

###############################################################################
# Plot using GFP
# Plot using :term:`Global Field Power <GFP>`

# Parameters for plotting
order = rts.argsort() # sorting from fast to slow trials
Expand Down
5 changes: 3 additions & 2 deletions tutorials/evoked/plot_object_evoked.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
print(data[10])

###############################################################################
# In the same vein, we can quickly extract (and, e.g., plot) the GFP as the
# standard deviation across channels, here shown just for EEG.
# In the same vein, we can quickly extract (and, e.g., plot) the
# :term:`Global Field Power(GFP) <GFP>` as the standard deviation across
# channels, here shown just for EEG.

gfp = evoked.copy().pick_types(eeg=True, meg=False).data.std(axis=0)
fig, ax = plt.subplots(1)
Expand Down
19 changes: 10 additions & 9 deletions tutorials/source-modeling/plot_compute_covariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,21 @@
# be follow a multivariate Gaussian distribution, i.e.,
# whitened baseline signals should be between -1.96 and 1.96 at a given time
# sample.
# Based on the same reasoning, the expected value for the global field power
# (GFP) is 1 (calculation of the GFP should take into account the true degrees
# of freedom, e.g. ``ddof=3`` with 2 active SSP vectors):
# Based on the same reasoning, the expected value for the :term:`global field
# power (GFP) <GFP>` is 1 (calculation of the GFP should take into account the
# true degrees of freedom, e.g. ``ddof=3`` with 2 active SSP vectors):

evoked = epochs.average()
evoked.plot_white(noise_cov_reg, time_unit='s')

###############################################################################
# This plot displays both, the whitened evoked signals for each channels and
# the whitened GFP. The numbers in the GFP panel represent the estimated rank
# of the data, which amounts to the effective degrees of freedom by which the
# squared sum across sensors is divided when computing the whitened GFP.
# The whitened GFP also helps detecting spurious late evoked components which
# can be the consequence of over- or under-regularization.
# the whitened :term:`GFP`. The numbers in the GFP panel represent the
# estimated rank of the data, which amounts to the effective degrees of freedom
# by which the squared sum across sensors is divided when computing the
# whitened :term:`GFP`. The whitened :term:`GFP` also helps detecting spurious
# late evoked components which can be the consequence of over- or
# under-regularization.
#
# Note that if data have been processed using signal space separation
# (SSS) [2]_,
Expand All @@ -155,7 +156,7 @@

##############################################################################
# This will plot the whitened evoked for the optimal estimator and display the
# GFPs for all estimators as separate lines in the related panel.
# :term:`GFPs <GFP>` for all estimators as separate lines in the related panel.


##############################################################################
Expand Down