Skip to content

Conversation

@larsoner
Copy link
Member

@larsoner larsoner commented Dec 4, 2020

Updates csd_morlet to use ProgressBar. Instead of having this output, one line per epoch plus many warnings:

Computing cross-spectral density from epochs...
    Computing CSD matrix for epoch 1
dics.py:53: UserWarning: At least one of the wavelets is longer than the signal. Consider padding the signal or using shorter wavelets.
  csd = csd_morlet(epochs, freqs, tmin=tmin, tmax=tmax, verbose=True)
    Computing CSD matrix for epoch 2
dics.py:53: UserWarning: At least one of the wavelets is longer than the signal. Consider padding the signal or using shorter wavelets.
  csd = csd_morlet(epochs, freqs, tmin=tmin, tmax=tmax, verbose=True)
    Computing CSD matrix for epoch 3
dics.py:53: UserWarning: At least one of the wavelets is longer than the signal. Consider padding the signal or using shorter wavelets.
  csd = csd_morlet(epochs, freqs, tmin=tmin, tmax=tmax, verbose=True)
...

It has one warning, and a single progressbar across epochs:

dics.py:53: UserWarning: At least one of the wavelets (335) is longer than the signal (211). Consider using a longer signal or shorter wavelets.
  csd = csd_morlet(epochs, freqs, tmin=tmin, tmax=tmax, verbose=True)
Computing cross-spectral density from epochs...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| CSD epoch blocks : 9/9 [00:00<00:00,   52.50it/s]
[done]

cc @wmvanvliet since this touches your code

@larsoner larsoner changed the title ENH: Progressbar for csd_morlet MRG, ENH: Progressbar for csd_morlet Dec 4, 2020
@larsoner larsoner added this to the 0.22 milestone Dec 4, 2020
@agramfort
Copy link
Member

agramfort commented Dec 6, 2020 via email

@agramfort agramfort merged commit ef2a2e4 into mne-tools:master Dec 14, 2020
@agramfort
Copy link
Member

thx @larsoner !

@larsoner larsoner deleted the dics branch December 14, 2020 21:22
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.

2 participants