-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
MRG: Small fix to tutorial; rename plot_events ordinate label to "Event id"; improve some SSP docstrings #8612
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but style is unhappy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! just one suggestion
@@ -228,8 +228,8 @@ | |||
# projectors for magnetometers, gradiometers, and EEG channels (default is two | |||
# projectors for each channel type). | |||
# :func:`~mne.preprocessing.compute_proj_ecg` also returns an :term:`events` | |||
# array containing the sample numbers corresponding to the onset of each | |||
# detected heartbeat. | |||
# array containing the sample numbers corresponding to the peak of the R wave |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we link "the R wave" to something here? Maybe https://en.wikipedia.org/wiki/QRS_complex ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea! Will do.
mne/preprocessing/ssp.py
Outdated
- filter the ECG data channel, | ||
- find ECG R wave peaks using :func:`mne.preprocessing.find_ecg_events`, | ||
- filter the raw data, | ||
- create `~mne.Epochs` around the R wave peaks, capturing the heartbeats, | ||
- optionally average the `~mne.Epochs` to produce an `~mne.Evoked` if | ||
``average=True`` was passed (default), and finally | ||
- calculate SSP projection vectors on that data to capture the artifacts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are indented too far, they're getting rendered as both bullets and blockquotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have fixed that, and also changed the list to an enumeration.
mne/preprocessing/ssp.py
Outdated
- filter the EOG data channel, | ||
- find the peaks of eyeblinks in the EOG data using | ||
:func:`mne.preprocessing.find_eog_events`, | ||
- filter the raw data, | ||
- create `~mne.Epochs` around the eyeblinks, | ||
- optionally average the `~mne.Epochs` to produce an `~mne.Evoked` if | ||
``average=True`` was passed (default), and finally | ||
- calculate SSP projection vectors on that data to capture the artifacts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mne/preprocessing/ecg.py
Outdated
average_pulse : float | np.nan | ||
The estimated average pulse. If no ECG events could be found, this will | ||
be ``nan``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this accurate? Do we ever return np.nan
? It looks like the part of the PR that changed that in the code has been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I have corrected this.
@drammock I think this is good to merge. Doc artifacts: |
Thx @hoechenberger ! |
* upstream/master: (42 commits) MRG, ENH: Add DICS bias tests (mne-tools#8610) MRG, BUG, ENH: Add window option (mne-tools#8662) BUG: Fix alpha for volumes (mne-tools#8663) MRG, BUG: Fix bugs with envcorr (mne-tools#8658) MRG, ENH: Progressbar for csd_morlet (mne-tools#8608) Render is necessary now (mne-tools#8657) VIZ: Fix head size (mne-tools#8651) MRG, MAINT: bump sphinxcontrib-bitex version (mne-tools#8653) MRG, MAINT: Improve server env (mne-tools#8656) BUG: Mayavi center (mne-tools#8644) VIZ, ENH: allow show/hide annotations by label (mne-tools#8624) Add regression test for EEGLAB data with a chanlocs struct (mne-tools#8647) FIX: scalar_bar (mne-tools#8643) MRG: Small fix to tutorial; rename plot_events ordinate label to "Event id"; improve some SSP docstrings (mne-tools#8612) MRG, ENH: make plot alignment use defaults for colors (mne-tools#8553) BUG: Fix passing of channel type (mne-tools#8638) FIX: fixed loop over norm PSF/CTF options (mne-tools#8636) MRG, BUG: Pass kwargs (mne-tools#8630) DOC: Clearer error message (mne-tools#8631) BUG: Fix number of labels (mne-tools#8629) ...
* upstream/master: (38 commits) MRG, ENH: Add DICS bias tests (mne-tools#8610) MRG, BUG, ENH: Add window option (mne-tools#8662) BUG: Fix alpha for volumes (mne-tools#8663) MRG, BUG: Fix bugs with envcorr (mne-tools#8658) MRG, ENH: Progressbar for csd_morlet (mne-tools#8608) Render is necessary now (mne-tools#8657) VIZ: Fix head size (mne-tools#8651) MRG, MAINT: bump sphinxcontrib-bitex version (mne-tools#8653) MRG, MAINT: Improve server env (mne-tools#8656) BUG: Mayavi center (mne-tools#8644) VIZ, ENH: allow show/hide annotations by label (mne-tools#8624) Add regression test for EEGLAB data with a chanlocs struct (mne-tools#8647) FIX: scalar_bar (mne-tools#8643) MRG: Small fix to tutorial; rename plot_events ordinate label to "Event id"; improve some SSP docstrings (mne-tools#8612) MRG, ENH: make plot alignment use defaults for colors (mne-tools#8553) BUG: Fix passing of channel type (mne-tools#8638) FIX: fixed loop over norm PSF/CTF options (mne-tools#8636) MRG, BUG: Pass kwargs (mne-tools#8630) DOC: Clearer error message (mne-tools#8631) BUG: Fix number of labels (mne-tools#8629) ...
events_id
dict, but then it should be called "events_id"… which doesn't make too much sense to me