RESTORE Lab
Penn Neurosurgery
// Software & tools

Open-source tools developed by the lab.

The lab develops and maintains open-source software for neural data analysis and intraoperative data capture. The three tools below are released publicly; each is documented and citable.

nSTAT

MATLAB · Open source

Neural Spike Train Analysis Toolbox. An open-source MATLAB toolbox implementing point-process generalized linear models (GLMs), model fitting, model-order analysis, and adaptive decoding. Also includes Gaussian-signal tools (correlation analysis, Kalman filter) applicable to LFP, EEG, and ECoG.

Key capabilities include state-space GLM (SSGLM) estimation via EM, unscented Kalman filtering (UKF), goal-directed point-process adaptive filters (PPAF), and hybrid discrete/continuous point-process filters (PPHF).

Cite: Cajigas I, Malik WQ, Brown EN. nSTAT: Open-source neural spike train analysis toolbox for Matlab. Journal of Neuroscience Methods 211: 245–264, 2012.

nSTAT-python

Python · Open source · pip install nstat-toolbox

Full Python port of the nSTAT toolbox. Implements the same point-process GLMs, model fitting, adaptive decoding, and signal processing algorithms as the MATLAB original.

Includes native implementations of all core algorithms with extensive documentation, paper-example galleries, and unit tests. Verified against the MATLAB reference through an audit covering all 16 classes and 484 methods, ensuring class-level and behavioral parity.

Cite: Cajigas I, Malik WQ, Brown EN. nSTAT: Open-source neural spike train analysis toolbox for Matlab. Journal of Neuroscience Methods 211: 245–264, 2012.

Thalamus

Python · C/C++ · Linux + Windows · Open source

Real-time, synchronized, closed-loop multimodal data capture platform designed for neurosurgical environments. Thalamus integrates behavioral and electrophysiological data streams to support clinical applications of brain-computer interface technology.

Design priorities: minimal operating-room setup, fail-safe architecture for minimal data loss, real-time computation for visualization of research and clinical data streams, and closed-loop control. Supports a high-bandwidth, low-latency, parallel distributed architecture for modular acquisition and computation that scales over time.