-
Notifications
You must be signed in to change notification settings - Fork 14
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
563 add channelcmb parameter to connectivityanalysis frontend #565
563 add channelcmb parameter to connectivityanalysis frontend #565
Conversation
- TODO: proper channel name propagation and granger Changes to be committed: modified: syncopy/connectivity/ST_compRoutines.py modified: syncopy/connectivity/connectivity_analysis.py modified: syncopy/shared/computational_routine.py
Changes to be committed: modified: syncopy/connectivity/ST_compRoutines.py modified: syncopy/connectivity/connectivity_analysis.py modified: syncopy/shared/computational_routine.py
- that was a mean bug
Changes to be committed: modified: syncopy/connectivity/connectivity_analysis.py
- could not spot a reason why this wouldn't work Changes to be committed: modified: syncopy/datatype/selector.py
- so non-contiguous csd channel_i/channel_j selections are possible :) Changes to be committed: modified: syncopy/datatype/selector.py modified: syncopy/tests/test_selectdata.py
- seems to work, proper tests to follow Changes to be committed: modified: syncopy/connectivity/connectivity_analysis.py
Changes to be committed: modified: syncopy/connectivity/connectivity_analysis.py modified: syncopy/tests/test_connectivity.py
Changes to be committed: modified: syncopy/shared/computational_routine.py modified: syncopy/tests/test_connectivity.py
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev #565 +/- ##
==========================================
+ Coverage 69.31% 69.33% +0.01%
==========================================
Files 87 87
Lines 10123 10213 +90
Branches 2125 2151 +26
==========================================
+ Hits 7017 7081 +64
- Misses 2533 2545 +12
- Partials 573 587 +14
☔ View full report in Codecov by Sentry. |
Changes to be committed: modified: syncopy/connectivity/connectivity_analysis.py
Wow, great to hear that you did not have to mess with the Selector logic at all to allow non-contiguous and unorderd channel_i and channel_j selections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, this will make the code for the paper look a lot better.
Changes Summary
channelcmb=[senders, receivers]
forspy.connectivityanalysis
selectdata
now allow non-contiguous and unorderdchannel_i
andchannel_j
selections, there was no reason apparent why this was not allowed before (I did not fiddle with any selection mechanics inside theSelector
)Now users can fine tune the channel-pairs for which to compute the connectivity measure as in FieldTrip:
will compute only 6 pairs: (01, 05, 08, 31, 35, 38) and the resulting
CrossSpectralData
is rectangular in the channel axes withchannel_i=senders
andchannel_j=receivers
.Note: the old way of doing a channel selection on the input:
would instead compute 20 pairs (+diagonal): the full dyadic (or tensor) product of those 5 channels.
Implementation differs according to the method
Granger causality
CrossSpectralData
object. The factorization algorithm is most stable when only computing pairs, however for many trials/few channels it would be much more effective to compute more pairs at once.CSD/PPC
Coherence
channel_i/senders
channel_j/receivers
combinations which now is possible.Limitations
('coh', 'csd', 'ppc', 'granger')
SpectralData
) as re-writing the whole implicitfreqanalysis
part when inputtingAnalogData
intoconnectivityanalysis
would require some bigger refactoring (design is actually bad for historic reasons)channelcmb
Reviewer Checklist