The Deployed Databook can be found here: https://alleninstitute.github.io/openscope_databook
The OpenScope Databook is meant to store code and documentation used for reproducible brain data analysis and visualization, primarily working with NWB files and the DANDI archive. It is provided by the Allen Institute's OpenScope Project, a component of The Allen Institute for Neural Dynamics. OpenScope is a platform for high-throughput and reproducible neurophysiology open to external scientists to test theories of brain function. Through Jupyter Book, this code is structured as a series of documented Jupyter notebooks intended to explain and educate users on how to work with brain data.
We are releasing this code to the public as a tool we expect others to use and are actively updating and maintaining this project. Issue submissions are encouraged. Questions can be directed to @rcpeene or @jeromelecoq. Below, you can see a working list of the content goals for this databook. We are open to hearing input from users about what types of analysis and visualization might be useful for reproducible neuroscience, particularly when working with the NWB file standard.
Before setting up the environment, ensure you have the following installed:
- Python 3.13 (check with
python --version) - uv (optional, highly recommended for reproducible builds:
python -m pip install uv) - Node.js & npm (to build the databook in MyST, not needed to run notebooks. check with
npm --version)
Preferred (uv lockfile, mirrors CI):
- Use Python 3.13
- Sync from lockfile:
uv sync --frozen --extra dev --python 3.13 - Run Jupyter:
uv run jupyter notebook
Pip-only fallback (no uv required):
- Create and activate a Python 3.13 virtual environment
- Install dependencies:
python -m pip install -r requirements-ci.txt - Install project:
python -m pip install -e . - Run Jupyter:
jupyter notebook
If you want to build or develop the databook documentation with MyST, you'll also need to install JavaScript dependencies. After completing the Python setup above:
- Make sure you're in the 'docs' folder:
cd docs - Install JavaScript dependencies for MyST:
npm install - Run the development server:
uv run myst start, Or build for production:uv run myst build
requirements-ci.txt is a fully-pinned, pip-compatible export of the uv lockfile used by CI. After any change to pyproject.toml or uv.lock, regenerate it with:
uv export --frozen --extra dev --no-hashes --no-editable --no-emit-project -o requirements-ci.txt--no-hashesβ omits hash annotations so pip accepts VCS dependencies (e.g.ophys-nway-matching,ssm) without entering hash-verification mode--no-editableβ converts editable installs to regular installs--no-emit-projectβ excludes the local project itself from the file, preventing pip from readingpyproject.toml(which would conflict with pinned VCS commits)
- Background
- Downloading NWB Files from DANDI
- Streaming NWB Files from DANDI
- Reading NWB Files
- Querying Metadata Across Sessions from DANDI
- Visualizing 2P Raw Movie
- Visualizing Unit Quality Metrics
- Visualizing LFP Responses to Stimulus Events
- Visualizing Neuronal Unit Responses to Stimulus Events
- Visualizing 2P Responses to Stimulus Events
- Visualizing Neuronal Spike Matrices
- Visualizing Behavior: Eye Tracking and Running Speed
- Visualizing 2P and Behavioral Data for Virtual Navigation
- Visualizing Neuropixels Probe Locations
- Visualizing Stimulus Templates
- Neuropixels: Plotting Receptive Fields
- Neuropixels: Identifying Opto-Tagged Cells
- Neuropixels: Extracting Current Source Density Plots
- Neuropixels: Classifying Spike Waveforms
- 2P: Stimulus-Averaged Responses
- Neuropixels: Stimulus-Averaged Responses
- 2P: Segmentation Pipeline with Suite2p
- 2P: Cell Matching Across Days
- 2P: Aligning Data Across Modalities
- Neural Dynamics Using CEBRA
- Extracting Clusters of Correlated Neurons with TCA
- Generalized Linear Models with Pynapple and NeMoS
- Generalized Linear Models
- Estimating Behavioral State from Trial Choices
- OpenScope Credit Assignment
- OpenScope Global/Local Oddball
- OpenScope Illusion
- OpenScope Dendritic Coupling
- OpenScope Sequence Learning
- OpenScope Temporal Barcoding
- OpenScope Vision2Hippocampus
- OpenScope Vismo
- OpenScope Texture
- OpenScope Loop
- OpenScope Psycode
- OpenScope Predictive Processing - Neuropixels
- OpenScope Predictive Processing - Mesoscope