Raster plot and ASDR analysis for Axion Maestro MEA recordings
Project description
mea-raster-asdr
Python tool for analysing multielectrode array (MEA) recordings from the Axion Maestro system.
Generates per-well figures matching the output of the MATLAB pipeline (Axion_TVAloopv3 / v4):
- Top panel — ASDR histogram (spike counts per 200 ms bin, summed across all 16 electrodes)
- Lower rows — Raster plot (one row per electrode, vertical tick per spike)
- Standalone ASDR PNG and statistics CSV also saved
Supported input files
| Extension | Description |
|---|---|
.spk |
Axion spike file — recommended, no extra parameters needed |
.raw |
Axion Maestro continuous raw recording (spike detection on-the-fly) |
.npz |
Pre-parsed spike cache |
Installation
From PyPI
pip install mea-raster-generator
Local install (from cloned repo)
pip install .
Inside a conda environment
conda create -n mea python=3.10
conda activate mea
pip install mea-raster-generator
Python 3.8+ required.
Usage
mea-raster-asdr INPUT_FILE [options]
Positional argument
| Argument | Description |
|---|---|
INPUT_FILE |
Path to .spk, .raw, or .npz recording file |
Options
| Option | Default | Description |
|---|---|---|
--output-dir DIR |
auto | Output directory (default: mea_raster_asdr_output/ next to input file) |
--wells WELL [WELL ...] |
ALL |
Wells to analyse, e.g. A1 B2 C3, or ALL |
--time-start FLOAT |
0 |
Start of time window in seconds |
--time-end FLOAT |
0 |
End of time window in seconds; 0 = full recording |
--asdr-thresh INT |
50 |
ASDR threshold spike count (red dashed line) |
--combined / --no-combined |
on | Save combined raster+histogram figure |
--asdr-y-max FLOAT |
0 |
Y-axis maximum for ASDR panels; 0 = autoscale |
--dpi INT |
300 |
Figure resolution in DPI |
--rec-seconds FLOAT |
— | Recording duration in seconds (required for .raw and .npz) |
--bin-ms INT |
200 |
ASDR bin width in ms |
--thresh-k FLOAT |
5.0 |
Spike threshold multiplier K for MAD thresholding (.raw only) |
Examples
# Analyse well D1 from an .spk file, time window 0–420 s
mea-raster-asdr recording.spk --wells D1 --time-end 420 --asdr-thresh 50
# Analyse all wells, autoscale Y axis
mea-raster-asdr recording.spk --wells ALL --time-end 600
# Raw file (rec-seconds required), save to custom output directory
mea-raster-asdr recording.raw --rec-seconds 360 --wells A1 B1 --output-dir ./results
# ASDR histogram only (no raster)
mea-raster-asdr recording.spk --wells D1 --no-combined
Output
All figures are saved to mea_raster_asdr_output/ next to the input file (or to --output-dir if set):
| File | Description |
|---|---|
<stem>_<well>_raster_histogram.png |
Combined raster + ASDR figure |
<stem>_<well>_asdr_histogram.png |
Standalone ASDR histogram |
<stem>_stats.csv |
Per-well statistics (spike counts, rates, ISI, bursts) |
Background
This tool is a Python port of the MATLAB MEA analysis pipeline developed in the Deane Lab, University of Cambridge. It reads the Axion binary .spk container format based on the official AxIS MATLAB source (AxisFile.m, BlockVectorData.m, etc.) and replicates the spike detection (MAD threshold, identical to MATLAB) and ASDR histogram used in the original pipeline.
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mea_raster_generator-0.1.1.tar.gz.
File metadata
- Download URL: mea_raster_generator-0.1.1.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe04cdc4357cd616556cce6d91c7273711a4a4276c45c77b48cf15e8817098d3
|
|
| MD5 |
33779554b6f96993ffd3c0579bb7fec4
|
|
| BLAKE2b-256 |
68151ed9be88c5e2cd64fb20a64b8ddfd17c43541ab642a5367a235cccda67a2
|
File details
Details for the file mea_raster_generator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mea_raster_generator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c63440bd2a6ac581faa4bd8ae23fd0d7339976491deba5c0b53bcef1482d13a
|
|
| MD5 |
23e6dde38d9a53afacfe66cdc0c3570c
|
|
| BLAKE2b-256 |
1a483b00e0079c5a136b66454ac8b41136f110f79b4b65ab58f751a77f92e41f
|