Open amitschang opened 3 months ago
[None, 5, None, None],
[None, None, 10, None],
[None, None, None, 15]]
With the above the 5, 10, etc are somewhat redundant and would also require validation that someone didn't do:
[[0, None, None, None],
[None, 6, None, None],
[None, None, 3, None],
[None, None, None, 8]]
I think a concrete approach might offer the least confusion - give each vial a physical number on the box and have the vial ID (int) encode this. This could be as simple as a pic of the box with each vial labeled/numbered. Then they just become vial IDs 0-15. The alternative would have to use a mapping of vial ID to serial address (which is currently just the ordinal, i.e., 0-15).
True, perhaps then simple and flexible would be to have something like:
vial_grid: [4,4]
vial_index_order: "rlbt" # (right-left-bottom-top, counting from right to left first then top to bottom)
vials: [0, 5, 10, 15]
this could even extend to 3d!
Yep that seems cool! Though, I think making vial_index_order
configurable will give us a headache in having to constantly account for different orientations. I would just make this static and add it to the docs etc.
~But ultimately, the layout doesn't have to represented in code, as it can then be mutated, it just needs to be known.~
Doh, not true, as that wouldn't account for mini evolver, but would that be [2]
, [1, 2]
or [2, 1]
?
Existing implementations exist for this kind of thing, e.g., subplot layouts, my vote would be to role with one of those, i.e., [1, 2]
notation as opposed to [2]
. This way the UI can render it accurately as the user has it laid out on the bench in front of them.
Right now we have a simple list of the indexes of vials, but this doesn't give enough information about there physical layout unless one assumes the default 16 vial 4x4 grid.
We should support a configuration that enables both an understanding of the layout of available slots and to specify which are occupied, possibly in a way where the user can assign "names" as needed.
For example:
or possibly (assuming the numbers don't have to map strictly to top-down-left-right order:
Assuming we have a 4 x 4 grid but only inhabit one diagonal.
2-d assumption seems appropriate, if needed