Abstract:The analysis of EEG/MEG functional connectivity has become an important tool in neural research. Especially the high time resolution of EEG/MEG enables important insight into the functioning of the human brain. To date, functional connectivity is commonly estimated offline, i.e., after the conclusion of the experiment. However, online computation of functional connectivity has the potential to enable unique experimental paradigms. For example, changes of functional connectivity due to learning processes could be tracked in real time and the experiment be adjusted based on these observations. Furthermore, the connectivity estimates can be used for neurofeedback applications or the instantaneous inspection of measurement results. In this study, we present the implementation and evaluation of online sensor and source space functional connectivity estimation in the open-source software MNE Scan. Online capable implementations of several functional connectivity metrics were established in the Connectivity library within MNE-CPP and made available as a plugin in MNE Scan. Online capability was achieved by enforcing multithreading and high efficiency for all computations, so that repeated computations were avoided wherever possible, which allows for a major speed-up in the case of overlapping intervalls. We present comprehensive performance evaluations of these implementations proving the online capability for the computation of large all-to-all functional connectivity networks. As a proof of principle, we demonstrate the feasibility of online functional connectivity estimation in the evaluation of somatosensory evoked brain activity.