LFP Analysis in Python
Introduction to local field potential (LFPs) analysis and signal processing using Numpy, Xarray, Scipy, and specialized tools like Elephant and Neo.
Authors
This course provides researchers a hands-on introduction to local field potential (LFP) analysis in Python. You will work with real-world neuroscience datasets and learn how to implement established analysis methods using data science libraries like Numpy, Xarray, and Scipy as well as libraries tailored to electrophysiological analysis such as elephant and Neo. Through this course, you will develop an understanding of how spikes in presynaptic populations are related to the LFP in postsynaptic populations and how current source density (CSD) analysis can help you interpret the recorded LFP in terms of the underlying neurophysiology. You will also study different methods for frequency analysis and explore their respective advantages and potential pitfalls you should be aware of when applying them.
Credits
Installation
To run the course materials on your own machine, it is recommended that you:
- Install VSCode as your editor
- Install pixi or alternatively conda to create virtual Python environments (see the lessons on environment and package management)
- Create a dedicated folder for this course and install the virtual environment:
Download the pixi.toml file and install the environment:
pixi install --manifest-path pixi.toml
pixi shellDownload the environment.yml file and install the environment:
conda env create -f environment.yml
conda activate lfp_analysisCourse Contents
Visualizing LFP, spike, and Behavioral Data
Current Source Density (CSD) Analysis
CSD Analysis Theory and Methods
How to calculate current source density (CSD) from LFP
Combining Firing Rate and CSD Analysis
Utilize firing rates and CSD analysis together to gain neural circuit insight
Frequency Analysis
Frequency Analysis Tools and Methods
Study How Fourier Transform, Welch's Method, and Multitapering Work with Toy Data
For Loops and Trial Averaged Frequency Spectra
Apply Fourier Transform, Welch's Method, and Multitapering to LFP and Spike Data
Time-resolved Frequency Analysis
Calculate and Analyze Frequency Spectra over Time with Morlet Wavelets
Statistical Significance of Power Spectra
Evaluate the Statistical Significance of Peaks in Power Spectra
Filtering Signals
Tools For Signal Analysis and Filtering
Construct toy signals and apply different kinds of signals filters to them to study their effects
Filtering Methods in Analysis of LFP
Apply low-pass, high-pass, bandpass, and bandstop filters to LFP data