# PicoStream A fast, simple GUI for streaming from PicoScope 5000a series scopes. Built on [labdaemon](https://github.com/qnslab/labdaemon). ## What's new in v1.0 Complete rewrite with: - **Dual channels** — acquire A and B simultaneously (16-bit = single channel only) - **Ring buffer** — configurable lookback (5–120s) with on-demand recording - **Pre-trigger capture** — include N seconds of data before you hit record - **Keep or discard** — stop recording and either save or trash the file - **VisPy plotting** — hardware-accelerated OpenGL, much faster than before - **Zarr format** — chunked storage, faster than HDF5 for large files - **PyQt6** — bumped from PyQt5 ![PicoStream GUI](assets/images/screenshot.png) ## Install Requires Python ≥3.10, PicoSDK installed. Install PicoSDK from [picotech.com/downloads](https://www.picotech.com/downloads). Linux users: create `/etc/udev/rules.d/99-picoscope.rules`: ``` SUBSYSTEM=="usb", ATTR{idVendor}=="0ce9", MODE="0666" ``` Then run `sudo udevadm control --reload-rules && sudo udevadm trigger`. From PyPI: ```bash pip install picostream ``` For development: ```bash just sync ``` ## Run After pip install: ```bash picostream ``` During development: ```bash just gui ``` ## Quickstart 1. Enter scope serial (or `MOCK` to simulate), click **Connect** 2. Set channels, voltage ranges, sample rate, resolution 3. **Start Acquisition** (Space bar) 4. **Start Recording** (R) when you want to save 5. **Stop & Keep** (K) or **Stop & Discard** (Del) Recordings save to `~/picostream/` by default. ## Crash Cleanup If the app crashes during recording, incomplete Zarr files remain in `~/picostream/`. These are useless. Delete them: ```bash rm -rf ~/picostream/*.zarr ``` Change save location in the GUI (Record Controls → Change...). ## Shortcuts | Key | Action | |-----|--------| | Space | Start/stop acquisition | | 1, 2 | Toggle channels | | R | Start recording | | K | Stop + keep | | Del | Stop + discard | | Ctrl+O | Open existing Zarr file | ## Development ```bash just gui # run from source just test # run tests just test-cov # run tests with coverage just format # format all code just lint # lint code just typecheck # type check just build # build PyInstaller executable just clean # remove build artifacts just sync # install dependencies just update # update dependencies just help # see all commands ``` ## Acknowledgements This began as a fork of [JoshHarris2108/pico_streaming](https://github.com/JoshHarris2108/pico_streaming) (unlicensed). The original producer-consumer architecture and PicoSDK integration came from Josh's work. ## Changelog ### v1.0.0 Complete rewrite — new architecture, new file format, dual channels, GUI-only. ### v0.2.0 CLI + HDF5 + single channel + PyQt5/PyQtGraph. ### v0.1.0 Initial release.