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)
- Implement virtually moving head position for evokeds HOT 3
- Dozens of symbols in `mne.utils` are unknown to my static type checker, probably due to an issue with lazy loading HOT 4
- MAINT: Release 1.8 HOT 2
- in mne.viz.plot_evoked_topo, the ylim parameter breaks when grads become before mags in the data
- Allow `Spectrum` objects to support complex coefficients HOT 1
- Bug reading raw BrainVision data HOT 2
- set_channel_types does not properly set the coil_type for eyetracking channels HOT 3
- Type incompatibility between sklearn's API and `SlidingEstimator` HOT 8
- Some font colors in the dark theme are not readable HOT 3
- interpolate_blinks docstring should mention the method of interpolation HOT 1
- Inconsistent handling and documentation of pupil size units HOT 10
- Dropping all channels raises "No channels match the selection" HOT 3
- MNE.NIRS/nilearn.plotting Errors HOT 8
- Misleading parameter description in `fit_transform` method of `CSP` and `SPoC` HOT 1
- Cannot open nedf file from Neuroelectrics HOT 4
- Should `fetch_fsaverage()` return a `Path`? HOT 8
- Add Missing Fields to RawEEGLAB and EpochsEEGLAB Classes HOT 3
- HTML repr tables have really bad text contrast ratios HOT 4
- all random code should use default_rng
- DOC: Contributor credit improvements HOT 1
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.