Skip to content

[MINOR] Add evoked GFP to tutorials#5796

Merged
agramfort merged 6 commits intomne-tools:masterfrom
jona-sassenhagen:add_gfp_to_tutorial
Dec 18, 2018
Merged

[MINOR] Add evoked GFP to tutorials#5796
agramfort merged 6 commits intomne-tools:masterfrom
jona-sassenhagen:add_gfp_to_tutorial

Conversation

@jona-sassenhagen
Copy link
Copy Markdown
Contributor

This adds a few lines to the evoked object tutorial to show how to extract and plot the SD across channels, as discussed in #4002

I'm trying to close old issues :)

Closes #4002

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 17, 2018

Codecov Report

Merging #5796 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5796      +/-   ##
==========================================
- Coverage   88.55%   88.53%   -0.03%     
==========================================
  Files         369      369              
  Lines       69139    68955     -184     
  Branches    11638    11614      -24     
==========================================
- Hits        61228    61050     -178     
  Misses       5046     5046              
+ Partials     2865     2859       -6

@larsoner
Copy link
Copy Markdown
Member

I modernized the plt usage and did what @agramfort suggested, @jona-sassenhagen feel free to merge if you're happy with my changes

@larsoner
Copy link
Copy Markdown
Member

# 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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you don't need the 1, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yes it's optional

@agramfort
Copy link
Copy Markdown
Member

+1 for MRG

Copy link
Copy Markdown
Contributor Author

@jona-sassenhagen jona-sassenhagen left a comment

Choose a reason for hiding this comment

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

Looks good - I guess will merge myself, as Eric wrote half the code at this stage :)

@jona-sassenhagen
Copy link
Copy Markdown
Contributor Author

Ah I forgot the scaling. Good like this?

@massich
Copy link
Copy Markdown
Contributor

massich commented Dec 18, 2018

a bit off topic question: Shall we add the definition of global field power (GFP) to the glossary? and link to it?

Does anyone see value to that? or all users know the terms enought that is not worth the effort?

@jona-sassenhagen
Copy link
Copy Markdown
Contributor Author

jona-sassenhagen commented Dec 18, 2018 via email

import os.path as op

import mne
import matplotlib.pyplot as plt
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

import mne last.

@agramfort agramfort merged commit 76ccce4 into mne-tools:master Dec 18, 2018
@agramfort
Copy link
Copy Markdown
Member

thx @jona-sassenhagen

@jona-sassenhagen jona-sassenhagen deleted the add_gfp_to_tutorial branch December 18, 2018 13:03
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.

ENH: Allow retrieval of GFP

5 participants