sccn / EEG-BIDS

21 stars 17 forks source link

Issues with event import function #120

Closed dungscout96 closed 4 months ago

dungscout96 commented 2 years ago
dungscout96 commented 2 years ago

There's behavior change for readtable in 2020a. Alsoot sure about compatibility with Octave. Suggested to add Kay's functions to the repo and have options to use them from the main functions. Ask Kay to provide example when NaN handling is not correct

dominikwelke commented 2 years ago

hi All,

i also observed some of the above problems and one additional one causing an error for me. maybe it is system specific, though:

when importing BIDS events of a dataset, i get the error message that the column label ' onset' (as with a leading whitespace) does not exist. i dont have any special character in the tsv file, but somehow the reader seems to reads the first entry of the file like that.

it would be very easy to fix though https://github.com/sccn/bids-matlab-tools/blob/fbce188ddd936fd7b7dba9d8de82687463d509f3/eeg_importeventsfiles.m#L75-L80

...by changing L75 to for iField = 3:length(eventData(1,:))

it is a save change, as col 1 and 2 have to be onset and duration by BIDS standard and are already imported. (btw, I tried stripping the extracted column headers but it didnt help. no clue what matlab does here)

dungscout96 commented 4 months ago

We have updated our event import mechanism in https://github.com/sccn/bids-matlab-tools/blob/master/bids_importeventfile.m