Curate, visualize, and annotate your behavioral ephys data using Python
Project description
Curate, visualize, and annotate your behavioral ephys data using Python
neurotic is an app that allows you to easily review and annotate your electrophysiology data and simultaneously captured video. It is an easy way to load your Neo-compatible data into ephyviewer without doing any programming.
You organize your data sets in a YAML file like this:
my favorite dataset:
description: This time it actually worked!
data_dir: C:/local_dir_containing_files
remote_data_dir: http://myserver/remote_dir_containing_downloadable_files # optional
data_file: data.axgx
video_file: video.mp4
# etc
video_offset: -3.4 # seconds between start of video and data acq
epoch_encoder_possible_labels:
- label01
- label02
plots:
- channel: I2
ylim: [-30, 30]
- channel: RN
ylim: [-60, 60]
# etc
filters: # used only if fast loading is off (lazy=False)
- channel: Force
lowpass: 50
# etc
amplitude_discriminators: # used only if fast loading is off (lazy=False)
- name: B3 neuron
channel: BN2
amplitude: [50, 100]
# etc
Open your file in the app and choose a data set. If the data and video files aren’t already on your local computer, the app can download them for you. Finally, click launch and the app will use a standard viewer layout to display your data to you using ephyviewer.
(Pictured above is a voracious Aplysia californica making the researcher very happy.)
The viewers are easy and intuitive to navigate:
Pressing the play button will scroll through the data and video in real time, or at a higher or lower rate if the speed parameter is changed.
The arrow/WASD keys allow you to step through time.
Right-clicking and dragging right or left will contract or expand time to show more or less at once.
Scrolling the mouse wheel in the trace viewer or the video viewer will zoom.
The “epoch encoder” can be used to block out periods of time during which something interesting is happening for later review or further analysis (saved to a CSV file).
All panels can be hidden, undocked, or repositioned on the fly.
Electrophysiologists should still find this tool useful even if they don’t need video synchronization.
Installing dependencies
Because neurotic depends on some pre-release changes in a couple libraries, pip cannot automatically fetch all dependencies during normal installation. Therefore, dependencies must be installed manually.
With conda
A recipe for installing neurotic via conda directly is not yet available. However, the file environment.yml is provided for installing its dependencies into a conda environment. To install into a new conda environment named neurotic, use these commands:
git clone https://github.com/jpgill86/neurotic.git conda env create -f neurotic/environment.yml -n neurotic
To update an existing environment, replace conda env create with conda env update.
Remember to switch environments if necessary before proceeding with installation (conda activate neurotic or source activate neurotic).
Without conda
The file requirements.txt is provided for installing dependencies with pip. Dependencies can be installed using these commands:
git clone https://github.com/jpgill86/neurotic.git pip install -U -r neurotic/requirements.txt
If you get an error while installing PyAV, especially on Windows, you may need to build it from scratch or get it from another source, such as conda-forge:
conda install -c conda-forge av
Installing neurotic
To reiterate, you must install dependencies manually. They will not be installed with neurotic.
To install the latest release version from PyPI, use
pip install neurotic
To install the latest development version from GitHub, use
pip install git+https://github.com/jpgill86/neurotic.git
To install from a local copy of the source code, use
python setup.py install
Getting started
Launch the standalone app from the command line:
neurotic
A simple example is provided. Select the “example dataset”, download the associated data, and then click launch.
Command line arguments can be listed using
neurotic --help
Questions and support
Please post any questions, problems, comments, or suggestions in the GitHub issue tracker.
Changes
0.6.0 (2019-07-10)
Improvements
0.5.1 (2019-07-09)
Compatibility updates
Compatibility update for RawIOs with non-zero offset (#37)
0.5.0 (2019-07-06)
Improvements
0.4.2 (2019-07-06)
Bug fixes
Fix for EstimateVideoJumpTimes regression introduced in 0.4.0 (#33)
0.4.1 (2019-07-02)
Compatibility updates
0.4.0 (2019-07-01)
Improvements
0.3.0 (2019-06-29)
Improvements
0.2.0 (2019-06-28)
Improvements
Bug fixes
0.1.1 (2019-06-22)
Bug fixes
Fix various downloader errors (#7)
0.1.0 (2019-06-22)
First release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.