NeuroSimo: an open-source software for closed-loop EEG- or EMG-guided TMS
Olli‐Pekka KahilakoskiiD, Kyösti AlkioiD, Oula SiljamoiD, Kim Valén, Joonas LaurinojaiD, Lisa HaxeliD, Matilda MakkoneniD, Tuomas P. MutaneniD, Timo TommilaiD, Roberto GuidottiiD, Giulia PieramicoiD, Risto Juhani IlmoniemiiD, Timo RoineiD
Abstract
ObjectiveOur goal was to create open-source software for closed-loop EEG-TMS that allows researchers to rapidly prototype and develop novel stimulation paradigms in a high-level programming language. This addresses the limitations of current solutions, which often rely on proprietary hardware and software, limiting their accessibility and customizability, or comprise ad-hoc pipelines tailored to specific use cases. ApproachWe developed NeuroSimo, a software platform that enables arbitrary EEG-TMS stimulation protocols written in Python, leveraging Pythons ecosystem of scientific, neuroimaging, and machine learning libraries. The core software is written in C++ with an embedded Python interpreter and employs the Robot Operating System (ROS 2) for inter-process communication. NeuroSimo runs on real-time-enabled Linux Ubuntu, using LabJack T4 for pulse triggering, and supports two EEG device models (Bittium NeurOne, BrainProducts actiCHamp) and TMS devices that deliver pulses via trigger signals. The software includes a graphical user interface for configuration and performance monitoring, and supports GPU processing for neural network computations. Main resultsIn brain-state-dependent stimulation using the Phastimate algorithm, which targets TMS pulses to the trough of sensorimotor -rhythm, NeuroSimo achieved a median timing error of 0.2 ms (95% CI: 0.2-0.2 ms), a 99th-percentile of 0.6 ms (0.6-0.6 ms), and a maximum of 1.4 ms. SignificanceAs an open-source platform combining Pythons flexibility with real-time closed-loop EEG-TMS, NeuroSimo enables researchers to develop and implement novel therapeutic approaches, marking a significant advance in personalized brain stimulation.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 4
- Assay
- Research Focus
- Approach
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- EEG-guided robotic control of transcranial magnetic stimulation
Renan H. Matsuda, Matilda Makkonen, … Pantelis Lioumis·bioRxiv·May 19, 2026
- NaviNIBS: a comprehensive and open-source software toolbox for neuronavigated noninvasive brain stimulation.
Christopher C. Cline, Lily Forman, … Corey J. Keller·Journal of Neural EngineeringPeer-reviewed·Aug 12, 2025
- Efficient Electric Field Simulations for Transcranial Brain Stimulation
G. Bicalho Saturnino, K. H. Madsen, A. Thielscher·bioRxiv·Feb 5, 2019
- Experimental Evaluation of Methods for Real-Time EEG Phase-Specific Transcranial Magnetic Stimulation
Sina Shirinpour, Ivan Alekseichuk, … Alexander Opitz·Journal of Neural EngineeringPeer-reviewed·Jun 17, 2020
- Closed-loop optimization of transcranial magnetic stimulation with electroencephalography feedback
A. E. Tervo, J. O. Nieminen, … R. J. Ilmoniemi·bioRxiv·Aug 31, 2021
- A High-Precision Timing Method and Digital Interface for Closed-Loop TMS
Olli‐Pekka Kahilakoski, Heikki Sinisalo, … Timo Roine·bioRxiv·Apr 5, 2025