Skip to content

Repository files navigation

mea-rasterplotter

Scripts for extracting spike timings from Axion MultiElectrode Arrays (MEA) .spk files, exporting them to CSV, and visualizing the data with rasterplots.

Status

This project is incomplete and is in development. The notebook UIs are still a little rough.

Prerequisites

  • Python
  • MATLAB for the default Axion .spk processing path, using the vendored AxionFileLoader MATLAB loader.
  • Optional support for GNU Octave instead of MATLAB. This is meant for development/testing, and requires switching mea-rasterplotter/vendor/AxionFileLoader to the feature/octave branch before using the Octave notebook path.
  • Recommended: Git and UV.

Setup

Download

Open a console or Windows Command Prompt at the desired location and clone the repository:

# Clone mea-rasterplotter
git clone --recurse-submodules https://github.com/UtrechtUniversity/mea-rasterplotter.git
# Or, if already cloned, add the AxionFileLoader submodule:
git submodule update --init

If you do not have Git available, download ZIP files of both mea-rasterplotter and AxionFileLoader from GitHub (located under the <> Code button), and extract them so you have this directory layout:

mea-rasterplotter/
├── README.md
...
└── vendor
    └── AxionFileLoader

Install dependencies

If you have uv installed (recommended):

# Create/update environment with dependencies
uv sync

Alternatively, use pip (included with Python):

# Navigate inside the repository dir:
cd mea-rasterplotter
# Example for Windows:
# Install and activate a Python environment:
py -m venv .venv
.venv\Scripts\activate
# Install the dependencies in the environment:
py -m pip install -r requirements.txt

Updates

To get updates, fetch the latest changes with Git, and install dependencies if they were updated:

cd /path/to/mea-rasterplotter
git pull # The default branch is develop
.venv\Scripts\activate
py -m pip install -r requirements.txt

Use

The functionality can be used via two notebooks:

  • process_spk.py for extracting spike timings from .spk and saving to a CSV file.
  • rasterplot.py for loading a CSV file and visualizing the data in a rasterplot.

Open Marimo from an activated venv:

# Use `marimo run` to run a notebook as an app, hiding the code cells:
marimo run process_spk.py
marimo run rasterplot.py
# Use `marimo edit` to open marimo in edit mode
marimo edit

Marimo will open in a browser window.

Development

# Install optional dependencies
uv sync --extra marimo-ai
# Upgrade uv.lock dependencies
uv lock --upgrade
# Export updates to requirements.txt
uv export --format requirements.txt --output-file requirements.txt

About

Extract spike timings from Axion MEA .spk files and visualize them with rasterplots

Topics

Resources

Code of conduct

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages