Fix well index decoding in Imager.capture for Well objects - #1226
Open
hinderling wants to merge 1 commit into
Open
Fix well index decoding in Imager.capture for Well objects#1226hinderling wants to merge 1 commit into
hinderling wants to merge 1 commit into
Conversation
Plate items are ordered column-major (A1, B1, ..., H1, A2, ...), but capture()
decoded a Well's index with divmod(idx, num_items_x), which mis-addresses wells
on non-square plates: capture(well=plate.get_well("B2")) images A10 on a
96-well plate, while the equivalent capture(well=(1, 1)) images B2.
Resolve the well with the get_child_row/get_child_column accessors instead of
hand-decoding the index, so resolution does not depend on item ordering.
Adds a regression test.
hinderling
force-pushed
the
fix-imager-well-index
branch
from
August 28, 2026 15:08
d141f79 to
e1971dd
Compare
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.
Plate items are ordered column-major (A1, B1, ..., H1, A2, ...), but
capture()decoded a well's index withdivmod(idx, num_items_x), which mis-addresses wells:capture(well=plate.get_well("B2"))imagesA10on a 96-well plate, while theequivalent capture(well=(1, 1))images B2.Fix: Use the
get_child_row/get_child_columnaccessors instead of hand-decoding the index, so the resolution no longer depends on item ordering at all. Adds a regression test.