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

mismatch number of trials in OAT #63

Open
matsvanes opened this issue Aug 25, 2020 · 2 comments
Open

mismatch number of trials in OAT #63

matsvanes opened this issue Aug 25, 2020 · 2 comments

Comments

@matsvanes
Copy link

In osl_change_spm_eeg_data.m, it can occur that Sc.D and Sc.newdata have a different amount of trials. For example because Sc.newdata was created only on the 'good' trials of Sc.D (e.g. see oat_run_first_level_epoched.m). Copying the 'badtrials' and 'events' fields into D2 (line 112 and further) fails because of this mismatch in trial numbers.

The bug can be reproduced by running tutorial OAT 3 in osl_change_eeg_data, line 117

@matsvanes
Copy link
Author

See matsvanes@3e77a46 for a workable fix. It's not complete though, as the same issue can arrise when functions other than oat_run_first_level_epoched.m point to osl_change_spm_eeg_data.m

@matsvanes
Copy link
Author

@AJQuinn Have you thought of a way to also fix the event info? I could repeat the assignment of the event data to the structure that goes into osl_change_spm_eeg_data in oat_run_first_level_epoched.m to other functions that call osl_change_spm_eeg_data, but there might be a more clever fix.

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

1 participant