Verbose not working with the Epochs.drop_bad method
See original GitHub issueDescribe the bug
The verbose argument in not working in the drop_bad() method.
Steps to reproduce
import os
import mne
sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
'sample_audvis_raw.fif')
raw = mne.io.read_raw_fif(sample_data_raw_file, verbose=False).crop(tmax=60)
events = mne.find_events(raw, stim_channel='STI 014')
epochs = mne.Epochs(raw, events, tmin=-0.3, tmax=0.7)
epochs.verbose = False
epochs.drop_bad(verbose=True)
Expected results
The verbose argument set to True overwrites the Epochs.verbose attribute and prints the number of bad epochs dropped.
86 events found
Event IDs: [ 1 2 3 4 5 32]
Not setting metadata
Not setting metadata
86 matching events found
Applying baseline correction (mode: mean)
Created an SSP operator (subspace dimension = 3)
3 projection items activated
Loading data for 86 events and 601 original time points ...
1 bad epochs dropped
Actual results
The number of bad epochs dropped is not printed.
86 events found
Event IDs: [ 1 2 3 4 5 32]
Not setting metadata
Not setting metadata
86 matching events found
Applying baseline correction (mode: mean)
Created an SSP operator (subspace dimension = 3)
3 projection items activated
Additional information
It seems that in the source code of drop_bad() the argument verbose which defaults to None is not used.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
mne.Epochs — MNE 1.2.2 documentation - MNE-Python
All methods for iteration over objects (using mne.Epochs. ... Drop bad epochs without retaining the epochs data. ... Working with sEEG data.
Read more >Using autoreject to compute local threshes impacts the ...
I am trying to use autoreject to drop bad epochs with the function get_rejection_threshold. I discovered recently the local threshes method called ...
Read more >What is the use of verbose in Keras while validating the model?
By setting verbose 0, 1 or 2 you just say how do you want to 'see' the training progress for each epoch. verbose=0...
Read more >Flight Weather Delay System - NYU Stern
The model would have a serious data leakage problem if we had not adjusted the ... n_jobs=-1, verbose=2 -- Epoch 1 Norm: 118.49,...
Read more >Kernel does not print all Keras model.fit training output in ...
This kernel an example case. The problem happen to all kernel which have a lot of epoch, each epoch train in quite short...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

That one at least shouldn’t based on how the code is designed. The precedence/order is meant to be:
verbosearg is used if not Noneverboseattribute of a class is used if not NoneAnd in that last example, the
rawgets initialized withverbose=False, soraw.load_data()should always be in non-verbose mode regardless ofset_log_level.Thanks @larsoner, that would be nice if you have time as I’m not very familiar with it and it appears to be used as a decorator for a lot of functions/methods in MNE. Please let me know if I can help.