MRG: Small fix to tutorial; rename plot_events ordinate label to "Event id"; improve some SSP docstrings#8612
Conversation
drammock
left a comment
There was a problem hiding this comment.
looks good! just one suggestion
| # :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.
can we link "the R wave" to something here? Maybe https://en.wikipedia.org/wiki/QRS_complex ?
There was a problem hiding this comment.
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.
these are indented too far, they're getting rendered as both bullets and blockquotes.
There was a problem hiding this comment.
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.
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.
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.
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_iddict, but then it should be called "events_id"… which doesn't make too much sense to me