Releases: anzalks/synaptipy
Releases · anzalks/synaptipy
v0.1.0b1 (beta-nightly)
First beta release. Core GUI, all 15 analysis modules, batch processing, NWB export, and plugin interface are functional. Issued as a pre-release for wider testing before a stable 0.1.0 tag.
Added
- Sag Ratio Standalone Analysis: Promoted
sag_ratio_analysisfrom an inline
computation withinrin_analysisto its own registered analysis plugin (15th
built-in module). Provides dedicated UI controls for baseline, peak, and
steady-state windows, Savitzky–Golay smoothing, and rebound depolarisation
measurement. Results:sag_ratio,sag_percentage,v_peak,v_ss,
v_baseline,rebound_depolarization. - Documentation: Updated tutorial (§4.15), algorithmic definitions (§4),
API reference, user guide, developer guide, README, and extending guide to
reflect the new standalone sag ratio analysis and 15 built-in modules. - Deferred Initial Reset for Multichannel: Generation-counter-protected
_deferred_initial_reset()catches post-layoutsigResizedshifts for
multichannel recordings without interfering with view state restoration. - Custom Analysis Plugin Documentation: Comprehensive guide (
extending_synaptipy.md) for writing analysis plugins without modifying source code - Plugin Template: Ready-to-copy template at
src/Synaptipy/templates/plugin_template.pywith inline comments for all parameter types and plot overlays - Plugin Tests: 16 tests validating plugin template logic, PluginManager loading, and wrapper conventions
- Tutorial Section 3.6: Step-by-step "Adding Your Own Analysis Tab" section in the user tutorial under the Analyser Tab
- Stress Tests: File cycling stress tests for plot canvas rebuild stability (100 iterations)
- Explorer Debounce: Debounce timer for file navigation to prevent rapid teardown cycles
- Regression tests for registry population (
test_registry_metadata.py) - Regression tests for preprocessing reset propagation (
test_preprocessing_reset.py) - Developer documentation for registry import rule, editable install, and
preprocessing reset propagation (copilot-instructions.md, developer_guide.md)
Fixed
- Explorer X-Axis Shift on File Cycling: Fixed bug where the X-axis would
shift right (not starting at 0) when cycling through files, especially with
multichannel recordings. Root cause: old ViewBoxes scheduled for
deleteLater()continued to emitsigXRangeChanged/sigYRangeChanged/
sigResizedsignals after the widget was replaced, corrupting slider and
scrollbar values for the new recording. Fix: explicitly disconnect all
ViewBox signals inExplorerPlotCanvas.rebuild_plots()before clearing plot
items. - Explorer X-Link Range Corruption: Fixed multichannel X-range corruption
caused bylinkedViewChanged()recalculating ranges from screen-geometry
pixel offsets between stacked ViewBoxes._reset_view()now blocks link
propagation viaViewBox.blockLink(True)while setting ranges, then unblocks. - Overlay Mode Y-Range Too Narrow: Fixed
_compute_channel_y_range()to
compute Y range from all trials (sampling up to 50 evenly spaced) instead of
only trial 0. Previously, if trial 0 was at resting potential but other
trials contained action potentials, the Y range was too narrow to display
the full signal. - Flaky Qt Tests: Added
processEvents()calls in 3 test files to resolve non-deterministic offscreen failures caused by stale deferred ViewBox geometry callbacks - Explorer Plot Layout: Fixed Windows Explorer plot view state preservation during file cycling
- Lint Errors: Resolved all flake8 CI failures in
analysis_formatterandexporter_tab - CSV Export: Updated tidy per-type CSV export for batch results
- Windows Analysis Loading: Fixed registry import bug where
AnalysisRegistryremained
empty on Windows because onlyregistry.pywas imported (not the full
Synaptipy.core.analysispackage that triggers@registerdecorators). Added
import Synaptipy.core.analysisinanalyser_tab.pyandstartup_manager.py. - Preprocessing Reset: Connected the
preprocessing_reset_requestedsignal in
BaseAnalysisTaband added_handle_preprocessing_reset()handler. Added
reset_ui()method toPreprocessingWidget. Reset now propagates globally to
all sibling analysis tabs viaAnalyserTab.set_global_preprocessing(None).
Analysis Module Bug Fixes
- Tau (Time Constant): Added exponential fit overlay plot —
calculate_taunow returns
fit curve data (fit_time,fit_values) alongsidetau_ms, and the registration
includesoverlay_fitplot metadata so the fit curve is drawn on the main trace - Excitability (F-I Curve): Added
popup_xyplot metadata to show F-I Curve popup
(Frequency vs Current) after multi-trial analysis - Spike Train Dynamics: Added ISI popup plot — wrapper now returns
isi_numbersand
isi_msarrays, and registration includespopup_xyplot metadata - Optogenetic Synchronization: Added secondary channel selector (
requires_secondary_channel
metadata) so users can pick a dedicated TTL/trigger channel instead of falling back to
the voltage trace; added stimulus onset vertical line markers to the plot - Event Detection (Template Match): Lowered default threshold from 4.0 SD to 3.0 SD
for better sensitivity; addeddirectionparameter to UI so users can switch polarity;
fixed time-axis reconstruction to use actualtimearray instead of synthesising from
sampling rate (fixes event time accuracy when data doesn't start at t=0) - Event Detection (Threshold): Fixed noise-floor guard that could override user threshold —
the 2-SD noise guard now only activates when the user's threshold is below 1 SD, otherwise
the user's explicit threshold is honoured - Added
overlay_fitvisualisation type toMetadataDrivenAnalysisTabfor drawing
analysis fit curves on the main plot - Added
_inject_secondary_channel_datatoMetadataDrivenAnalysisTabfor loading
data from a user-selected secondary channel and passing it to analysis functions
Publication Readiness Audit — Error Handling & Robustness
- Replaced ~25 silent
except: passblocks with diagnosticlog.debug()calls across 15 files - Added logging to error-swallowing blocks in neo_adapter, analysis_formatter, explorer_tab,
plot_canvas (widgets & explorer), analysis_plot_manager, main_window, startup_manager,
zoom_theme, plot_customization, and analysis_tabs/base - Added docstrings to NWB exporter fallback sentinel classes
- Removed trailing
passstatements and dead placeholder code from explorer_tab,
shortcut_manager, main_window, file_io_controller, data_loader, and base analysis tab - Cleaned up duplicate comment in base analysis tab error handler
- Removed unnecessary
passafterlog.debugin theme_manager
Publication Readiness Audit — Code Quality
- Fixed unused variable
param_keyin metadata_driven analysis tab - Fixed unused variable
dtin optogenetics wrapper - Replaced long conditional expressions with readable intermediate variables in
optogenetics.py and train_dynamics.py - Rewrote conversational docstring in optogenetics wrapper with proper Args/Returns format
- Fixed all flake8 violations: trailing whitespace, missing blank lines, line length, W391
- Cleaned up CLI placeholder module with proper docstrings (removed 50 lines of dead scaffolding)
- Removed stale
CSVExportercomments from exporters__init__.py
Publication Readiness Audit — Package Structure
- Populated
__all__exports inapplication/controllers/__init__.py(9 symbols) - Populated
__all__exports inapplication/gui/analysis_tabs/__init__.py(3 symbols) - Added
__all__and module docstring toapplication/gui/explorer/__init__.py
Publication Readiness Audit — CI/CD
- Added Python 3.12 to CI test matrix (now tests 3.10, 3.11, 3.12)
- Added
pytest-covcoverage reporting to CI (--cov=Synaptipy --cov-report=term-missing) - Added coverage XML artifact upload for ubuntu/3.11 builds
Publication Readiness Audit — Scientific Accuracy
- Fixed line-noise detection baseline overlap in
signal_processor.py - Fixed max/min dV/dt zeroing bias in
spike_analysis.py(sentinel values) - Fixed AHP depth sign convention in
spike_analysis.py - Fixed mean frequency calculation to use spike span instead of trace duration
- Fixed Rin unit conversion clarity (mV/pA → MOhm derivation)
- Refined sag ratio calculation to use 5th percentile for robustness
- Fixed z-score normalization in template matching (subtract median)
- Added dV/dt unit conversion documentation in
phase_plane.py - Removed duplicate dictionary keys in spike detection registry
Publication Readiness Audit — Code Quality
- Removed redundant imports, unused variables, and duplicate function definitions
- Added edge-case handling for empty spike indices
- Added docstring for
_find_stable_baseline_segment - Converted unresolvable TODO to NOTE (async limitation in batch load)
- Standardized all flake8 compliance to max-line-length 120
Publication Readiness Audit — CI/CD & Infrastructure
- Made flake8 lint failures blocking in CI (removed
--exit-zero) - Added
pytest-covto CI dependencies - Aligned Python version floor to 3.10 in pyproject.toml, environment.yml, README
- Standardized author email and license (AGPL-3.0-or-later)
- Cleaned stale files, relocated tests, removed empty directories
- Added
.coverage,htmlcov/,.pytest_cache/to.gitignore - Removed stale Python 3.9 classifier from
pyproject.toml - Added
pytest-covandflake8toenvironment.yml - Added 7 targeted scientific accuracy tests
Phase 1: Critical Performance & Data Loading
- CRITICAL: Fixed severe UI lag caused by repeated instantiation of PlotCustomizationManager in
get_plot_pens(). Now uses singleton pattern, eliminating thousands of unnecessary disk reads. - CRITICAL: Optimized `update_pl...