MNE - Read Forward Solution from another toolbox

Hello,

I used duneuropy http://duneuro.org/ to be able to solve the forward problem using the FEM approach.

I want know to read the leadfield matrix to mne and create a forward instance. The generated from duneuro leadfield matrix is just a numpy array.

Is there a way?

I have all the necessary data (Head Model, Dipoles, Electrodes).

  • MNE-Python version: Version: 0.24.0
  • operating system: Ubuntu 20.04

Thank you in advance,

We don’t currently provide an interface to do that. It’s probably possible by replicating some of the code in mne.make_forward_solution() and the helper functions that it calls, but I’m guessing it would be difficult or unpleasant. You could start here: mne-python/_compute_forward.py at 5672f78b1e2bb3dd51fea1d30aa8f7a879d2ee38 · mne-tools/mne-python · GitHub

and here: mne-python/_make_forward.py at 5672f78b1e2bb3dd51fea1d30aa8f7a879d2ee38 · mne-tools/mne-python · GitHub

but I’m also tagging @larsoner because I’m sure I’m either missing something critical that would make it much harder, or missing something obvious that would make it much easier.

1 Like

Can you open a GitHub issue about this? I perhaps it’s something that we could incorporate in MNE via read_forward_solution_duneuro or something, but we’d have to think about an API, and if it would perhaps be better suited living in duneuro itself.

I created a github issue.

Thank you,

crossref: MNE - Read Forward Solution from another toolbox · Issue #10016 · mne-tools/mne-python · GitHub

1 Like