title | tags | authors | affiliations | date | bibliography | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Spectral Connectivity: a python package for computing multitaper spectral estimates and frequency-domain brain connectivity measures on the CPU and GPU |
|
|
|
10 September 2022 |
paper.bib |
In neuroscience, characterizing the oscillatory dynamics of the brain is critical to understanding how brain areas interact and function. Neuronal activity tends to fluctuate rhythmically – both through intrinsic currents at the cellular level and through groups of neurons. Brain oscillations and their relationships can indicate the difference between normal and pathological brain states such as Alzheimer's and epilepsy. Spectral analysis techniques such as multitaper and wavelet analysis are widely used for decomposing signals into oscillatory components. Connectivity measures are used to determine the relationships between those oscillatory components, indicating possible communication between brain areas. Because these analyses are central to neuroscience and technological advances in recording are increasing the amount of simultaneously recorded signals, it is important to have a well-tested, standardized, and lightweight software package to compute these brain connectivity measures at scale.
spectral_connectivity
is a Python software package that computes multitaper spectral estimates and frequency-domain brain connectivity measures. The programming language Python is increasingly being used in the neurosciences [@MullerPythonNeuroscience2015; @SchlaflyPythonpracticingneuroscientist2020], but the two main packages for spectral analysis in Python, nitime
[@Rokem2020] and mne-python
[@GramfortEtAl2013a], have issues that make them more difficult to use in many situations. For example, nitime
implements several estimators of the power spectrum, but lacks spectrograms and windowed spectral estimators. mne-python
is a much larger package designed as a full-featured analysis library for EEG and MEG data, and works best when the data is represented using its ecosystem (i.e. Epochs
and Raw
objects). While some of the spectral connectivity functionality can work with array_like
objects, users of other data modalities such as non-human electrophysiology data may find mne-python
too cumbersome for their application. This is an important problem because the non-human neurosciences are undergoing a period of great technological development; more and more signals are being collected simultaneously, and the duration of these signals is becoming longer as chronic recordings become possible. This rapid increase in the size and duration of datasets demands a lightweight, fast, and efficient spectral estimation package. spectral_connectivity
is designed to handle multiple time series flexibly1 and can exploit GPUs for faster and more efficient computation. In addition, it can block compute important quantities such as the cross-spectral matrix in order to reduce memory burdens caused by large datasets. spectral_connectivity
is also designed to be a lightweight package that has a simple user interface and can be easily be incorporated with other packages. Finally, spectral_connectivity
also implements several connectivity measures that have not previously been implemented in Python such as the non-parametric version of the spectral granger causality and canonical coherence.
spectral_connectivity
has already shown its utility to the neuroscience field. The package has already been used in a number of publications and pre-prints in neuroscience [@KuhnertDetectionDirectedConnectivities2019; @VargaNetworkPathConvergence2021; @LauroSubthalamicCorticalNetwork2021; @Delgado-SallentPhencyclidineinducedpsychosiscauses2021]. Interestingly, it has also contributed to a publication in physics [@CliffUnifyingPairwiseInteractions2022], showing its versatility and ease of use. We hope this package will continue to be useful to the neuroscience community, particularly for non-human electrophysiology data.
We thank Uri T. Eden for support and mentorship during the creation of this package.
Footnotes
-
For example, the
expectation_type
parameter of theConnectivity
class gives the user the option to average over trials, tapers, or both, allowing the same module to yield single-trial or summarized estimates. ↩