sccn / eeglab

EEGLAB is an open source signal processing environment for electrophysiological signals running on Matlab and developed at the SCCN/UCSD
https://eeglab.ucsd.edu/
Other
601 stars 241 forks source link

MFF files imports not working #797

Closed LucieAman closed 1 month ago

LucieAman commented 2 months ago

Description

I cannot import my mff files anymore. I have tried different version of Matlab, EEGlab, mffimport plugin. I have also increased the JAVA memory allowance. https://drive.google.com/drive/folders/19tWVFEuutKhhr35dd4ZH11kB5a_NSHjF?usp=drive_link


Steps to Reproduce

  1. put the PiPWS_PWS023 mff file in a Raw_data folder
  2. change the loadpathMMN.m script with your path
  3. run the first two sections of the pipelineMMN.m script


Expected behavior:

the mff file is imported in a .set and .fdt files in the Imported folder


Actual behavior:

[What actually happened] Error using mff_importsignal (line 218) Error: Can not open the signal resource.\n

Error in mff_import (line 95) [floatData, allDataSize, srate, nchans] = mff_importsignal(mffFile);

Error in pop_mffimport (line 119) EEGTMP = mff_import(fileName{iFile}, correctEvents);

Error in dataimport_MMN (line 16) EEG = pop_mffimport(sprintf('%s%s', filepath, filename), 'code'); %needs MFFMatlabIO2.01 plugin

Error in pipelineMMN (line 49) dataimport_MMN(basenames{i}, raw_dir)


Versions

OS version [Sonoma 14.2]
Matlab version [*2024a and I have also tried with 2019b]
EEGLAB version [2024 and 2021]
CPernet commented 2 months ago

just to be sure you have the latest -- can you remove your plugin and clone instead https://github.com/arnodelorme/mffmatlabio -- this one has lately worked well for me

LucieAman commented 2 months ago

Dear Cyril,

Thank you for your help. I have downloaded the pluging from the link you sent and it still doesn’t work. I get the same error message. I tired to put it in my MATLAB toolboxes folder and in the plugin folder of EEGlab2024. Is there any other place I should try?

Best wishes, Lucie

