-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data exchange between .fif (MNE) and SPM #1
Comments
As a very first step it could nice to enable converting between MNE and SPM at some very specific stages of processing (e.g., getting data out of SPM after applying AMM). |
I think it would make sense to implement an SPM reader to MNE struct and that could then be exported to fif in MNE. |
I understand it can read mat files and the dat file is just a binary file that should also be easy to read. I once tried writing that and they then put the code bit in some repository of code bits but it'd probably be easier to write it from scratch than to look for that now. I'd be happy to help with the details of the format. It should be well documented in meeg.m header. |
That makes sense. For now the code allows you to read a meeg object, and necessarily there is a dict representation of the object hidden in the class (in meeg._objdict). That contains all the parameters, including the .inv field of the object. For the file_array containing the data, indexing is working now, so you can get the data by calling D[:,:,:]. Then it should be a matter of putting that correctly in a mne object ! |
I will check how it is done with fieldtrip to fiff function |
As I said on the other thread I think it makes sense to see how to put data from the kind of structures Johan's code generates into MNE structures and vice versa rather than develop fif export for SPM. The key question is whether FT's grad struct can be converted into something MNE can use. The rest should be easy. |
But if you want to use FT code D.ftraw and D.fttimelock object methods should be helpful |
This is my main worry. The |
Great, thank you for suggestions. I will look into it. |
It might be useful to consult Britta Westner https://github.com/britta-wstnr. She has a deep understanding of both FT and MNE. |
I don't think MNE has an equivalent to Reading in an SPM MEEG dataset as a |
Might be a good idea to talk to Britta and other MNE people as they might have their own plans for those things and if they know there is a clear need and use case, they might adapt to us rather than us adapting to what they have available. |
just adding brittas thoughts here for everyone to be aware of
We're not sure that option 2. is viable but @Y-Bezs will explore option 1 while working from home over winter break |
Use cases requiring a switch between processing in MNE and SPM for M/EEG need to be investigated for compatibility of data structures.
potential issues are:
The text was updated successfully, but these errors were encountered: