-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Error message for simulate evoked. #3372
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
|
Looks like the caching is somewhat working. For PRs it is using the cache of the fork of the user. For this PR it only had a subset of the datasets because I had been playing around with the cache on my other branch. This could actually be the root of our problems somehow. |
Current coverage is 86.67%@@ master #3372 diff @@
==========================================
Files 335 335
Lines 57635 57639 +4
Methods 0 0
Messages 0 0
Branches 8782 8783 +1
==========================================
+ Hits 49959 49961 +2
- Misses 5001 5002 +1
- Partials 2675 2676 +1
|
mne/simulation/evoked.py
Outdated
| noise = simulate_noise_evoked(evoked, cov, iir_filter, random_state) | ||
| evoked_noise = add_noise_evoked(evoked, noise, snr, | ||
| tmin=tmin, tmax=tmax) | ||
| if evoked.data.shape != noise.data.shape: |
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.
This check should probably be in add_noise_evoked somewhere, and also it should probably check that the set of channels is the same, not just that the data sizes are the same
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.
... or actually I guess the error should be in simulate_noise_evoked
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.
In simulate_noise_evoked we essentially just do
noise = evoked.copy()
noise.data = noise_data
, so the channels are actually the same anyway. Maybe this needs a more thorough look.
|
Comment addressed. |
|
LGTM can you add a test? |
Done. |
|
thx @jaeilepp |
* 'master' of git://github.com/mne-tools/mne-python: (48 commits) FIX: Flake fix pep8 [MRG] FIX Topographic plotting for KIT-UMD data (mne-tools#3349) QUICKFIX: logging test Error message for simulate evoked. (mne-tools#3372) Warnings for big bems. (mne-tools#3374) Add test for baseline correction. Use apply_baseline in read_evokeds. Makes (None, 0) the default value baseline in apply_baseline. [FIX] Adds apply_baseline to Evoked fix component inds in ica tutorial (mne-tools#3379) FIX: Xdawn with shuffled epochs (mne-tools#3373) FIX consistency: Epochs.load_data() should always return self (mne-tools#3376) MRG: Build relevant examples (mne-tools#3365) [MRG] set vmin, vmax after smoothing in plot_epochs_image (mne-tools#3360) [FIX] Attempt to fix circle. fixing a bg plotting bug for topo plots Modified test and tutorial. [MRG] convert surface using python. (mne-tools#3273) [MRG] raw.plot_psd() with flat channel (mne-tools#3342) ...
This is for testing the circle caching, but I thought I'd tackle an issue in the meantime.
Closes #3370
See if this is good enough.