mne-tools/mne-python — pull request #177 by mluessi (2012-11-07 17:38:16+00:00)
Title: WIP: Connectivity Module

I started work on the connectivity module. So far I have only implemented coherency estimation and thought it would be a good to discuss things now before I start implementing other methods.

My ideas for the connectivity module are the following:

* Every method is implemented as a function which accepts data with shape `(n_epochs, n_signals, n_times)`. Instead of a 3D matrix, data can also be a generator that returns `(n_signals, n_times)` arrays.

* By default, the all-to-all connectivity is computed and the returned connectivity has shape `(n_signals, n_signals, ...)` (with additional dimensions, such as frequency, etc.) If only some connectivities should be computed (e.g. seed-based), the `idx` parameter can be used. In this case the first two dimension of the returned connectivity are collapsed.

The idea behind allowing `data` to be a generator is that functions such as `apply_inverse_epochs` should be extended to return a generator (see e.g. `compute_source_psd_epochs`). This allows processing large number of epochs without having to keep all the source estimates in memory.

Let me know what you think :).