mne-tools / mne-connectivity

Connectivity algorithms that leverage the MNE-Python API.
https://mne.tools/mne-connectivity/dev/index.html
BSD 3-Clause "New" or "Revised" License
68 stars 34 forks source link

Should mne_connectivity.spectral have an option to not “combine”? #26

Closed adam2392 closed 2 years ago

adam2392 commented 3 years ago

Inside mne_connectivity.spectral_connectivity, all functions assume that Epochs are samples of the same connectivity structure. That is, they average over Epochs implicitly in the function.

The code is a bit harder to parse through, but wondering if it is worth the effort to also, allow it to return an EpochSpectroTemporalConnectivity, rather then SpectroTemporalConnectivity to allow the user some flexibility of later "combining" over epochs with median/mean/etc?

larsoner commented 3 years ago

All of the spectral estimators IIRC currently collapse across epochs to make their estimates (i.e., there is no estimate of connectivity for an individual epoch), so I don't see a way to do this.

larsoner commented 3 years ago

(and currently I don't think they'd return SpectroTemporalConnectivity but rather just SpectralConnectivity even now, since the temporal dimension is converted / changed to spectral domain?)

adam2392 commented 2 years ago

This is now closed by #69 and #67 introducing spectral connectivity over time.