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.
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.
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
).
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
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
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
Please post any questions, problems, comments, or suggestions in the GitHub issue tracker.
- Support fast (lazy) loading in Neo < 0.8.0 (#35)
- Add "git." and conditionally ".dirty" to dev local version identifier (#34)
- Fix for EstimateVideoJumpTimes regression introduced in 0.4.0 (#33)
- Change sources of development versions of dependencies (#32)
- Compatibility update for scaling of raw signals (#31)
- Show epochs imported from CSV files with zero duration in epoch viewer (#27)
- Show epochs/events imported from data file in events list/epoch viewer (#28)
- Alphabetize epoch and event channels by name (#29)
- Remove dependency on ipywidgets by making notebook widgets optional
(#25)
- Notebook widget classes renamed:
MetadataSelector
→MetadataSelectorWidget
,EphyviewerConfigurator
→EphyviewerConfiguratorWidget
- Notebook widget classes renamed:
- Add app description and screenshot to README (#22)
- Promote to beta status (#23)
- Add basic command line arguments (#14)
- Add continuous integration with Travis CI for automated testing (#13)
- Add some tests (#15, #16)
- Migrate example data to GIN (#18)
- Fix crash when downloading from a server that does not report file size (#17)
- Raise an exception if a Neo RawIO cannot be found for the data file (#12)
- Fix various downloader errors (#7)
- First release