Repository navigation
Conversation
…8/LAB-303) The SiPM detector settings (bias, enable, offsets, bandwidth, temperature) are not in ScanImage or its TIFF header. This adds a node that reads them through the vendor ThorSiPM.dll and publishes them as a connector, so they land in the run log and bag. - nodes/thorsipm.py: ctypes driver, no ROS. Binds only FindDevices, SelectDevice, GetParam, GetParamString, GetParamInfo and TeardownDevice (signatures from the vendor GUI's P/Invoke metadata); no write path. CLI: scan / snapshot / watch. FakeBackend simulates the controller for tests. - nodes/sipm_node.py, nodes/sipm_cmd.py: /sipm/cmd, /sipm/reply, /sipm/status (1 Hz), std_msgs/String JSON like the BIAS and ScanImage connectors; commands ping, status, get, info, scan, disconnect, reconnect. Keeps reporting (and retrying) while the vendor GUI holds the COM port. - bridge_node, mcap_convert, rig (--sipm), pixi tasks (sipm-node, sipm-cmd, sipm, test-sipm): the sipm connector is recorded and derived like the others. - tests/test_sipm.py: 28 checks against the simulated controller (driver, node, busy port, recording). The existing suites still pass (test-frames 39/39, test 54/54). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Stacked on #261 (
claude/scanimage-frames-wrapper), so this diff is only the SiPM commit. Retarget tomainonce #261 merges.Implements LAB-319 (split out of LAB-308, ScanImage documentation for agents, Bergamo III); uses the LAB-303 connector pattern.
Why
The SiPM detector settings (bias, enable, offsets, bandwidth, temperature) are not in ScanImage or its TIFF header. This node reads them through the vendor
ThorSiPM.dlland publishes them as a connector, so they land in the run log and bag next to ScanImage and the arena.What
ros2-poc/nodes/thorsipm.py— ctypes driver, no ROS. Binds onlyFindDevices,SelectDevice,GetParam,GetParamString,GetParamInfo,TeardownDevice(signatures from the vendor GUI's own P/Invoke metadata). No write path. CLI:scan/snapshot/watch.FakeBackendsimulates the controller.ros2-poc/nodes/sipm_node.py,sipm_cmd.py—/sipm/cmd,/sipm/reply,/sipm/status(1 Hz),std_msgs/StringJSON like the BIAS and ScanImage connectors. Commands:ping,status,get,info,scan,disconnect,reconnect. Keeps reporting (and retrying) while the vendor GUI holds the COM port.bridge_node.py,mcap_convert.py,rig.py --sipm, pixi tasks (sipm-node,sipm-cmd,sipm,test-sipm) — thesipmconnector is recorded and derived like the others.Open question the rig test answers
The GUI's
Paramsenum gives the IDs for enable, gain, offset, bandwidth, safety, saturations and serial numbers. The DLL also namesPARAM_SIPM1_BIAS,…_TEMPERATURE,…_TEMPSTATUS, but their numeric IDs aren't in the enum. Block S finds them with a read-onlyGetParamInfoscan and writes them toconfig/sipm_params.jsonin scanimage-2026-bergamo.Testing
pixi run test-sipm: 28 / 28 (driver, node, busy port, recording) on macOS.test-frames39 / 39,test54 / 54.--fake: 16"src":"sipm"connector events in the run log, bag closed cleanly, controller released on exit.🤖 Generated with Claude Code