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

Mask treats unmarked segments as clean #1

Closed
mabhijithn opened this issue Nov 23, 2018 · 2 comments
Closed

Mask treats unmarked segments as clean #1

mabhijithn opened this issue Nov 23, 2018 · 2 comments

Comments

@mabhijithn
Copy link

The documentation of the toolbox says that only data till the last marked artefact is used for filter computation. But it does not seem to be the case. Mask generated has 0s in unmarked segments which is later used in creating the matrix of clean (artefact free) data. Hence, unmarked segments are treated as clean.

@ben-somers
Copy link
Collaborator

Can you tell me how to reproduce this issue? Do you use mwf_getmask with EEGLAB to perform the manual marking? In that case, the code below should take care of replacing all segments after the last artifact segment with NaNs:

% set mask entries after last marked artifact to NaN
lastArtifactIdx = find(mask, 1, 'last');
mask(lastArtifactIdx+1:end) = NaN;

Note that in mwf_params.m, there is an option to specify how NaNs are treated. By default this is 'ignore', but if for some reason it is put on 'clean' then NaNs in the masked are treated as clean data.

@mabhijithn
Copy link
Author

It was my colleague who was having the issue. It seems the toolbox she downloaded did not have this portion. Strange. Now, she has cloned the repository and this code is present. No issue then.

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

No branches or pull requests

2 participants