Metadata-Version: 2.4
Name: microsync
Version: 2.6.3
Summary: Python driver for 32-bit microscope synchronization device.
Author-email: Roman Kiselev <roman.kiselev@stjude.org>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/stjude-smc/microsync
Project-URL: Repository, https://github.com/stjude-smc/microsync
Project-URL: Documentation, https://stjude-smc.github.io/microsync/
Project-URL: Bug Tracker, https://github.com/stjude-smc/microsync/issues
Keywords: microscope,synchronization,device,arduino,sam3x,serial,timing,laser,camera,ptirf
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: pyserial>=3.0
Requires-Dist: bokeh>=3.0.0
Requires-Dist: selenium>=4.0.0
Requires-Dist: webdriver-manager>=4.0.0
Provides-Extra: dev
Requires-Dist: jupyter>=1.0; extra == "dev"
Requires-Dist: sphinx>=4.0; extra == "dev"
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "dev"

# `microsync` — Python driver for microscope synchronization device

**Python driver for `microsync` — a universal 32-bit Arduino Due-based triggering device**. Control lasers, cameras, and timing with microsecond precision.

- **Full documentation:** [stjude-smc.github.io/microsync](https://stjude-smc.github.io/microsync/)
- **Repository:** [github.com/stjude-smc/microsync](https://github.com/stjude-smc/microsync)

## Install

Requires Python 3.7+ and `pyserial` (installed automatically):

```bash
pip install microsync
```

## Quick start

Upload the microsync firmware to an Arduino Due, then:

```python
from microsync import SyncDevice

sd = SyncDevice("COM4")   # or "/dev/ttyUSB0" on Linux
sd.pos_pulse("D8", 1000, ts=1000)   # 1 ms pulse on D8 after 1 ms delay
sd.go()
```

## Features

- Microsecond-precision event scheduling (pulses, toggles, camera triggers)
- Laser shutter and interlock safety logic
- Acquisition modes: continuous, stroboscopic, ALEX
- Interactive event visualization (Bokeh)
- Context manager for jitter-free batch commands

