Skip to main content
drawing

Elephant Lab

Explore, Visualize, and Analyze Electrophysiology Data - Right in JupyterLab

Elephant Lab is a JupyterLab extension that brings interactive data exploration to your electrophysiology workflow. It reads datasets in any file format supported by Neo and displays them as an interactive object tree, so you can browse signals, spike trains, and events without writing a single line of code.

Select any object in the tree to inspect its metadata in the Details panel or explore it visually in the Explore panel. When you find something interesting, click Insert Code to get the selected object into your Notebook.

Features

  • Interactive Neo object tree: browse the full hierarchy of your dataset (Block → Segment → AnalogSignal, SpikeTrain, Event, ...)
  • Info panel: inspect metadata and annotations for any selected object
  • Explore Panel: visualize signals (time series), spike trains (raster, ISI, IFR), and events interactively using Plotly
  • Multi-selection: select several objects at once to compare them side by side
  • Overview plots: rasterplot (SpikeTrains) and LFP overview (AnalogSignals)
  • Load button: open any Neo-compatible file (.nix, Blackrock, ...) directly from the JupyterLab file browser
  • Insert Code button: extract variables from the current selection and insert them into your notebook cell so they are ready to be analyzed
  • Live kernel sync: objects you create or modify in the notebook appear in the tree automatically

Requirements

  • Python >= 3.8
  • JupyterLab >= 4.0
  • Neo: electrophysiology data model
  • Elephant: electrophysiology analysis library
  • Plotly: interactive visualizations
  • nixio: required for loading .nix files

All Python dependencies are installed automatically (see Installation).

Installation

Note: [Optional but recommended] Create a Python virtual environment using e.g. venv or conda.

Install Elephant Lab using pip:

pip install elephant-lab

To remove the extension:

pip uninstall elephant-lab

Quick Start

  1. Install Elephant Lab
    pip install elephant-lab
    
  2. Launch JupyterLab:
    jupyter lab
    
  3. Open a notebook and click the Elephant icon in the notebook's toolbar. Alternatively, open the Command Palette (View -> Activate Command Palette or Ctrl+Shift+C), search for Elephant Lab, and click it to open the panel.
  4. Click the Load button and select a Neo-compatible dataset (e.g. a .nix file).
  5. Browse the object tree, click nodes to inspect them, and use Insert Code to use them in your Code.

Demo Notebook

For a step-by-step walkthrough, open the demo notebook: examples/Elephant_Lab_Demo.ipynb

Development Install

You will need Node.js to build the extension.

# 1. Clone the repository
git clone git@github.com:INM-6/elephant-lab.git
cd elephant-lab

# 2. Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate   # on Windows: .venv\Scripts\activate

# 3. Install the package in development mode
pip install -e ".[dev]"

# 4. Link the extension with JupyterLab
jupyter-builder develop . --overwrite

# 5. Build the TypeScript source
jlpm build

For live reloading during development, run JupyterLab and the TypeScript watcher in two separate terminals:

# Terminal 1: watch and rebuild TypeScript automatically
jlpm watch

# Terminal 2: run JupyterLab
jupyter lab --watch --ServerApp.iopub_msg_rate_limit=1.0e7

Every saved change is rebuilt automatically; refresh the browser to load it.

Development Uninstall

pip uninstall elephant-lab

You will also need to remove the symlink created by jupyter-builder develop. Run jupyter labextension list to find the labextensions folder, then delete the elephant-lab symlink inside it.

Testing

Python tests use pytest:

pip install -e ".[test]"
pytest

TypeScript tests use Vitest:

jlpm test:run

Contributing

Do you have a question, suggestion, or found a bug? Please open an issue.

Would you like to fix a problem or add a feature? Please open a pull request.

Authors and Contributors

Main authors: Tobias Michels, Jan Nolten, Maximilian Kramer, Björn Müller

Contributors: Moritz Kern, Michael Denker, Harris Jos

Acknowledgements

Elephant Lab builds on the Neo electrophysiology data framework and the Elephant analysis library.

This project was developed at the Institute for Advanced Simulation, Computational and Systems Neuroscience (IAS-6), Forschungszentrum Jülich.

This project was supported by the Ministry of Culture and Science of the State of North Rhine-Westphalia, Germany (NRW-network 'iBehave', grant number: NW21-049) and by the European Union's Horizon Europe Programme under the Specific Grant Agreement No. 101147319 (EBRAINS 2.0 Project).

Metadata

Release files for elephant-lab 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elephant-lab 0.2.1
File Size Uploaded Provenance Actions
elephant_lab-0.2.1.tar.gz 2.2 MB Without provenance Details for elephant_lab-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for elephant-lab 0.2.1
File Interpreter ABI Platform Actions
elephant_lab-0.2.1-py3-none-any.whl Python 3 none any Details for elephant_lab-0.2.1-py3-none-any.whl

Total release size: 5.7 MB

Release files / elephant_lab-0.2.1.tar.gz

Download URL elephant_lab-0.2.1.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
fb76a86adc7a88d3e4c440093334e7cd159e2a08a9bc619b79da1c2af15203e5
BLAKE2b-256 checksum
How to use checksums
d13140f98f1e352ae345610ec059103c77e51adabeb9b3566dbbf8d3788a3dd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / elephant_lab-0.2.1-py3-none-any.whl

Download URL elephant_lab-0.2.1-py3-none-any.whl
Size 3.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9a8d29a70cada0e33f05b268e63fd9731a7015e0b121eeb1511887ec23e9c58f
BLAKE2b-256 checksum
How to use checksums
bbfd7d3d11dd68f95f5e7d731e9f78776220e328af218b80dd422d54040d05bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for elephant-lab 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page