Skip to content

Add SPIM-head F-drive device, hard limits, and focus/align plans#45

Merged
pskeshu merged 2 commits into
gently-project:developmentfrom
pskeshu:feature/spim-fdrive
Jun 12, 2026
Merged

Add SPIM-head F-drive device, hard limits, and focus/align plans#45
pskeshu merged 2 commits into
gently-project:developmentfrom
pskeshu:feature/spim-fdrive

Conversation

@pskeshu

@pskeshu pskeshu commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the SPIM-head F-drive as a first-class device with non-overridable travel limits, plus automated focus-descent and dual-view alignment plans.

  • piezo.py: harden DiSPIMFDrive with module-level hard travel limits (F_DRIVE_MIN_UM=30, F_DRIVE_MAX_UM=25000), non-overridable from above; configurable per-move Status timeout (120 s) for slow full-travel traverses
  • device_factory.py: register the SPIM head as fdrive (ZStage:V:37)
  • plans/acquisition.py: spim_head_focus_descent_plan (3-phase descent: fast traverse → coarse 1000 µm steps → fine sweep-and-fit under LED), register_views_xy_plan (dual-view XY registration), and the composite spim_head_focus_and_align_plan. Also fixes get_stage_position_plan to use bps.rd's actual return value (it was indexed as a {name:{value}} dict)
  • device_layer.py: register the new plans and mark them heavy
  • test_dispim_device_safety.py: F-drive bounds tests for the 30/25000 limits

Test plan

  • pytest tests/test_dispim_device_safety.py passes (bounds enforcement)
  • On hardware: run spim_head_focus_descent_plan and confirm the 3-phase descent converges on focus
  • Confirm moves outside 30–25000 µm are rejected at the device layer

Notes

Stacked on #44 (the diff shows the temperature-controller commit until #44 merges; the branches share history). Second of the two-PR split out of #43 — once both merge, #43 reduces to UX v2 only.

🤖 Generated with Claude Code

pskeshu and others added 2 commits June 7, 2026 20:19
- config.yml: add `temperature:` block (serial backend on COM8) so the
  device layer registers a `temperature` device.
- Web Devices header: live water-temperature readout + setpoint control
  - data.py: GET /api/devices/temperature/status, POST /api/devices/temperature/set
  - devices.js: temperature panel (poll + set); main.css pill; index.html markup
- Vendor integration SDKs: MQTT (test_temperature_controller.py) and USB
  serial (test_temp_usb.py).
- piezo.py: harden DiSPIMFDrive with module-level hard travel limits
  (F_DRIVE_MIN_UM=30, F_DRIVE_MAX_UM=25000), non-overridable from above;
  configurable per-move Status timeout (120s) for slow full-travel traverses.
- device_factory.py: register the SPIM head as `fdrive` (ZStage:V:37).
- plans/acquisition.py: spim_head_focus_descent_plan (3-phase descent:
  fast traverse -> coarse 1000um steps -> fine sweep-and-fit under LED),
  register_views_xy_plan (dual-view XY registration), and the composite
  spim_head_focus_and_align_plan. Also fix get_stage_position_plan to use
  bps.rd's actual return value (it was indexed as a {name:{value}} dict).
- device_layer.py: register the new plans and mark them heavy.
- test_dispim_device_safety.py: F-drive bounds tests for the 30/25000 limits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pskeshu pskeshu merged commit 59a1d5e into gently-project:development Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant