Example Python Notebooks for Offline Analysis
Introduction to Python
Tips for getting started with Python.
Includes side-by-side comparisons to Matlab and TDT's Matlab data tools.
Stream Plot Example
Import continuous data into Python using
Plot a single channel of data with various filtering schemes.
Good for first-pass visualization of streamed data.
Import stream and epoc data into Python using
Plot the average waveform around the epoc event.
Good for Evoked Potential detection.
Raster PSTH Example
Import snippet and epoc data into Python using
Generate peristimulus raster and histogram plots over all trials.
Good for stim-response experiments, such as optogenetic or electrical stimulation.
Note Filter Example
Import streaming EEG data into Python using
Filter around behavioral events that were timestamped by the user using the Run-time Notes feature in Synapse.
Plot each occurrence in a subplot organized by Note type.
Good for sleep scoring and behavioral discrimination.
TDT Community Examples
Fiber Photometry Epoch Averaging Example
This example goes through fiber photometry analysis using techniques such as data smoothing,
bleach detrending, and z-score analysis. The epoch averaging was done using
TDT, David Root, and the Morales Lab contributed to the writing and/or conceptualization of the code.
The signal processing pipeline was inspired by the workflow developed by David Barker et al. (2017) for the Morales Lab.
The data used in the example were provided by David Root.
David H. Root
Department of Psychology & Neuroscience
University of Colorado, Boulder
Lab Website: https://www.root-lab.org
About the authors:
The Root lab and Morales lab investigate the neurobiology of reward, aversion, addiction, and depression.
TDT edits all user submissions in coordination with the contributing author(s) prior to publishing.
Licking Bout Epoc Filtering
This example looks at fiber photometry data in the VTA where subjects are provided sucrose water after a fasting period.
Lick events are captured as TTL pulses. Objective is to combine many consecutive licking events into a single event based on time difference and lick count thresholds.
New lick bout events can then be used for clear peri-event filtering.
We think that cultivating a strong and open community of TDT users is essential for maximizing research efficiency. The cross-pollination of ideas and methods across labs, especially those with similar research interests and using the same equipment, makes the science more rigorous overall. As such, we would like YOU to consider contributing to the TDT community with an example analysis and workbook, like the ones at the top of this page.
You can submit your examples to TDT by emailing email@example.com. Include your name, lab information, research interests, Python script, and a link to the block of data used in the analysis. Accepted submissions will be featured on this webpage, along with a description of the analysis and a bio of the submitting researcher. We hope that this exposure will help our users learn more about what great research others in the TDT community are doing!
Please note that, as with all our example workbooks, these workbooks represent one way of processing data. Moreover, the goal is really to show users how they might implement certain techniques on their data. These examples should not represent complete pipelines for your data analysis, and critical thought about which processing techniques and statistical analyses are most appropriate for your data set should be taken.