Skip to content

Conversation

@larsoner
Copy link
Member

No description provided.

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

if you can just update the docstring it would be great !

thx @larsoner !

Measurement info to generate the evoked.
cov : Covariance object
cov : Covariance object | None
The noise covariance.
Copy link
Member

Choose a reason for hiding this comment

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

If None what is it that we do?

@agramfort
Copy link
Member

cc @LaetitiaG it should fix your pb.

@LaetitiaG
Copy link
Contributor

Indeed, it works fine now! thanks a lot!

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

@larsoner I pushed here. Merge if happy

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)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is incorrect as you now no longer set nave in the cov=None case

Copy link
Member Author

Choose a reason for hiding this comment

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

... oh I guess this was always the case when nave=np.inf, but I'll fix it here

Copy link
Member Author

Choose a reason for hiding this comment

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

argh I see now why you did it this way. I'm okay with it!

@larsoner larsoner merged commit 99e39ef into mne-tools:main Jul 1, 2021
@larsoner larsoner deleted the apply branch July 1, 2021 13:00
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)
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