arnodelorme / mffmatlabio

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

error exporting epochs #29

Closed ometett closed 4 years ago

ometett commented 4 years ago

Hi Arno,

I was able to fix the issue with importing channel locations by updating the plugin to the latest version thanks to your guidance. I now have one type of error when exporting epochs. I am only changing and the sample of the eeg file and keeping everything the same but it gives me an error " Array indices must be positive integers or logical values."

Error in mff_exportepochs (line 63) durations = [0 durations durations(end) ];

I thought it could be fixed by setting the duration of each event to 0 but that did not help. I will attach the screenshot of the error down below. Any of your help is very much appreciated, thank you for your time.

Regards, error

arnodelorme commented 4 years ago

Let me try with the data you sent. What do you mean by "changing and the sample of the eeg file.” You mean changing the sampling rate? I am not sure what Fieldtrip does with your data structures. Could you try doing the same under EEGLAB?

Arno

On Jul 23, 2020, at 6:22 PM, ometett notifications@github.com wrote:

Hi Arno,

I was able to fix the issue with importing channel locations by updating the plugin to the latest version thanks to your guidance. I now have one type of error when exporting epochs. I am only changing and the sample of the eeg file and keeping everything the same but it gives me an error " Array indices must be positive integers or logical values."

Error in mff_exportepochs (line 63) durations = [0 durations durations(end) ];

I thought it could be fixed by setting the duration of each event to 0 but that did not help. I will attach the screenshot of the error down below. Any of your help is very much appreciated, thank you for your time.

Regards,

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ometett commented 4 years ago

I do a polyfit with meg times and eeg times, get slope and offset values and use them to scale the eeg event samples to match meg event samples. I don't change the sampling rate they both stay at 1000.

ometett commented 4 years ago

I also perform ft_preprocessing to get a single continuous trial. Could that be a reason why? Because it seems like boundaryEvent is always empty and the program fails when the line "durations(end)" called.

arnodelorme commented 4 years ago

Yes, it could be the reason. I am not sure.

Arno

On Jul 23, 2020, at 7:42 PM, ometett notifications@github.com wrote:

I also perform ft_preprocessing to get a single continuous trial. Could that be a reason why? Because it seems like boundaryEvent is always empty and the program fails when the line "durations(end)" called.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.