Computing the resolution matrix with loose orientations

Hi all,

I’m new to the forum and hope I’m asking my question in a constructive manner :slight_smile:

I’m on MNE 0.20 (maybe that’s the problem, but this is inside a larger software development project and updating hasn’t been done yet) on Ubuntu 20.04.

I’m working with a high density EEG dataset with 18 subjects, head models derived from individual MRIs. I’m trying to implement the region growing algorithm described in this paper, and for that I need the resolution matrix.

I’m trying to use mne.minimum_norm.make_inverse_resolution_matrix. The inputs are the forward solution, which I compute with:

fwd = mne.make_forward_solution(
            info, trans=trans, src=src,bem=bem, meg=False, eeg=True, mindist=mindist, n_jobs=4)

which results in

<Forward | MEG channels: 0 | EEG channels: 128 | Source space: Surface with 8196 vertices | Source orientation: Free>

I compute the inverse operator with:

inverse_operator = mne.minimum_norm.make_inverse_operator(
			epochs.info, fwd, noise_cov, loose=1, depth=None, fixed=False)

So as you can see, I am trying to use free orientations with the intention to take the normal component later.

Within make_inverse_resolution_matrix, the function _get_matrix_from_inverse_operator is called, which returns the matrix that is necessary to obtain the resolution matrix by multiplying it with the leadfield. In the docstring of this function, it states ā€œCurrently works only for fixed/loose orientation constraints. For loose orientation constraint, the CTFs are computed for the normal component (pick_ori=ā€˜normal’).ā€

The way I interpret this docstring is that if I used loose orientations, as I did, this function will pick the normal orientation, the result being a single magnitude. So I would expect a resolution matrix of size 8196 x 8196 (number of vertices). However, I get a resolution matrix of dimensions 24588 x 24588 which seems to indicate that the normal orientation was not picked, and I do not know how to handle 3D-CTFs here.

I have tried using an inverse operator with fixed orientations and converting the forward solution to 1D (using mne.forward.convert_forward_solution), but the resulting localization errors are enormous, so I would really like to stick to loose.

How can I get a resolution matrix with size 8196 x 8196 without fixing orientations?

Thanks for your help!
Best,
Katharina

apologies for the slow reply! Did you manage to solve the issue yourself? If not, maybe @olafhauk, @larsoner, or @agramfort might know the answer?

Hi! Thank you for replying :smile: I haven’t solved it :frowning: Help would indeed be appreciated. Maybe I’m just misunderstanding something.

This seems like an issue with either the documentation or the functionality. It does not seem like pick_ori='normal' actually gets used. I think it might actually be better if it doesn’t use the normal ori, and gives back something that has 3 entries for each location, along the lines of VectorSourceEstimate. @glombkat can you open a GitHub issue for this? We can figure out the right thing to do there.

Hello! Thank you!! I opened an issue ( #10187), hopefully correctly. Let me know if I need to edit it or add info.