FIX: Fix simulate_evoked and apply_forward#9513
Merged
larsoner merged 4 commits intomne-tools:mainfrom Jul 1, 2021
Merged
Conversation
agramfort
approved these changes
Jun 30, 2021
mne/simulation/evoked.py
Outdated
| Measurement info to generate the evoked. | ||
| cov : Covariance object | ||
| cov : Covariance object | None | ||
| The noise covariance. |
Member
There was a problem hiding this comment.
If None what is it that we do?
Member
|
cc @LaetitiaG it should fix your pb. |
Contributor
|
Indeed, it works fine now! thanks a lot! |
larsoner
commented
Jul 1, 2021
Comment on lines
72
to
79
| evoked = apply_forward(fwd, stc, info, use_cps=use_cps) | ||
| if cov is None: | ||
| return evoked | ||
|
|
||
| if nave < np.inf: | ||
| noise = _simulate_noise_evoked(evoked, cov, iir_filter, random_state) | ||
| evoked.data += noise.data / math.sqrt(nave) | ||
| evoked.nave = np.int64(nave) |
Member
Author
There was a problem hiding this comment.
This is incorrect as you now no longer set nave in the cov=None case
Member
Author
There was a problem hiding this comment.
... oh I guess this was always the case when nave=np.inf, but I'll fix it here
Member
Author
There was a problem hiding this comment.
argh I see now why you did it this way. I'm okay with it!
larsoner
added a commit
to alexrockhill/mne-python
that referenced
this pull request
Jul 1, 2021
* upstream/main: MAINT: Speed up CIs (mne-tools#9518) Update tools (mne-tools#9517) FIX: Fix simulate_evoked and apply_forward (mne-tools#9513) FIX: Mayavi (mne-tools#9512)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.