Pipelines for Mouse Data Analysis in MNE-Python

Hey @Davi1990 Thank you for the update, and for starting this discussion.
If you want to convert a .obj file into a .surf file you can use the following code:

import mne

obj_file_path = "path/to/file.obj"
verts, faces = surf_dict = mne.read_surface(obj_file_path, file_format='obj')

surf_file_path = "path/to/surface.surf"
mne.write_surface(surf_file_path, verts, faces, overwrite=True, file_format="freesurfer")

I have recently looked into MNE source localization because I wanted to use a 4-layer BEM (in humans).
After a lot of trial and error, I reached the following conclusions:

  • It is possible to adapt the BEM model’s source code to make BEM models with any number of layers.

  • As long as the BEM model is made correctly the inverse/forward solution will work. You need to remove all the if statements that check if the BEM model has exactly 3 layers.

  • It’s unclear to me why MNE forces the users to have exactly 3 layers even if the mathematical model used to make the source localization works with any number of layers. For more information about the model I found this line of the Source code that points to this article

I also take the chance to point to these two questions that are related to the topic but haven’t been answered at the moment:

Good luck with your project and keep us updated with your progress.