Comments (16)
Yeah, it looks like it's only designed to work with Ico source spaces, not Oct -- is there some way to make it work with Oct, though? (I'm not too familiar with this...)
from mne-python.
Okay, I take it back, it seems to work okay. If I add patch info and use:
connectivity = mne.spatio_temporal_src_connectivity(src, n_times=1, dist=5e-3)
I get a connectivity matrix of the same size (8196 x 8196). So the inverse operator is selecting a subset of vertices to use...?
from mne-python.
In any case, we should figure out how to deal with the mismatch between the source estimates that are generated, and the size of these connectivity matrices.
from mne-python.
can it be because some sources are too close to the inner skull and excluded from the source space?
from mne-python.
the --mintdist param in the mne_do_forward_solution
from mne-python.
+1 this would make most sense
from mne-python.
Probably. I'm not sure if there is an easy way to detect this just from the source space instance, though, so I'm not sure how we'd throw an error...
from mne-python.
can you give the lines of code that would fail as a test?
from mne-python.
Sure thing:
import mne
data_path = mne.datasets.sample.data_path('..')
fname_inv = data_path + '/MEG/sample/sample_audvis-meg-oct-6-meg-inv.fif'
inverse_operator = mne.minimum_norm.read_inverse_operator(fname_inv)
connectivity = mne.spatio_temporal_src_connectivity(inverse_operator['src'],
n_times=1)
a = connectivity.shape[0]
b = sum([s['nuse'] for s in inverse_operator['src']])
assert a == b
from mne-python.
Basically, a user could assume that the STC they get from using that inverse_operator could be used in spatio-temporal clustering, and it can't very easily since the inverse_operator does not use the whole source space.
from mne-python.
One solution would be to morph the STC from the subject to itself, going from the subset of vertices used by inverse_operator to the full set of source space vertices, but this seems less appealing than somehow being able to generate a connectivity matrix that is compatible with the inverse_operator in the first place.
from mne-python.
Basically, a user could assume that the STC they get from using that inverse_operator could be used in spatio-temporal clustering, and it can't very easily since the inverse_operator does not use the whole source space.
why should the spatio temporal clustering break if sources are ignored
by the inverse operator?
I agree that it can produce artifacts like a clustering not going over
the top of the gyrus but is
that a really issue? just asking.
from mne-python.
The clustering breaks because the STC files generated by that inverse_operator will not have the same number of vertices as the connectivity matrix. They will have b
vertices, while the connectivity matrix will have a
vertices.
from mne-python.
The clustering breaks because the STC files generated by that inverse_operator will not have the same number of vertices as the connectivity matrix. They will have b vertices, while the connectivity matrix will have a vertices.
how about restricting the connectivity to the used vertices that you
find in the source space structure?
iuse key if I remember.
from mne-python.
That could work. I can give it a shot and see how it goes.
from mne-python.
Alright @agramfort, I think this fixes the issue, and I added a test. I have it raise a warning to the user so they know it's being subsampled.
from mne-python.
Related Issues (20)
- Building the MNE doc fails with Python 3.12 and 3.11 (?) HOT 5
- _extract_sampling_rate function for io.read_raw_snirf incorrectly estimates sample rate due to floating point error. HOT 3
- BUG: EpochsTFR bug popping up in MNE-BIDS-Pipeline HOT 1
- Read_raw_eyelink failure: missing headpos data in file HOT 4
- GDF reader bug HOT 6
- raw.compute_psd("multitaper", ...) on a raw with "bad_xxx" annotations yields all np.nan HOT 1
- BUG: EDF export failing on latest edfio HOT 3
- mne.time_frequency.read_tfrs() did not work correctly when MNE.Raw.compute_tfr(method='multitaper', output='phase') HOT 1
- Complete uninstall documentation missing HOT 3
- set_annotations changes key:value mapping in event_id dict HOT 5
- Be more explicit about what is returned by read_epochs_eeglab and read_epochs_kit HOT 3
- Unicode support in the method add.text() of mne.viz.brain HOT 1
- Can't download the fsaverage data by mne.datasets.fetch_fsaverage(verbose=0) HOT 3
- Bad channels do not show up at all in `raw.plot()` HOT 4
- Mouse Offset in Brain Plot HOT 14
- Incorrect rendering of embedded HTML title (?) HOT 4
- Layout issues in documentation (horizontal navbar) HOT 26
- Add SOUND and SSP-SIR algorithms HOT 3
- Cannot build docs HOT 8
- Customize website color palette HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mne-python.