Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(shared-data): Add the ability to handle sub wells in labware geometry #16658

Merged
merged 5 commits into from
Nov 1, 2024

Conversation

ryanthecoder
Copy link
Contributor

Overview

Some Labware, particularly larger reservoirs have wells that have "sub well" geometry at the bottom, such as the Nest 1 well 195ml, which is one well with 96 little pyramids at the bottom.
This PR lets there be a "count" field in the geometry stack up which tells the system that there are "count" number of sub features in this well.

For the Height->Volume, we do the normal height->volume of one of these sub features and then multiple the resulting volume by "count"

For Volume-Height, we first divide the volume by "count" to get the volume change in one sub well and then do the normal calculation.

Test Plan and Hands on Testing

Changelog

Review requests

Risk assessment

@ryanthecoder ryanthecoder requested review from a team as code owners October 31, 2024 19:36
Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧇

Comment on lines 159 to 160
"count": {
"type": "number"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting—your math doesn't change either way, but I would consider splitting this into xCount and yCount for visualization reasons.

@@ -272,6 +284,7 @@ def height_at_volume_within_section(
section_height: float,
) -> float:
"""Calculate a height within a bounded section according to geometry."""
target_volume_relative = target_volume_relative / section.count
Copy link
Contributor

@caila-marashaj caila-marashaj Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may not have to do this for height to volume ? In the two cases where height is given, either:

  • The height is not in the subwell: the calculation doesnt change
  • the height is within the subwells: the volume we're trying to find is contained only within the one subwell we're getting the liquid height from

Copy link
Contributor Author

@ryanthecoder ryanthecoder Nov 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still correct, if we want to be say 24ul above the bottom and there are 8 subwells, we need to find the height in 1 subwell that equals (24/8)=3ul if we didn't do the division, then we would be trying to find where it would be 24ul in 1 subwell

@ryanthecoder ryanthecoder merged commit c9cda35 into edge Nov 1, 2024
72 checks passed
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.

3 participants