fix(byonoy): keep plane 0 when the Luminescence 96 streams multiple result tables - #1191
Merged
Merged
Conversation
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
marked this pull request as ready for review
August 4, 2026 13:58
Member
|
thanks! |
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.
Problem
On some Byonoy Luminescence 96 units,
read_luminescencefails with:The firmware streams the plate as one or more concatenated 96-well tables ("planes"):
seq_lenchunks of 12 floats →seq_len / 8tables. Some units return a single plane (seq_len == 8, 96 values); others return 8 planes (seq_len == 64, 768 values).read_luminescenceasserted 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_measurecopiesresults[0]and discards the rest (the extra planes are firmware-internal gain/diagnostic data). It restores theall_rows[96*0:96*1]selection that an earlier review replaced with a strictassert len == 96.Single-plane units (
seq_len == 8) are unaffected —all_rows[0:96]is the whole plate.Verification
read_luminescencenow returns a clean 8×12 plate instead of raising.pylabrobot/byonoy/driver_tests.py: 22/22 pass.