Skip to main content

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.

Metadata

Release files for mea-raster-generator 0.1.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 mea-raster-generator 0.1.1
File Size Uploaded
mea_raster_generator-0.1.1.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mea-raster-generator 0.1.1
File Interpreter ABI Platform
mea_raster_generator-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.1 kB

Release files / mea_raster_generator-0.1.1.tar.gz

Download URL mea_raster_generator-0.1.1.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fe04cdc4357cd616556cce6d91c7273711a4a4276c45c77b48cf15e8817098d3
BLAKE2b-256 checksum
How to use checksums
68151ed9be88c5e2cd64fb20a64b8ddfd17c43541ab642a5367a235cccda67a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / mea_raster_generator-0.1.1-py3-none-any.whl

Download URL mea_raster_generator-0.1.1-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c63440bd2a6ac581faa4bd8ae23fd0d7339976491deba5c0b53bcef1482d13a
BLAKE2b-256 checksum
How to use checksums
1a483b00e0079c5a136b66454ac8b41136f110f79b4b65ab58f751a77f92e41f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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