Open hoechenberger opened 2 years ago
I like your first suggestion -- that seems like a reasonable method to have!
I like your first suggestion -- that seems like a reasonable method to have!
But it implies that the DigMontage "knows" it was created from one of our standard montages (and which). There is currently no way to store that information, or is there?
But it implies that the DigMontage "knows" it was created from one of our standard montages (and which). There is currently no way to store that information, or is there?
it could simply look for an exact match of channels between montage and "adjacency", right? 🤔
it could simply look for an exact match of channels between montage and "adjacency", right? 🤔
I'm not so sure, as there might be different adjacency matrices for the exact same list of channel names! At least in theory... no?
Also we'd have to load all adjacency matrices one by one until we find a match, this seems quite inefficient?
How about a private attribute in the montage class then?
I am not sure it's so easy, as we store montages as FIFF files and you know how it is with this standard :/
Or could we maybe transition to something else? HDF5 or so? @larsoner
But then how would we store a montage that has been applied to data... 🤔
I'm not sure that makes things so much easier. If you have montage name, you can just do:
montage_name = 'easycap-M1'
m = mne.channels.make_standard_montage(montage_name)
adj = mne.channels.read_ch_adjacency(montage_name)
assuming read_ch_adjacency
can do it. If it can't it would be nice if it could. :)
(ah, ok I get your point with ch_names
)
assuming
read_ch_adjacency
can do it. If it can't it would be nice if it could. :)
don't forget about #10746 💩
I am not sure it's so easy, as we store montages as FIFF files and you know how it is with this standard :/
I we could perhaps add a FIFF_DESCRIPTION
or FIFF_NAME
to the DigMontage read/write round-trip without needing to add anything to the FIF standard
I'd like to be able to do something like the following:
i.e., if I'm using one of our built-in montages and we are shipping a matching adjacency matrix, I want to be able to retrieve this matrix without having to worry about
ch_names
etc in the way I have to when using the current approach:Alternatively, we could have support for
make_standard_montage(..., return_adjacency=True)
to return the matrix alongside the montage.WDYT?
cc @mmagnuski @sappelhoff @cbrnr