From: Cyril Pernet @.> Date: Thursday, 15 August 2024 at 14:16 To: sccn/eeglab @.> Cc: Lucie Aman @.>, Author @.> Subject: Re: [sccn/eeglab] MFF files imports not working (Issue #797)

just to be sure you have the latest -- can you remove your plugin and clone instead https://github.com/arnodelorme/mffmatlabio -- this one has lately worked well for me

— Reply to this email directly, view it on GitHubhttps://github.com/sccn/eeglab/issues/797#issuecomment-2291162851, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM4YGAFAHGQE5EIPQAYBDWLZRSLZFAVCNFSM6AAAAABMR54WXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJRGE3DEOBVGE. You are receiving this because you authored the thread.Message ID: @.***>

CPernet commented 2 months ago

Right, so I can see from the error something like

Your script dataimport_MMN runs the line 16 EEG = pop_mffimport(sprintf('%s%s', filepath, filename), 'code'); so you need to

Next, the error in pop_mffimport (line 119) EEGTMP = mff_import(fileName{iFile}, correctEvents); could be that it does not find 'code' -- ah we pushed a fix recently, under review, see the file here -->

LucieAman commented 2 months ago

Dear Cyril,

Thank you for your reply. I have checked that the right filename is called. I have copied and pasted the code displayed at the link you sent me and replaced the pop_mffimport.m script with it in the mff toolbox. Was it the right thing to do? I still have the same error though.

Best wishes, Lucie

From: Cyril Pernet @.> Date: Thursday, 15 August 2024 at 15:16 To: sccn/eeglab @.> Cc: Lucie Aman @.>, Author @.> Subject: Re: [sccn/eeglab] MFF files imports not working (Issue #797)

alright, so I can see from the error something like

next, the error in pop_mffimport (line 119) EEGTMP = mff_import(fileName{iFile}, correctEvents); could be that it does not find 'code' -- ah we pushed a fix recently, under review, see the file here --> https://github.com/arnodelorme/mffmatlabio/pulls and maybe pulling my student repository will just do the trick (because we also ran into a few subject with 'code' but read as event.code for some reason)

— Reply to this email directly, view it on GitHubhttps://github.com/sccn/eeglab/issues/797#issuecomment-2291249123, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM4YGAAFX767YNDFWONVJVLZRSS3NAVCNFSM6AAAAABMR54WXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJRGI2DSMJSGM. You are receiving this because you authored the thread.Message ID: @.***>

CPernet commented 2 months ago

yes that was the right file but clearly did not help ... then you have to debug pop_mffimport.m
EEGTMP = mff_import(fileName{iFile}, correctEvents); my guess is correctEvents is faulty, then @arnodelorme should be able to find the fault TO DO:

LucieAman commented 2 months ago

Thank you Cyril for your help. Please find below the result of correctEvents

EEGTMP = mff_import(fileName{iFile}, correctEvents); Undefined variable 'fileName'.

Did you mean:

EEGTMP = mff_import(mfilename{isfile}, correctEvents); Brace indexing into the result of a function call is not supported. Assign the result of 'mfilename' to a variable first, then brace index into it.

You can download a file here: https://drive.google.com/drive/folders/19tWVFEuutKhhr35dd4ZH11kB5a_NSHjF?usp=drive_link

LucieAman commented 2 months ago

@CPernet, is there anything I can do to try to solve my problem? It is becoming increasingly urgent for me to import and preprocess my files. Is there any other alternative to EEGlab to import mff files? many thanks for your help

arnodelorme commented 2 months ago

Can you share a file that cannot be imported. It is on Windows or Mac?

On Mon, Aug 26, 2024, 04:06 LucieAman @.***> wrote:

@CPernet https://github.com/CPernet, is there anything I can do to try to solve my problem? It is becoming increasingly urgent for me to import and preprocess my files. Is there any other alternative to EEGlab to import mff files? many thanks for your help

— Reply to this email directly, view it on GitHub https://github.com/sccn/eeglab/issues/797#issuecomment-2309839290, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOJGQODG2YTHDIIXXJMXSLZTL4ZZAVCNFSM6AAAAABMR54WXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBZHAZTSMRZGA . You are receiving this because you were mentioned.Message ID: @.***>

LucieAman commented 2 months ago

It is Mac. None of my MFF files can be imported. Please find o ne of them here: https://we.tl/t-1yTQcEMFS0 Thank you.

arnodelorme commented 2 months ago

I imported this file with no problem on my MAC. Can you try importing the file manually (with the EEGLAB menu).

Would it be possible that you are importing the wrong file name in your script?

LucieAman commented 2 months ago

Dear Arnaud,

Thanks for trying. Would you mind sending me the imported file if you still have it so I can work on it? I have tried to import manually using the GUI but when I do that I cannot epoch the file. I get an error saying ‘ no epoch found’.

I don’t think I am importing the wrong file name in my script. I have also tried with files previously successfully imported in the past and I still get the same error. Also, I have checked I have the right ‘basename’ when I try to import it. Would it be too much to ask for you to import a few more files on your laptop for me? I only need to import 3 more files to be able to finish my analysis. No worries if not.

Best wishes, Lucie From: Arnaud Delorme @.> Date: Wednesday, 28 August 2024 at 00:46 To: sccn/eeglab @.> Cc: Lucie Aman @.>, Author @.> Subject: Re: [sccn/eeglab] MFF files imports not working (Issue #797)

I imported this file with no problem on my MAC. Can you try importing the file manually (with the EEGLAB menu).

Would it be possible that you are importing the wrong file name in your script?

— Reply to this email directly, view it on GitHubhttps://github.com/sccn/eeglab/issues/797#issuecomment-2313700745, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM4YGADNPCEWCXWHOHDRTCLZTT6SFAVCNFSM6AAAAABMR54WXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJTG4YDANZUGU. You are receiving this because you authored the thread.Message ID: @.***>

LucieAman commented 2 months ago

Dear Arnaud and Cyrille,

I was wondering if you know a student I could pay to import my 4 mff files for me? I urgently need to finish my eeg analysis, and I have no other options. Please let me know if you know anyone who would be interested and how much they would ask to do that. I have French and UK bank accounts but I can send a Wish bank transfer in any currency.

Best wishes, Lucie

From: Lucie Aman @.> Date: Wednesday, 28 August 2024 at 10:58 To: sccn/eeglab @.> Subject: Re: [sccn/eeglab] MFF files imports not working (Issue #797) Dear Arnaud,

Thanks for trying. Would you mind sending me the imported file if you still have it so I can work on it? I have tried to import manually using the GUI but when I do that I cannot epoch the file. I get an error saying ‘ no epoch found’.

I don’t think I am importing the wrong file name in my script. I have also tried with files previously successfully imported in the past and I still get the same error. Also, I have checked I have the right ‘basename’ when I try to import it. Would it be too much to ask for you to import a few more files on your laptop for me? I only need to import 3 more files to be able to finish my analysis. No worries if not.

Best wishes, Lucie From: Arnaud Delorme @.> Date: Wednesday, 28 August 2024 at 00:46 To: sccn/eeglab @.> Cc: Lucie Aman @.>, Author @.> Subject: Re: [sccn/eeglab] MFF files imports not working (Issue #797)

I imported this file with no problem on my MAC. Can you try importing the file manually (with the EEGLAB menu).

Would it be possible that you are importing the wrong file name in your script?

— Reply to this email directly, view it on GitHubhttps://github.com/sccn/eeglab/issues/797#issuecomment-2313700745, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM4YGADNPCEWCXWHOHDRTCLZTT6SFAVCNFSM6AAAAABMR54WXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJTG4YDANZUGU. You are receiving this because you authored the thread.Message ID: @.***>

LucieAman commented 1 month ago

Dear @CPernet and @arnodelorme I was wondering if you had seen my last message. Apologies for bothering you, but I have exhausted all my options. I have tried to import my files manually or with a different script and it worked, but I then have another error when I try to epoch my files: Error using pop_epoch (line 279) pop_epoch(): empty epoch range (no epochs were found). I know that there are epochs in my files.

Many thanks for what you can do to help. Best wishes, Lucie

arnodelorme commented 1 month ago

Dear @LucieAman , if we cannot reproduce the issue, we cannot help. I would advise to make sure you have the latest version of EEGLAB and of the mffplugin.