arnodelorme / mffmatlabio

MFF Matlab file importer and exporter
GNU General Public License v3.0
11 stars 15 forks source link

Event misalignment when importing mff segmented data #44

Closed merilora closed 2 months ago

merilora commented 1 year ago

Hi, I am having an issue with importing mff segmented data into EEGlab. The time of the triggers in the mff files is not aligned with the event markers from categories.xml as these events appear to be shifted by several milliseconds. This delay is also not consistent, making it hard for me to understand where the delay comes from. In other words, in the column 'type', the trigger STAT should always overlap with one of 4 conditions (e.g. Plant or Animal) from categories.xml, however the conditions tend to appear several milliseconds after STAT. I also get these warnings when importing the data:

eeg_checkset warning: 3rd dimension size of data (115) does not match the number of epochs (1), corrected eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1 = number of frames eeg_checkset warning: 36/443 events had out-of-bounds latencies and were removed

Many thanks for any help you can offer.

arnodelorme commented 1 year ago

Is it possible for you to share a data file?

merilora commented 1 year ago

Thanks for the prompt response! Sure, here's a data file.

arnodelorme commented 1 year ago

Great. Can you confirm that you do not see the same shift when opening the file in Netstation. I do not have Netstation with me. Can you share a screencapture of Netstation?

merilora commented 1 year ago

The 4 conditions (e.g. Plant or Animal) are added to the file as categories during segmentation (see screenshot of segmentation tool) and they won't show on the segmented file as triggers. I can see the conditions if I view the data as categories though. If it is of any help, I also tried analysing the data with Wtools and I do not see the same shift when opening the file (i.e. the categories align correctly with the STAT triggers).

Screen Shot 2023-04-18 at 8 50 36 AM
merilora commented 1 year ago

Hi, I was wondering if there was any update with regard to this issue and if there's any other information I can provide to help figuring this out?

arnodelorme commented 1 year ago

The file is no longer there. Would you mind to upload it again?

arnodelorme commented 9 months ago

Might have found the file. See bugs/MFF44 folder

arnodelorme commented 2 months ago

This was a complex issue. It has been fixed.