I have fieldtrip dataset that contains sensor MEG data, virtual sensors from MEG and EEG data. I would like to review raw data of all modalities in brainstorm using the fieldtrip data importer. So far it loads the MEG channels as 'MEG' separate from EEG and virtual channels, which are loaded as 'OTHER'. Do you have a suggestion how to include the virtual channels here? Can I share with you an example dataset?
However, there is also another problem with the file you shared. The Brainstorm functions do not seem completely equipped to read it... If you look in the Matlab command line after reading the file, you'd see:
Error: Wrong number of coils for channel MRT41: Cannot import this file correctly...
Error: Wrong number of coils for channel MRT51: Cannot import this file correctly...
Error: Wrong number of coils for channel MRT52: Cannot import this file correctly...
Error: Wrong number of coils for channel MRT53: Cannot import this file correctly...
The positions of these sensors are defined in an unusual way. I'll need to ask the FieldTrip team what this can possibly mean, to know if we should get rid of these of these sensors, or handle them in a different way. I'll get back to you on this when I get an answer.
Right now, I think you can update Brainstorm and safely link again this file to your database.
I'll post further updates here if any (depending of the answer on the FieldTrip side)
Just one more comment: For me it looks like there is currently no clear definition whether negative or positive deflections of traces point upwards or downwards when reviewing MEG/EEG data. Considerung also the amplitude maps it looks like you start with positive amplitudes upwards initially which you can flip using "flip y-axes". The clinical standard is that negative amplitudes point upwards. Can you use this as standard setting for MEG/EEG traces and can you note somewhere in the traces window which definition is currently chosen? This will be very helpful for reviewing of epilepsy data sets.
It works for your file, but my work is not exactly finished, as I still need to understand if I can improve the heuristic I'm using to connect channels and coils...
I won't use the reverse Y axis as this specific to clinical EEG and SEEG. It would be too confusing for other users. But I will add something to indicate graphically the direction of the Y axis.
I am having problems importing fieldtrip structures, which I could import before. I get the following error messesage. I can share example data using a private link.
The function ft_datatype_sens.m, which is supposed to be in folder fieldtrip/utilities, is missing on your computer or is not in your path. Your installation of FieldTrip seems to be broken.
when importing fieldtrip.mat files into brainstorm, I get an outlier in the MEG channel topography. This outlier is not present in the initial fieldtrip file. Do you have an idea what might cause this error? I can share with you an example data set through a private linke. Thanks for your help!
Marcel
... In addition to this one wrong sensor position, I get the following error:
Error: Wrong number of coils for channel MLF12: Cannot import this file correctly...
Error: Wrong number of coils for channel MLF13: Cannot import this file correctly...
Error: Wrong number of coils for channel MLF14: Cannot import this file correctly...
Error: Wrong number of coils for channel MLF25: Cannot import this file correctly...
Error: Wrong number of coils for channel MLO53: Cannot import this file correctly...
Error: Wrong number of coils for channel MLT21: Cannot import this file correctly...
Error: Wrong number of coils for channel MLT31: Cannot import this file correctly...
Error: Wrong number of coils for channel MLT32: Cannot import this file correctly...
Error: Wrong number of coils for channel MLT41: Cannot import this file correctly...
Error: Wrong number of coils for channel MLT47: Cannot import this file correctly...
Error: Wrong number of coils for channel MLT57: Cannot import this file correctly...
Error: Wrong number of coils for channel MRF12: Cannot import this file correctly...
Error: Wrong number of coils for channel MRF13: Cannot import this file correctly...
Error: Wrong number of coils for channel MRF14: Cannot import this file correctly...
Error: Wrong number of coils for channel MRT21: Cannot import this file correctly...
Error: Wrong number of coils for channel MRT31: Cannot import this file correctly...
Error: Wrong number of coils for channel MRT41: Cannot import this file correctly...
Error: Wrong number of coils for channel MRT51: Cannot import this file correctly...
Error: Wrong number of coils for channel MRT53: Cannot import this file correctly...
After looking at the data, the issues (outlier and blanks in channel file) have the origin:
Rebuilding the coil-channel matrix, since the 'reject' step essentially removed one (or a few) components from the data, so these cannot be anymore recovered. Here are detailed explanation:
To fix this issue an heuristic fix was implemented and worked for the previously shared data (Jun 2022). However, the newest shared data is a case where it fails. This is well reported in: Importing fieldtrip data - #6 by Francois
Details:
Outlier (MLF33). In this case, in the (imperfect) rebuild the coil-channel matrix, channel MLF33 is defined by two coils, but they are the two reference coils (in red)
As Francois seems to be unavailable: Is there anyone else who is able to reorganize the import of fieldtrip data into brainstorm so that it doesn't change the positions of the MEG sensors?