-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spatio_temporal_src_connectivity failure #185
Comments
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...) |
Okay, I take it back, it seems to work okay. If I add patch info and use:
I get a connectivity matrix of the same size (8196 x 8196). So the inverse operator is selecting a subset of vertices to use...? |
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. |
can it be because some sources are too close to the inner skull and excluded from the source space? |
the --mintdist param in the mne_do_forward_solution |
+1 this would make most sense |
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... |
can you give the lines of code that would fail as a test? |
Sure thing:
|
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. |
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. |
why should the spatio temporal clustering break if sources are ignored |
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 |
how about restricting the connectivity to the used vertices that you iuse key if I remember. |
That could work. I can give it a shot and see how it goes. |
This is the first draft in which I tried to find a remedy for the API issues described in mne-tools#185 which ensue from integrating PCA and ICA. To keep things as consistent a possible and only minmally change the API I choose class method approach for initializing from raw or epochs; it basically merges the init and the decomposition into one step. I integrated @agramfort 's max_n_components arg and at the same time the user can select the n_components via explained variance. Also note that with this approach we may fully control the PCA, e.g. jsut drop components for ICA but keep them for the final unmixing. This isn't fully wokring yet but the API and the examples clearly expose the idea behind it. @agramfort @mluessi @Eric89GXL -- I would be happy to get some general feedback before putting further effort in cleaning up / testing.
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. |
It looks like spatio_temporal_src_connectivity (which calls spatio_temporal_tris_connectivity) doesn't handle some source spaces correctly.
a is 8196 while b is 7498, so this fails. I assume this is because it either isn't designed to handle oct source spaces (?), in which case should we have it throw an error? Or is there some way to make it work with oct source spaces?
The text was updated successfully, but these errors were encountered: