-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): fully connected volume tracking (#16532)
# Overview This PR aims to consolidate well volume data from our existing relevant commands into a single source of truth in WellStore. These commands are LiquidProbe, LoadLiquid, Aspirate, and Dispense. ## volume estimation and height Well volume and height are tracked in three parts: - the probed height is a height gathered from a liquid probe since the last volume-affecting operation occurred; it is nulled out if you carry out a liquid operation on a well - the tracked volume is a volume that started with a `LoadLiquid` and was then modified by liquid volume tracking from aspirate and dispense volumes - the estimated volume is the same, but has been updated or started with a liquid height measurement that was converted into an estimated volume The reason for having all three is that they have different accuracy characteristics, and we therefore use them for meniscus height estimation in an order of precedence: - The most accurate is a probed height - If a probed height isn't available, use a tracked volume that we turn into a height - If that isn't available, use an estimated volume that we turn into a height The latter two values are only accessible if the labware the well is in has internal geometry data. Even when we do, that geometry data is noisy and can be inaccurate, making those values suitable for problems like "I don't want to have to accurately measure how much is in this tube" and not for problems like "I want to minimize external droplet formation on my 1uL aspiration". This PR implements all that, as well as setting the movement data for actually going to a well meniscus. ## volume offsets A pretty important thing to consider for _static_ meniscus-relative movements is that when you're aspirating you don't want to move to where the meniscus _is_ but rather where it will be when the operation ends, so you don't leave your pipette high and dry. We signify this by allowing a "volume offset" in a location. This is like a height offset but is specified in uL or the special value "operationVolume". It will add an extra Z-offset to the positioning to account for a volume change in a well. This is calculated using the well's internal geometry and thus only available if the well has internal geometry. If the value is the string "operationVolume", which should be thought of as a sentinel value, we even calculate the volume offset from the volume you passed to `aspirate`; but specifying the value as a float is available for things like a `moveToWell` preceding an `aspirateInPlace`. There's some gross internals because of history. One particularly gross one is the Location data type; this is an old friend indeed, and its friendship continues to pay dividends since we want to add something to it that is somewhat internal, and we have to do so in a really gross way. ## testing We really need to test this in actually used protocols and this shouldn't be relied upon yet, but extensive test coverage should help. --------- Co-authored-by: Seth Foster <[email protected]>
- Loading branch information
1 parent
6dbc215
commit 6812452
Showing
27 changed files
with
1,323 additions
and
214 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.