Skip to content
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

MRG: Add add_noise to simulation #5859

Merged
merged 4 commits into from
Jan 29, 2019
Merged

Conversation

larsoner
Copy link
Member

One part of what we need for #5058 (comment)

mne/simulation/evoked.py Outdated Show resolved Hide resolved
mne/simulation/evoked.py Outdated Show resolved Hide resolved
@larsoner
Copy link
Member Author

@agramfort done

@codecov
Copy link

codecov bot commented Jan 24, 2019

Codecov Report

Merging #5859 into master will increase coverage by 0.06%.
The diff coverage is 98.64%.

@@            Coverage Diff             @@
##           master    #5859      +/-   ##
==========================================
+ Coverage   88.62%   88.69%   +0.06%     
==========================================
  Files         373      396      +23     
  Lines       69355    71871    +2516     
  Branches    11669    12071     +402     
==========================================
+ Hits        61465    63744    +2279     
- Misses       5037     5199     +162     
- Partials     2853     2928      +75

@larsoner larsoner added this to the 0.18 milestone Jan 24, 2019
@agramfort
Copy link
Member

ok for you @makkostya and @ngayraud ?

@agramfort
Copy link
Member

ping @makkostya @ngayraud @sdeslauriers

ok for you?

@ngayraud
Copy link
Contributor

Looks good!

@agramfort
Copy link
Member

great

ok for you too @makkostya ?

@makkostya
Copy link
Contributor

If I understood well, the function is replacing the inst.data by simulated noise, not adding it?
Thus adding noise is done outside the function (something like soi.data + noise.data)?
If it is like this, I'm Ok with it.

Just the line:
for epoch in data:
will it work properly if inst is a raw?

@larsoner
Copy link
Member Author

If I understood well, the function is replacing the inst.data by simulated noise, not adding it?

Oops, that's a bug.

will it work properly if inst is a raw?

Yes internally the function makes a new view of the data array, i.e. shape (1, 306, ...) if it's raw so it's unified.

@agramfort
Copy link
Member

agramfort commented Jan 29, 2019 via email

@larsoner
Copy link
Member Author

Agreed :)

@ngayraud
Copy link
Contributor

@makkostya good catch!

@agramfort agramfort merged commit 014f87c into mne-tools:master Jan 29, 2019
@agramfort
Copy link
Member

thx @larsoner and @makkostya / @ngayraud for taking a look.

it would be great to have a tutorial soon on how to simulate data.

@larsoner larsoner deleted the add_noise branch January 29, 2019 20:38
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.

4 participants