Add Aravis camera driver as PySpin alternative for Cytation#985
Open
vcjdeboer wants to merge 6 commits intoPyLabRobot:v1b1from
Open
Add Aravis camera driver as PySpin alternative for Cytation#985vcjdeboer wants to merge 6 commits intoPyLabRobot:v1b1from
vcjdeboer wants to merge 6 commits intoPyLabRobot:v1b1from
Conversation
Adds a pure-Aravis alternative to PySpin for controlling BlackFly cameras in the BioTek Cytation. Eliminates the Spinnaker SDK dependency and the Python 3.10 version cap that PySpin imposes. New files: - aravis_camera.py: standalone BlackFly driver using Aravis/GenICam via PyGObject - aravis_simulated.py: simulated camera for testing without hardware - cytation_aravis.py: CytationAravisBackend — drop-in replacement for CytationBackend using AravisCamera instead of PySpin. Same serial protocol for optics (filters, objectives, focus, LED), different camera driver. capture() signature matches MicroscopyBackend ABC with backend_params. - ARAVIS_README.md: installation and usage guide - test_aravis_connection.ipynb: hardware test notebook Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move Cytation5 to cytation5.py — takes backend param (PySpin or Aravis) - Move Cytation1 to cytation1.py — takes backend param, fixes bug where BioTekBackend (no capture()) was wired to Microscopy capability - cytation.py keeps CytationBackend + re-exports devices for backwards compat - __init__.py updated to import from new files Both device classes now accept a backend parameter instead of creating one internally, so users can choose CytationBackend (PySpin) or CytationAravisBackend (Aravis). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rdware-tested Architecture refactor following STAR pattern: - cytation_aravis_driver.py: CytationAravisDriver (BioTekBackend + AravisCamera) owns connections, optics control, camera control - cytation_aravis_microscopy.py: CytationAravisMicroscopyBackend (MicroscopyBackend) orchestrates capture by calling driver methods - cytation1.py/cytation5.py: device classes with camera="aravis"|"pyspin" switch - Removed monolithic cytation_aravis.py Bugs fixed during hardware testing: - aravis_camera.py: trigger() no longer starts/stops acquisition per frame — matches PySpin pattern where acquisition brackets the capture loop - cytation_aravis_driver.py: led_on intensity zfill(3) → zfill(2) - cytation_aravis_driver.py: _load_filters/_load_objectives use Rick's actual firmware protocol (per-slot query) instead of made-up regex parsing - cytation_aravis_driver.py: all serial commands (set_imaging_mode, set_objective, set_focus, select, set_position, led_on/off) now match cytation.py exactly - cytation_aravis_driver.py: bytes→str decode for firmware responses Hardware-tested on Cytation 1 with BlackFly BFLY-U3-13S2M: - Single capture: brightfield 2.5x, real images with correct exposure - Multi-image tiling: 2x2 grid capture working - Filter/objective discovery: DAPI, GFP, RFP + 4x PL FL, 2.5x FL Zeiss Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tive Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… access Replace all PySpin camera code in CytationBackend with AravisCamera calls. Simplify Cytation1/Cytation5 to always use CytationAravisDriver. Fix aravis_camera.py to accept serial_number=None (first available camera). Update docs notebook to use Microscopy.capture(well=...) API. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AravisCamera) as a drop-in alternative to PySpin for FLIR BlackFly cameras on the Cytation. Eliminates the Spinnaker SDK dependency and the Python 3.10 version cap that PySpin imposes.cytation.pyintocytation1.pyandcytation5.py— each device creates its own driver internally based on acameraparameter ("aravis"or"pyspin").CytationAravisDriver(connection + optics + camera) andCytationAravisMicroscopyBackend(capture orchestration) following the STARDriver pattern.New files
aravis_camera.pyaravis_simulated.pycytation_aravis_driver.pycytation_aravis_microscopy.pycytation1.pycytation5.pyModified files
cytation.py__init__.pyTest plan
HAS_ARAVISNote: Some CI checks may fail due to pre-existing lint issues on v1b1 (e.g., EL406 unused import) that are not from this PR.