Electrophysiology Visualization Suite
Project description
Synaptipy
Abstract
Synaptipy is a cross-platform application for the visualization and analysis of electrophysiological recordings. The software implements a modular architecture supporting interactive single-recording analysis, batch processing, and integration of user-written analysis routines via a plugin interface. The primary experimental focus is whole-cell patch-clamp and intracellular recordings; file I/O is handled via the Neo library, enabling import of any supported electrophysiology format including extracellular, sharp-electrode, and multi-channel data.
Full documentation: synaptipy.readthedocs.io
Installation
Prerequisites
From source (recommended)
git clone https://github.com/anzalks/synaptipy.git
cd synaptipy
conda env create -f environment.yml # creates the 'synaptipy' environment with Python 3.11
conda activate synaptipy
pip install -e ".[dev]"
The environment.yml file specifies all required dependencies. Python 3.11 is the tested and recommended interpreter; to enforce it explicitly, pass the --python flag:
conda create -n synaptipy python=3.11
conda activate synaptipy
pip install -e ".[dev]"
Verify the installation
python -m pytest # runs the full test suite
synaptipy # launches the graphical interface
Standalone application
Pre-compiled binaries for Windows, macOS, and Linux are available on the Releases page. Download the file matching your operating system from the v0.1.3b4 release assets:
- Windows:
Synaptipy_Setup_v0.1.3b4.exe - macOS:
Synaptipy_v0.1.3b4.dmg- open the disk image and drag to Applications - Linux:
Synaptipy-v0.1.3b4-x86_64.AppImage- mark as executable (chmod +x) and run
Usage
Graphical interface
synaptipy
# or equivalently:
python -m Synaptipy
Load a recording by dragging a file into the Explorer tab, then navigate to the Analyser tab to select a channel and run an analysis. Results are displayed in a table and can be exported to CSV.
Programmatic (headless) use
The batch engine operates independently of the graphical interface:
from Synaptipy.core.analysis.batch_engine import BatchAnalysisEngine
from pathlib import Path
engine = BatchAnalysisEngine()
pipeline = [
{
"analysis": "spike_detection",
"scope": "all_trials",
"params": {"threshold": -20.0, "refractory_ms": 2.0},
}
]
results = engine.run_batch([Path("recording.abf")], pipeline)
print(results)
Analysis Capabilities
Synaptipy provides 17 built-in analysis routines organised into five module tabs. Each routine is available interactively in the graphical interface and as a composable unit in the batch processing pipeline.
Tab 1: Intrinsic Properties
- Baseline (RMP) - mean membrane potential measured over a user-defined quiescent window; reports mean, standard deviation, and an estimate of linear drift
- Input Resistance - delta-V / delta-I from a voltage response to a hyperpolarising current step; returns mean, peak, and steady-state Rin separately to distinguish Ih-sag contributions
- Tau (Time Constant) - single-exponential or bi-exponential fit to the voltage decay after a current step; fit quality is gated by R² >= 0.80 and NaN is returned with an explicit flag when the gate is not met
- Sag Ratio (Ih) - peak-to-steady-state voltage ratio during a hyperpolarising step; includes rebound depolarisation measured after stimulus offset
- I-V Curve - current-voltage relationship across a multi-trial step protocol; fits an aggregate Rin from a linear regression and computes a dynamic rectification index
- Capacitance - membrane capacitance derived from Tau / Rin in current-clamp, or from capacitive-transient integration and mono-exponential fit in voltage-clamp
Tab 2: Spike Analysis
- Spike Detection - threshold-crossing action-potential detection with refractory-period filtering; extracts per-spike amplitude, half-width, rise time, decay time, threshold voltage, and after-hyperpolarisation (AHP)
- Phase Plane - dV/dt vs. voltage trajectory for action-potential initiation dynamics; threshold voltage is detected via a kink-slope criterion; reports mean threshold voltage and maximum dV/dt
Tab 3: Excitability
- Excitability (F-I Curve) - multi-trial rheobase, F-I slope, maximum firing frequency, and spike-frequency adaptation ratio; generates a popup F-I scatter plot
- Burst Analysis - max-ISI burst detection; reports burst count, mean spikes per burst, mean burst duration, and intra-burst frequency
- Spike Train Dynamics - inter-spike interval statistics including mean ISI, coefficient of variation (CV), local variation (LV), and CV2; generates a popup ISI plot
Tab 4: Synaptic Events
- Event Detection (Threshold) - prominence-based detection that accommodates baseline drift and overlapping events; interactive event markers can be individually accepted or rejected
- Event (Template Match) - matched-filter cross-correlation using a bi-exponential kernel with user-defined rise and decay time constants; three kernel scales (1x, 2x, 3x the decay constant) are evaluated to accommodate dendritic-filtering variability
- Event (Baseline Peak) - direct baseline-to-peak amplitude detection with kinetics estimation for evoked or spontaneous events
Tab 5: Evoked Responses
- Evoked Sync - extracts TTL or digital stimulus pulses from a secondary channel and correlates them with detected spikes or synaptic events; reports optical latency, response probability, and trial-to-trial jitter
- Paired-Pulse Ratio - measures R1 and R2 amplitudes for a two-pulse protocol; fits a mono- or bi-exponential decay to the R1 tail and subtracts the residual at the time of the second stimulus before computing the ratio, avoiding contamination of R2 by the decaying R1 baseline
- Stimulus Train (STP) - measures response amplitudes across a multi-pulse stimulus train and normalises each pulse to R1 to generate a short-term plasticity (STP) profile; classifies the result as facilitation or depression
Visualization
Trace rendering is implemented via PyQtGraph (GPU-accelerated plotting library). The interface comprises a tree-based multi-file explorer with synchronized trial navigation and per-channel amplitude scaling. View-range management, zooming, and panning are performed explicitly via mouse interactions. Popup plots are generated for I-V curves, F-I curves, phase planes, and inter-spike interval distributions.
Cross-file trial averaging
The Explorer tab implements grand-average construction across multiple files and trials. In Cycle Single Trial mode, the user captures individual trials via Add Current Trial to Avg Set. Trials from different files may be accumulated; the selection persists across the session. Activation of Plot Selected Avg overlays the mean trace. When recordings of different durations are selected, all trials are truncated to the minimum array length before averaging to resolve shape mismatches.
Batch Processing
The batch processing engine implements a composable pipeline architecture in which registered analysis routines are chained sequentially. Analysis operations execute in a background worker thread; the graphical interface remains responsive during execution. Recording metadata (sampling rate, gain, acquisition datetime) are extracted automatically. Results are exported to CSV in wide format (scalar metrics) or long format (event arrays); both formats are compatible with Python/Pandas, R, and MATLAB. NWB 2.x export includes icephys sweep tables, a three-step stimulus reconstruction fallback, and a discrete-event ProcessingModule for FAIR-compliant data archival.
Plugin Interface
The software architecture comprises a central AnalysisRegistry that maps named analysis functions to the graphical interface and batch engine via a decorator pattern. Python scripts placed in ~/.synaptipy/plugins/ that use the @AnalysisRegistry.register decorator are discovered at startup and integrated into both the interactive analyser and batch pipeline without modification to the core package.
A documented template at src/Synaptipy/templates/analysis_template.py defines the required function signature and return schema.
@AnalysisRegistry.register(
name="my_analysis",
label="My Analysis",
ui_params=[{"name": "threshold", "type": "float", "default": -20.0}],
plots=[{"name": "Trace", "type": "trace"}],
)
def my_analysis_wrapper(data, time, sampling_rate, **kwargs):
...
return {
"module_used": "my_analysis",
"metrics": {"threshold_mv": kwargs["threshold"]},
}
Every wrapper must return a nested dictionary with a module_used key and a metrics sub-dictionary. Keys prefixed with _ pass arrays to plot overlays without appearing in the results table. The full specification is in docs/extending_synaptipy.md.
Plugin discovery follows two paths: examples/plugins/ (bundled examples) and ~/.synaptipy/plugins/ (user additions). A user copy with an identical filename takes precedence. Toggling Enable Custom Plugins in Edit > Preferences reloads all plugins and regenerates the Analyser tab UI within the running process. Import errors in individual plugins are caught and logged; the remaining plugins continue to load normally.
NWB Export and FAIR Compliance
Synaptipy exports raw traces and analysis results to Neurodata Without Borders (NWB) 2.x:
- Raw electrophysiology traces stored as
CurrentClampSeries/VoltageClampSeries - Sweep-level organisation via
IntracellularRecordingsTable,SimultaneousRecordingsTable, andSequentialRecordingsTable(NWB 2.x icephys best-practice hierarchy) - Stimulus waveform reconstruction from ABF epoch metadata when the command channel is absent; a three-step fallback (raw channel -> synthetic reconstruction ->
stimulus=Nonewith a warning) ensures NWB conformance for recordings with incomplete stimulus records - Discrete event data (spike times, synaptic event times, amplitudes) written as
DynamicTableobjects inside aProcessingModulewhen the batch engine produces_raw_arraysoutput - Electrode metadata and session provenance fields
Supported File Formats
File I/O is handled through the Neo library:
| Format | Extension(s) | Acquisition System |
|---|---|---|
| Axon Binary Format | .abf |
Axon / Molecular Devices |
| WinWCP | .wcp |
Strathclyde Electrophysiology Software |
| CED / Spike2 | .smr, .smrx |
Cambridge Electronic Design |
| Igor Pro | .ibw, .pxp |
WaveMetrics |
| Intan | .rhd, .rhs |
Intan Technologies |
| Neurodata Without Borders | .nwb |
NWB standard |
| BrainVision | .vhdr |
Brain Products |
| European Data Format | .edf |
EDF/EDF+ |
| Plexon | .plx, .pl2 |
Plexon |
| Open Ephys | .continuous, .oebin |
Open Ephys |
| Tucker Davis Technologies | .tev, .tbk |
TDT |
| Neuralynx | .ncs, .nse, .nev |
Neuralynx |
| NeuroExplorer | .nex |
NeuroExplorer |
| MATLAB | .mat |
- |
| ASCII / CSV | .txt, .csv, .tsv |
- |
Additional formats supported by Neo can be made available by adding the corresponding entry to the IODict in the infrastructure layer.
Technical Architecture
Synaptipy follows a separation-of-concerns design with three layers:
- Core layer - pure Python analysis logic, fully decoupled from the graphical interface and independently testable
- Application layer - PySide6 (Qt6) user interface and plugin manager
- Infrastructure layer - file I/O via Neo and PyNWB; NWB export
| Component | Technology | Version |
|---|---|---|
| Language | Python | 3.10 - 3.12 (3.11 recommended) |
| GUI Framework | PySide6 | 6.7.3 (pinned) |
| Plotting Engine | PyQtGraph | 0.13.3+ |
| Electrophysiology I/O | Neo | 0.14.0+ |
| NWB Export | PyNWB | 3.1.0+ |
| Numerical Computation | SciPy / NumPy | 1.14.0+ / 2.0.0+ |
PySide6 is pinned to 6.7.3 on all platforms. PySide6 6.8.0 contains a known crash on Windows (QTBUG-130070) and 6.10.x introduced internal signal-connection changes that produce segmentation faults in the pyqtgraph rendering path under the offscreen platform plugin. The pin will be reviewed when an upstream fix is available.
Documentation
Contributing
Contributions are welcome. The preferred contribution pathway for new analysis routines is the plugin interface, which requires no modification to the core package. For changes to the core, infrastructure, or application layers, refer to CONTRIBUTING.md and the developer guide for project conventions, coding standards, and the contribution workflow.
Dependencies and Citations
Synaptipy builds on the following open-source libraries. When using Synaptipy in published research, please consider citing the relevant upstream packages alongside the Synaptipy repository.
| Library | Role | Citation |
|---|---|---|
| Neo | Electrophysiology file I/O | Garcia S et al. (2014). Front. Neuroinformatics 8:10. doi:10.3389/fninf.2014.00010 |
| PyNWB | NWB data export | Rubel O et al. (2022). eLife 11:e78362. doi:10.7554/eLife.78362 |
| PySide6 | Qt6 GUI framework | Qt for Python, The Qt Company. https://doc.qt.io/qtforpython/ |
| PyQtGraph | Signal rendering | Campagnola L et al. PyQtGraph. https://www.pyqtgraph.org |
| SciPy | Signal processing and curve fitting | Virtanen P et al. (2020). Nature Methods 17:261-272. doi:10.1038/s41592-019-0686-2 |
| NumPy | Array computation | Harris CR et al. (2020). Nature 585:357-362. doi:10.1038/s41586-020-2649-2 |
License
Synaptipy is free and open-source software licensed under the GNU Affero General Public License v3 (AGPLv3). See the LICENSE file for full terms.
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 synaptipy-0.1.3b4.tar.gz.
File metadata
- Download URL: synaptipy-0.1.3b4.tar.gz
- Upload date:
- Size: 37.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd91e4c7cb16c101da0baa5205821b8ccb1b50e1e18819c605c23455c676482a
|
|
| MD5 |
db07cb5196dd78caee6db6eb52712b69
|
|
| BLAKE2b-256 |
79c3700ebad42b634b6130b489d748276f70a4bf13750886e9689aa6fd5156df
|
Provenance
The following attestation bundles were made for synaptipy-0.1.3b4.tar.gz:
Publisher:
release.yml on anzalks/synaptipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synaptipy-0.1.3b4.tar.gz -
Subject digest:
cd91e4c7cb16c101da0baa5205821b8ccb1b50e1e18819c605c23455c676482a - Sigstore transparency entry: 1470498360
- Sigstore integration time:
-
Permalink:
anzalks/synaptipy@4e3220a86238c93801e35d9d265e424121d36d8b -
Branch / Tag:
refs/tags/v0.1.3b4 - Owner: https://github.com/anzalks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4e3220a86238c93801e35d9d265e424121d36d8b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file synaptipy-0.1.3b4-py3-none-any.whl.
File metadata
- Download URL: synaptipy-0.1.3b4-py3-none-any.whl
- Upload date:
- Size: 18.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ea2c957e3ede775a3b02f19b0b7a875492ac0b51141ece6351d050127b7f835
|
|
| MD5 |
5ff0eb59c321e1f66e28cb78584bae56
|
|
| BLAKE2b-256 |
8f517c32fa9caa1d652cf1b0e85aa6aa8e60ca87d0531669dd573283272da228
|
Provenance
The following attestation bundles were made for synaptipy-0.1.3b4-py3-none-any.whl:
Publisher:
release.yml on anzalks/synaptipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synaptipy-0.1.3b4-py3-none-any.whl -
Subject digest:
5ea2c957e3ede775a3b02f19b0b7a875492ac0b51141ece6351d050127b7f835 - Sigstore transparency entry: 1470498815
- Sigstore integration time:
-
Permalink:
anzalks/synaptipy@4e3220a86238c93801e35d9d265e424121d36d8b -
Branch / Tag:
refs/tags/v0.1.3b4 - Owner: https://github.com/anzalks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4e3220a86238c93801e35d9d265e424121d36d8b -
Trigger Event:
workflow_dispatch
-
Statement type: