Skip to content

fix(byonoy): keep plane 0 when the Luminescence 96 streams multiple result tables - #1191

Merged
rickwierenga merged 2 commits into
PyLabRobot:mainfrom
vcjdeboer:fix/byonoy-lum-plane0
Aug 4, 2026
Merged

fix(byonoy): keep plane 0 when the Luminescence 96 streams multiple result tables#1191
rickwierenga merged 2 commits into
PyLabRobot:mainfrom
vcjdeboer:fix/byonoy-lum-plane0

Conversation

@vcjdeboer

Copy link
Copy Markdown
Contributor

Problem

On some Byonoy Luminescence 96 units, read_luminescence fails with:

RuntimeError: <name> luminescence read produced 768 values (expected 96)

The firmware streams the plate as one or more concatenated 96-well tables ("planes"): seq_len chunks of 12 floats → seq_len / 8 tables. Some units return a single plane (seq_len == 8, 96 values); others return 8 planes (seq_len == 64, 768 values). read_luminescence asserted exactly 96 values and raised on the multi-plane units.

Fix

Take the first table (plane 0) and require the total to be a positive multiple of 96. This mirrors the vendor library, whose lum96_measure copies results[0] and discards the rest (the extra planes are firmware-internal gain/diagnostic data). It restores the all_rows[96*0:96*1] selection that an earlier review replaced with a strict assert len == 96.

Single-plane units (seq_len == 8) are unaffected — all_rows[0:96] is the whole plate.

Verification

  • Verified live against a Luminescence 96 that streams 8 planes: read_luminescence now returns a clean 8×12 plate instead of raising.
  • pylabrobot/byonoy/driver_tests.py: 22/22 pass.

vcjdeboer and others added 2 commits August 4, 2026 14:29
The Byonoy Luminescence 96 firmware streams the plate as one or more
concatenated 96-well tables (planes): seq_len chunks of 12 => seq_len/8
tables. Some units return one plane (seq_len=8, 96 values), others return
8 planes (seq_len=64, 768 values). read_luminescence asserted exactly 96
values and raised 'produced 768 values (expected 96)' on the latter.

Take the first table (plane 0) and require a positive multiple of 96 —
mirroring the vendor library, whose lum96_measure copies results[0] and
discards the rest (the extra planes are firmware-internal gain/diagnostic
data). This restores the pre-review all_rows[96*0:96*1] behavior and was
verified live against a Luminescence 96 returning 8 planes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
'plate = all_rows[0:96]' shadowed read_luminescence's 'plate: Plate'
parameter, so mypy saw list[float] assigned to Plate. Rename to 'plane0'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vcjdeboer
vcjdeboer marked this pull request as ready for review August 4, 2026 13:58
@rickwierenga
rickwierenga merged commit 798cab8 into PyLabRobot:main Aug 4, 2026
21 checks passed
@rickwierenga

Copy link
Copy Markdown
Member

thanks!

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.

2 participants