I’m having difficulty reading .set and .study files into the EP Toolkit and I wonder if Joe or some other helpful soul could say why.
I exported a single (average) waveform from BrainVision Analyzer with 12 electrode channels and 450 sample points. This opens fine and plots fine in EEGLab. All electrodes (bar the EOG ones) are displayed in the correct place on the topographical map. However, when I try to read this into the EP Toolkit, either as a .set file a .study file, I get the message “Error using ft_senslabel (line 3496) the requested sensor type is not supported”
I have removed the EEGLab folder from the FieldTrip\external directory. I have removed fieldtrip-partial and fileio folders from the EEGLab\external directory.
Note that on opening the EP Toolkit I was getting a warning: “You appear to be using the version of Fieldtrip that comes with EEGlab and/or in SPM (in its external directory).” Above this was a path which I supposed was indicating the offending duplicate
I therefore also removed fieldtrip-partial and fileio folders from the external folder in this path, but then I got a new error message “Previously accessible file
is now inaccessible.” So I stuck them back in.
I don’t believe I have made a mistake in using the ft_defaults process described in the EPToolkit tutorial: I used the Add Folder option and then ft_defaults in the command window and the additional paths were visibly added before I saved the new path. On saving the path I get the warning once again about the extra copy of Fieldtrip described above.
I am new to Matlab so it is possible I have done something dense along the way. I would strongly prefer to use the EP Toolkit on waveforms pre-processed in BrainVision rather than repeating the various artefact rejection and segmentation processes in EEGLab or the EP Toolkit.
N.B On opening the EP Toolkit message I also get another warning, though I assume this is not currently a problem “You have a binary ICA program installed. The file is called: ica_linux. There is not currently one that is appropriate for Windows.”
Sorry to hear about these problems! First of all, please send me a copy of your .set and .study files so I can troubleshoot. Second, not sure what is going on with your install. If you type which('ft_read_header') into the command line, what do you get once the copy of FieldTrip's fileio in the eeglab folder is removed? It sounds like there was a problem with fieldtrip's installation? It should have taken over. As for the ICA error message, look again at the tutorial. It is fully explained as part of the installation procedure. it sounds like you skipped part of it.
It just occurred to me. From the error message I think you did something unusual. I've never seen a message like that. Did you put EEGlab and EPtoolkit and so forth into the Matlab application folder itself? If so, I think what is happening is that you got it confused about whether they are part of Matlab or just programs written in Matlab. You need to keep them in an outside directory. This in turn may have led to problems reading in your .set file.
Your best bet to have things work is to follow my installation instructions step by step and not to deviate from them unless absolutely necessary.
Thanks for a super-prompt reply Joe
Attached is a sample .set file. With regard to your points:
Typing which('ft_read_header') returns
which I rather assume means that the Fieldtrip installation has not “taken over” as it should. I’m guessing this is the source of the problem
Regarding the ICA message, yes, I skipped specifically this part since I was not at the outset intending to us the ICA function and wanted to see if I could get the PCA aspects running. I assume this can’t be the source of the current problem though? Bar skipping the ICA function I believe I’ve followed everything strictly, however.
EEGLab, EP Toolkit and Fieldtrip are not in the same folder as Matlab, they have always been in a quite separate path originating on the Desktop, Matlab within the default Program Files.
In case I did something untoward with Fieldtrip installation, I have deleted the existing copy, downloaded a new version (the lite version 08/18/13) returned it to the same directory, though this time have left the eeglab folder in the downloaded Fieldtrip’s external directory as per your comment in in the tutorial, added the path for the top FieldTrip folder, run ft_ defaults, and saved this path. N.B I have never “removed” any of the paths I have added.
Reinstallation produces the same problems:
On adding the path for the reinstalled FieldTrip I get the same warning about the Fieldtrip files held within Matlab
On running EP Toolkit I get a message along the same lines, i.e:
Warning: You appear to be using the version of Fieldtrip that comes with EEGlab and/or in SPM (in its external directory). If you rely on it alone, it will tend to be an obsolete version, with unpatched bugs causing problems. If you have both a current version of FieldTrip installed and the older version that comes with EEGlab and/or SPM, then they tend to conflict and cause problems. It is recommended that you delete EEGlab and SPM's copies or otherwise disable them when using the EP Toolkit and instead rely on just having the most recent version of FieldTrip installed separately. See tutorial file for details.
On trying to read into EP Toolkit I get the ft_senslabel error as before
As previously, removal of the duplicate Fieldtrip in the existing Matlab path produces the inaccessibility error message previously described when I try to read in a .set file to the EP Toolkit. (Surprisingly after rebooting Matlab, I still get a warning about multiple Fieldtrips even when I had temporarily taken out fileio and fieldtrip-partial folders from the external folder of this Matlab version of Fieldtrip)
The text in the EP Toolkit tutorial refers to the necessity of removing the stripped down version of Fieldtrip held in EEGLab which I understand to refer to EEGLab itself, i.e.. just the EEGlab I installed. It is the ft_defaults.m file held within Matlab’s own eeglab12_0_2_0b\external\fieldtrip-partial folder that seems to be the problem.
Yes, but you have installed these Matlab programs inside the Matlab folder that is intended for Matlab Toolboxes (that are extensions to Matlab itself and that one pays Mathworks to obtain). I think you need to put them in a folder outside of the Matlab folder entirely. I suspect it won't get confused like this if you do so. Try it and see. Again, I've never seen anything like this before and none of the other users have reported anything like this. I think it is because you are putting them somewhere that they are not intended to be.
Thanks for another quick turnaround Joe.
As far as I understand, it’s the rogue eeglab12_0_2_0b folder in the Matlab toolbox that you believe is to blame. However, I did not put it there.
If by “these Matlab programs” you mean Fieldtrip, EEGlab and the EP toolkit, they definitely have not been placed by me anywhere near the folder that contains Matlab and all subfolders (inc. toolbox) itself. They were extracted to a quite distant folder. So the eeglab12_0_2_0b folder’s appearance in the Matlab path comes from somewhere else
It seems that installation of EEGlab, even in a location quite away from Matlab still results in a file being placed within the Matlab path. I say this because colleagues who have Matlab but not EEGlab installed do not have the eeglab12_0_2_0b folder in their Matlab path, but colleagues who have installed EEGLab (though not the EP toolkit) do have this folder in the Matlab path which is what makes me believe that EEGLab is placing files in the Matlab path of its own accord upon installation.
However, presumably this is not something you expect to happen given your comments. I’ll do a little more investigation of this, and post when I am sure
Hey Sam, not looking to place blame. Just trying to troubleshoot. The way troubleshooting works is that it's like a mystery novel. You have a whole series of possible suspects and you then work through them by the process of elimination. So what we have here is one possible suspect. All we need to do to test this is to just move the eeglab and EP Toolkit and FieldTrip folders out of the C:\Program Files\MATLAB\R2012b\toolbox folder, restart Matlab in order to reset things, go through the installation steps, and then see what happens. It should take maybe five minutes. I'm not doing it myself because I'm not getting this error on my system. However, if you don't wish to do this then that is fine with me. Good luck!
Sorry, meant to type Tom. I'm a bit sleep-deprived. :)
OK I have implemented trouble shoot step 1.
I uninstalled and reinstalled Matlab but mysteriously the reinstalled version came once again with an EEGLab folder in its toolbox. I can only assume that my university is supplying some image of Matlab that they have fiddled with to pre-emptively supply me with some EEGlab functionality that is getting in the way.
I therefore installed Matlab via an alternative route directly from Mathworks and hey presto it came without EEGLab in the Matlab toolbox folder.
So I now have a Matlab path with no reference to EEGLab, Fieldtrip or EP Toolkit.
The three add-on programs EEGLab, FieldTrip and EP Toolkit remain in their other folder, and the external folder of EEGLab still has has the fileio and fieldtrip-partial folders removed.
In MATLAB, paths to EEGlab, Fieldtrip and EP toolkit have been specified anew.
EEGLab and EP Toolkit open fine (I don’t know how Fieldtrip is opened). No errors are flagged on opening EEGLab. EP toolkit gives me the same warning about ICA but I have delayed dealing with that for the time being on the assumption that it can’t be the source of current problems. Importantly, now that MATLAB is no longer carrying a preinstalled EEGlab, I no longer get the warning about multiple versions of Fieldtrip.
Nevertheless on trying to read a .set file into EP Toolkit I get the same error regarding ft_senslabel. I was surprised!
I have gone back and checked the MATLAB path and there is no sudden migration of any EEGLab folder into it.
On opening EP, the following information is provided: you would be in a beter position to say if the path which EP Toolkit is using to do what it needs to do with FieldTrip is correct.
Warning: You have a binary ICA program installed. The file is called: ica_linux
There is not currently one that is appropriate for Windows.
Thanks once again in advance.
Okay, one problem down then! I have an urgent grant deadline Tuesday. I'll look at this right afterwards!
Hi Joe, I was wondering if you had had any further thoughts on the mysterious ft-senslabel error?
Sorry about the delay! It looks like it's a bug in the FieldTrip code so I'll need to consult with the other FieldTrip developers.
Okay, I think we have a fix for it. Robert Oostenveld put something together for you. However, when I tried to read your file, it said the .fdt file was missing. EEGlab .set files come as either standalone files or paired with a .fdt file with the same name. If your file is the latter, could you send that as well so I can test it out?
also, is it okay if I send him your data file so he can use it for testing?
Thanks for getting back to me. Yes please pass the data on to where its needed. I've attached the complementary .fdt file
Okay, it looks like the new revision is working. Try downloading today's FieldTrip release and see if it fixes your problem. Let me know if it does so that we can close out this bug report.
Thanks Joe and please pass on my thanks to Robert Oostenveld for working on his weekend.
EP is now reading in EEGLab files fine. I'm delighted with this.
Glad to hear it!