All Projects → Eden-Kramer-Lab → spectral_connectivity

Eden-Kramer-Lab / spectral_connectivity

Licence: GPL-3.0 License
Frequency domain estimation and functional and directed connectivity analysis tools for electrophysiological data

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to spectral connectivity

CellExplorer
CellExplorer is a graphical user interface, a standardized processing module and data structure for exploring and classifying single cells acquired using extracellular electrodes.
Stars: ✭ 55 (-3.51%)
Mutual labels:  neuroscience, electrophysiology
brainGraph
Graph theory analysis of brain MRI data
Stars: ✭ 136 (+138.6%)
Mutual labels:  neuroscience, brain-connectivity
spikeinterface
A Python-based module for creating flexible and robust spike sorting pipelines.
Stars: ✭ 193 (+238.6%)
Mutual labels:  neuroscience, electrophysiology
spikesorters
Python-based module with spike sorter wrappers and a simple API for running them.
Stars: ✭ 19 (-66.67%)
Mutual labels:  neuroscience, electrophysiology
elephant
Elephant is the Electrophysiology Analysis Toolkit
Stars: ✭ 140 (+145.61%)
Mutual labels:  neuroscience, electrophysiology
neurotic
Curate, visualize, annotate, and share your behavioral ephys data using Python
Stars: ✭ 24 (-57.89%)
Mutual labels:  neuroscience, electrophysiology
JATOS
Just Another Tool for Online Studies
Stars: ✭ 60 (+5.26%)
Mutual labels:  neuroscience
ecephys spike sorting
Modules for processing extracellular electrophysiology data from Neuropixels probes
Stars: ✭ 55 (-3.51%)
Mutual labels:  electrophysiology
nes
Helping researchers in routine procedures for data collection
Stars: ✭ 16 (-71.93%)
Mutual labels:  neuroscience
LabHacks
Resources for data driven neuroscientists.
Stars: ✭ 68 (+19.3%)
Mutual labels:  neuroscience
NeuroCore.jl
Core methods and structures for neuroscience research in Julia.
Stars: ✭ 15 (-73.68%)
Mutual labels:  neuroscience
ultimatevocalremovergui
GUI for a Vocal Remover that uses Deep Neural Networks.
Stars: ✭ 370 (+549.12%)
Mutual labels:  spectrogram
NeuroPyxels
NeuroPyxels (npyx) is a python library built for electrophysiologists using Neuropixels electrodes. This package stems from the need of a pythonist who really did not want to transition to MATLAB to work with Neuropixels: it features a suite of core utility functions for loading, processing and plotting Neuropixels data.
Stars: ✭ 22 (-61.4%)
Mutual labels:  electrophysiology
TorchGA
Train PyTorch Models using the Genetic Algorithm with PyGAD
Stars: ✭ 47 (-17.54%)
Mutual labels:  neuroscience
visualqc
VisualQC : assistive tool to ease the quality control workflow of neuroimaging data.
Stars: ✭ 56 (-1.75%)
Mutual labels:  neuroscience
c2s
A toolbox for inferring spikes from calcium traces.
Stars: ✭ 22 (-61.4%)
Mutual labels:  neuroscience
AudioNet
Audio Classification using Image Classification
Stars: ✭ 46 (-19.3%)
Mutual labels:  spectrogram
pyomyo
PyoMyo - Python Opensource Myo armband library
Stars: ✭ 61 (+7.02%)
Mutual labels:  neuroscience
spectrogram
Taking an audio signal (wav) and converting it into a spectrogram. Written in Go programming language.
Stars: ✭ 34 (-40.35%)
Mutual labels:  spectrogram
WheatNNLeek
Spiking neural network system
Stars: ✭ 26 (-54.39%)
Mutual labels:  neuroscience

spectral_connectivity

PR Test DOI Binder

spectral_connectivity is a python software package that computes multitaper spectral estimates and frequency-domain brain connectivity measures such as coherence, spectral granger causality, and the phase lag index using the multitaper Fourier transform. Although there are other python packages that do this (see nitime and MNE-Python), spectral has several differences:

  • it is designed to handle multiple time series at once
  • it caches frequently computed quantities such as the cross-spectral matrix and minimum-phase-decomposition, so that connectivity measures that use the same processing steps can be more quickly computed.
  • it decouples the time-frequency transform and the connectivity measures so that if you already have a preferred way of computing Fourier coefficients (i.e. from a wavelet transform), you can use that instead.
  • it implements the non-parametric version of the spectral granger causality in Python.
  • it implements the canonical coherence, which can efficiently summarize brain-area level coherences from multielectrode recordings.
  • easier user interface for the multitaper fourier transform

See the notebooks (#1, #2) for more information on how to use the package.

Usage Example

from spectral_connectivity import Multitaper, Connectivity

# Compute multitaper spectral estimate
m = Multitaper(time_series=signals,
               sampling_frequency=sampling_frequency,
               time_halfbandwidth_product=time_halfbandwidth_product,
               time_window_duration=0.060,
               time_window_step=0.060,
               start_time=time[0])
               
# Sets up computing connectivity measures/power from multitaper spectral estimate
c = Connectivity.from_multitaper(m)

# Here are a couple of examples
power = c.power() # spectral power
coherence = c.coherence_magnitude()
weighted_phase_lag_index = c.weighted_phase_lag_index()
canonical_coherence = c.canonical_coherence(brain_area_labels)

Documentation

See the documentation here.

Spectral Estimation

  1. Multitaper

Implemented Measures

Functional

  1. coherency
  2. canonical_coherence
  3. imaginary_coherence
  4. phase_locking_value
  5. phase_lag_index
  6. weighted_phase_lag_index
  7. debiased_squared_phase_lag_index
  8. debiased_squared_weighted_phase_lag_index
  9. pairwise_phase_consistency
  10. global coherence

Directed

  1. directed_transfer_function
  2. directed_coherence
  3. partial_directed_coherence
  4. generalized_partial_directed_coherence
  5. direct_directed_transfer_function
  6. group_delay
  7. phase_lag_index
  8. pairwise_spectral_granger_prediction

Package Dependencies

spectral_connectivity requires:

  • python
  • numpy
  • matplotlib
  • scipy
  • xarray

See environment.yml for the most current list of dependencies.

Installation

pip install spectral_connectivity

or

conda install -c edeno spectral_connectivity

Developer Installation

If you want to make contributions to this library, please use this installation.

  1. Install miniconda (or anaconda) if it isn't already installed. Type into bash (or install from the anaconda website):
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
  1. Clone the repository to your local machine (.../spectral_connectivity) and install the anaconda environment for the repository. Type into bash:
conda update -q conda
conda info -a
conda env create -f environment.yml
source activate spectral_connectivity
python setup.py develop
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].