-
Notifications
You must be signed in to change notification settings - Fork 179
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(api): inner well geometry unit tests #17082
Conversation
a3440a9
to
9a0eaf5
Compare
998393f
to
11ee5b7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## edge #17082 +/- ##
===========================================
- Coverage 92.43% 73.82% -18.62%
===========================================
Files 77 43 -34
Lines 1283 3301 +2018
===========================================
+ Hits 1186 2437 +1251
- Misses 97 864 +767
Flags with carried forward coverage won't be shown. Click here to find out more.
|
5f9a620
to
98ea908
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good once you run make format-js
!
14e10fc
to
dc3cb04
Compare
Overview
This pr resolves the geometry calculations pertaining to liquid tracking. It updates a lot of the inner well geometry definitions according to the hardware team's measurements, and includes some math and logic fixes.
Frustum Whoopsie
One notable math fix is that the first time
height_to_volume_circular
orvolume_to_height_circular
are called for a given well, we'll now generate a table inshared-data
containing the volume calculated at every height within the well at a 0.005 mm interval. We did this because the inverse function of the polynomial relationship (only for circular frusta) we came up with was shown to have an exponential increase in error with respect to height that peaked at the middle of each well segment.To clarify, finding the volume from the height within a conical frustum works reliably well. This is because the relationship between height and volume takes the following shape:
Volume = a * target_height^3 + b * target_height^2 + c * target_height
, where a, b, and c are found from the heights and radii of the top and bottom faces.This makes finding the volume only a matter of addition and multiplication, but finding the height from some arbitrary volume to require an estimation of the roots of a third-degree polynomial. So, the solution here is just to avoid using that estimation and rely on a set number of the more reliable volume calculations that are done all at once.
For whatever reason, this was only a problem when calculating heights in circular, and not rectangular, frusta, so we left the rectangular math as is.
Changelog