Skip to content

STARBackend: forward traverse-height and grouping knobs through probe_liquid_volumes#1146

Merged
BioCam merged 2 commits into
PyLabRobot:mainfrom
BioCam:star-probe-volumes-forward-knobs
Jul 5, 2026
Merged

STARBackend: forward traverse-height and grouping knobs through probe_liquid_volumes#1146
BioCam merged 2 commits into
PyLabRobot:mainfrom
BioCam:star-probe-volumes-forward-knobs

Conversation

@BioCam

@BioCam BioCam commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

probe_liquid_volumes is a thin wrapper: it calls probe_liquid_heights and converts each returned height to a volume via compute_volume_from_height. But it forwarded only a subset of the inner method's knobs, so it silently overrode two probe behaviours that a direct probe_liquid_heights call can control, and it required an explicit use_channels the inner method makes optional.

probe_liquid_heights exposes min_traverse_height_at_beginning_of_command, min_traverse_height_during_command, and x_grouping_tolerance; probe_liquid_volumes did not, so its inner call always fell back to full Z safety between batches (channels fully retract each pass, slower) and default X grouping, with no way to request a low on-deck traverse.

  • probe_liquid_volumes now accepts and forwards min_traverse_height_at_beginning_of_command, min_traverse_height_during_command, and x_grouping_tolerance, in the same order as probe_liquid_heights. Defaults stay None, which reproduces the previous full-Z-safety, default-grouping behaviour.
  • lld_mode widens from LLDMode to Union[LLDMode, List[LLDMode], None], default None. None resolves to GAMMA (capacitive cLLD) inside probe_liquid_heights, so both methods default to the same detection mode, and a default call no longer trips the single-LLDMode deprecation warning the old LLDMode.GAMMA default emitted internally. A per-container list is now accepted too.
  • n_replicates default changes from 3 to 1, matching probe_liquid_heights.
  • use_channels widens from List[int] to Optional[List[int]] = None. None auto-selects channels [0, 1, ..., len(containers)-1] via validate_channel_selections, which the inner method already supported; the wrapper simply never inherited it. Required->optional, so existing callers are unaffected.

With these changes the two signatures are identical, and probe_liquid_volumes is a pure pass-through to probe_liquid_heights plus the compute_volume_from_height conversion.

Behaviour: the additive traverse/grouping params, the wider lld_mode, and the optional use_channels are all behaviour-preserving at their defaults. The one semantic change is n_replicates: a default call now takes a single measurement rather than averaging three, and the replicate-consistency check cannot fire at the default. The new traverse/grouping params are inserted mid-signature to mirror probe_liquid_heights, so a caller passing z_position_at_end_of_command or move_to_z_safety_after positionally would misbind; there are no such call sites in-tree, and these APIs are used with keyword arguments.

Tests: the probe_liquid_heights suite passes unchanged; ruff format, ruff check, ruff check --select I, and mypy --check-untyped-defs are clean on the backend.

🤖 Generated with Claude Code

BioCam and others added 2 commits July 4, 2026 00:29
…obe_liquid_volumes`

`probe_liquid_volumes` is a thin wrapper: it calls `probe_liquid_heights` and converts each returned height to a volume via `compute_volume_from_height`. But it forwarded only a subset of the inner method's knobs, so it silently overrode two probe behaviours that a direct `probe_liquid_heights` call can control.

`probe_liquid_heights` exposes `min_traverse_height_at_beginning_of_command`, `min_traverse_height_during_command`, and `x_grouping_tolerance`; `probe_liquid_volumes` did not, so its inner call always fell back to full Z safety between batches (channels fully retract each pass, slower) and default X grouping, with no way to request a low on-deck traverse.

- `probe_liquid_volumes` now accepts and forwards `min_traverse_height_at_beginning_of_command`, `min_traverse_height_during_command`, and `x_grouping_tolerance`, in the same order as `probe_liquid_heights`. Defaults stay `None`, which reproduces the previous full-Z-safety, default-grouping behaviour.
- `lld_mode` widens from `LLDMode` to `Union[LLDMode, List[LLDMode], None]`, default `None`. `None` resolves to GAMMA (capacitive cLLD) inside `probe_liquid_heights`, so both methods default to the same detection mode, and a default call no longer trips the single-`LLDMode` deprecation warning the old `LLDMode.GAMMA` default emitted internally. A per-container list is now accepted too.
- `n_replicates` default changes from 3 to 1, matching `probe_liquid_heights`.

Behaviour: additive traverse/grouping params and the wider `lld_mode` are behaviour-preserving at their defaults. The one semantic change is `n_replicates`: a default call now takes a single measurement rather than averaging three, and the replicate-consistency check cannot fire at the default. The new params are inserted mid-signature to mirror `probe_liquid_heights`, so a caller passing `z_position_at_end_of_command` or `move_to_z_safety_after` positionally would misbind; there are no such call sites in-tree, and these APIs are used with keyword arguments.

Tests: the `probe_liquid_heights` suite passes unchanged; `ruff format`, `ruff check`, `ruff check --select I`, and `mypy --check-untyped-defs` are clean on the backend.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015TDaTwWeE6RniECBUHZQnv
…or auto-selection

`probe_liquid_heights` accepts `use_channels=None` and auto-selects channels [0, 1, ..., len(containers)-1] via `validate_channel_selections`; `probe_liquid_volumes` required an explicit list purely for historical reasons - it predates that auto-selection, and its callee already handles `None` identically for volume probing.

- `use_channels` on `probe_liquid_volumes` becomes `Optional[List[int]] = None`, forwarded unchanged. This is a required->optional widening, so existing callers are unaffected.

The two signatures are now identical: `probe_liquid_volumes` is a pure pass-through to `probe_liquid_heights` plus the `compute_volume_from_height` conversion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015TDaTwWeE6RniECBUHZQnv
@BioCam BioCam merged commit fd00e8a into PyLabRobot:main Jul 5, 2026
21 checks passed
@BioCam BioCam deleted the star-probe-volumes-forward-knobs branch July 5, 2026 17:05
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