Laptop crashes while trying to compute/plot inverse solution. I suspect my forward model is too intricate. How to address?

https://mne.tools/stable/auto_tutorials/forward/35_eeg_no_mri.html
I followed the tutorial here, as I’d like to start working in the 3-dimensional
When I check my resources, Python has chewed through all my memory. I saw this:
<Forward | MEG channels: 0 | EEG channels: 19 | Source space: Surface with 20484 vertices | Source orientation: Free>
20484 vertices seems excessive. Any tips on how I can reduce this so I can start doing calculations/analysis? Thanks!

Edit: If it helps, I am trying to do lorettas/source localization when I only have eeg data. I don’t need an extreme degree of precision, just something that is good enough to test locally before I deploy on the cloud.

this line of that tutorial:

src = op.join(fs_dir, 'bem', 'fsaverage-ico-5-src.fif')

is loading the source space that has 20484 vertices (ico-5). You can consider using mne.decimate_surface — MNE 1.2.2 documentation to reduce it, or you can manually set up a lower-resolution source space mne.setup_source_space — MNE 1.2.2 documentation. I’d probably to the latter, it seems easier.

I forgot to include this link, to the different source space “presets” for number of vertices. The typical M/EEG workflow — MNE 1.2.2 documentation

1 Like