olafdimigen / eye-eeg

EYE-EEG toolbox for combining eye-tracking & EEG
https://www.eyetracking-eeg.org
37 stars 12 forks source link

Bug report email: synchronize() & detecteyemovements() #27

Open olafdimigen opened 1 year ago

olafdimigen commented 1 year ago

Thanks to user Maria for this bug report!

I came across the following issues when using the eye-eeg plugin for eeglab.

In eye-eeg-0.99\synchronize.m

Line 247 Should be new_ix = zeros(size(ET.event, 1),1);

Instead of new_ix = zeros(length(ET.event),1);

Also in \eye-eeg-0.99\detecteyemovements.m

Line 240

find(ismember({EEG.event.type},'bad_ET'))

gives an error – at least with my eeglab data “Error using cell/ismember (line 34) Input A of class cell and input B of class char must be cell arrays of character vectors, unless one is a character vector.”

olafdimigen commented 1 year ago

(Test dataset provided)

olafdimigen commented 1 year ago

Comments: Bug 1 should be fixed in latest code. Bug 2 almost certainly due to user having integers in EEG.event.type which is deprecated and causes ismember() to fail once converted to cell. Hotfix is to convert EEG.event.type to strings using num2str(). ToDo: catch this special case (and possibly convert EEG.event.type to string with user warning).