Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

hoechenberger
Copy link
Member

@hoechenberger hoechenberger commented Dec 6, 2020

  • ECG revents correspond to R wave peaks
  • Ordinate label should be in singular, i.e. "Event id" instead of "Events id" – unless we want consistency with the events_id dict, but then it should be called "events_id"… which doesn't make too much sense to me
  • improve some SSP docstrings

@hoechenberger hoechenberger changed the title Small fix to tutorial & rename plot_events ordinate label to "Event id" MRG: Small fix to tutorial & rename plot_events ordinate label to "Event id" Dec 6, 2020
@hoechenberger hoechenberger changed the title MRG: Small fix to tutorial & rename plot_events ordinate label to "Event id" MRG: Small fix to tutorial; rename plot_events ordinate label to "Event id"; improve some SSP docstrings Dec 6, 2020
Copy link
Member

@larsoner larsoner left a 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

Copy link
Member

@drammock drammock 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! 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
Copy link
Member

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 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Great idea! Will do.

Comment on lines 157 to 163
- 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.
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

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.

Comment on lines 280 to 287
- 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.
Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines 167 to 169
average_pulse : float | np.nan
The estimated average pulse. If no ECG events could be found, this will
be ``nan``.
Copy link
Member

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.

Copy link
Member Author

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.

@hoechenberger
Copy link
Member Author

@drammock I think this is good to merge.

Doc artifacts:

@drammock drammock merged commit 76e386c into mne-tools:master Dec 9, 2020
@drammock
Copy link
Member

drammock commented Dec 9, 2020

Thx @hoechenberger !

@hoechenberger hoechenberger deleted the misc branch December 10, 2020 08:26
larsoner added a commit to agramfort/mne-python that referenced this pull request Dec 16, 2020
* 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)
  ...
larsoner added a commit to wmvanvliet/mne-python that referenced this pull request Dec 16, 2020
* 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)
  ...
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.

3 participants