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(api) Support changing current based on tip configuration #13660

Merged

Conversation

Laura-Danielle
Copy link
Contributor

Overview

With this PR, we should now be able to perform partial tip configuration movements in the hardware controller.

Test Plan

  • Check that the following works:
  • Full configuration pick-ups
  • Single pick ups (8 channel and 96 channel)
  • Column pick ups (96 channel only)
  • Quadrant pick ups (96 channel only)

We should also check that these movements persist for liquid handling functions as well.

Changelog

  • Change the current scalar in the pipette configurations to be a current map
  • Utilize this new current map to determine the pick up current only (HW folks, not sure if anything should also change for drop tip. Please let me know).

Review requests

HW folks, please comment and tell me what the partial currents should actually be. I made up numbers here.
SW folks, let me know if anything seems weird/gross/whatever.

Risk assessment

Medium. We should ensure that normal configuration tip pick-ups have not deviated from normal.

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #13660 (e54db9b) into feat-partial-tip-configuration (bca7bfb) will increase coverage by 0.00%.
Report is 1 commits behind head on feat-partial-tip-configuration.
The diff coverage is 84.61%.

Additional details and impacted files

Impacted file tree graph

@@                        Coverage Diff                         @@
##           feat-partial-tip-configuration   #13660      +/-   ##
==================================================================
  Coverage                           71.29%   71.30%              
==================================================================
  Files                                2423     1587     -836     
  Lines                               68201    52852   -15349     
  Branches                             7972     3480    -4492     
==================================================================
- Hits                                48625    37685   -10940     
+ Misses                              17704    14617    -3087     
+ Partials                             1872      550    -1322     
Flag Coverage Δ
app 44.12% <ø> (-24.83%) ⬇️
g-code-testing 96.44% <ø> (ø)
notify-server 89.13% <ø> (ø)
protocol-designer 46.02% <ø> (ø)
shared-data 74.37% <84.61%> (-0.01%) ⬇️
step-generation 86.53% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...n/opentrons_shared_data/pipette/model_constants.py 100.00% <ø> (ø)
...rons_shared_data/pipette/mutable_configurations.py 90.84% <100.00%> (+0.43%) ⬆️
...pentrons_shared_data/pipette/pipette_definition.py 93.79% <100.00%> (ø)
...s_shared_data/pipette/scripts/build_json_script.py 0.00% <0.00%> (ø)
...data/pipette/scripts/update_configuration_files.py 0.00% <0.00%> (ø)

... and 837 files with indirect coverage changes

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

The code looks good to me! Will have to test on a machine though

cls,
nozzle_map: Dict[str, List[float]],
default_pickup_current: float,
pick_up_current_map: Optional[Dict[int, float]] = None,
Copy link
Member

Choose a reason for hiding this comment

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

in what situations would we not have a pick_up_current_map? does it have to be = None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

single channels do not have a pick up current map.

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Review now with appropriate resolution selected

Base automatically changed from RLIQ-425-tip-configuration-manager to feat-partial-tip-configuration September 29, 2023 14:15
@Laura-Danielle Laura-Danielle requested a review from a team as a code owner September 29, 2023 14:15
@Laura-Danielle Laura-Danielle force-pushed the RLIQ-425-support-changing-current branch from 7603ab4 to 6eab794 Compare September 29, 2023 19:33
"5": 0.6,
"6": 0.7,
"7": 0.8,
"8": 0.9
Copy link
Contributor

Choose a reason for hiding this comment

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

are these real values? if not let's get those

Copy link
Contributor

Choose a reason for hiding this comment

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

Also is the current value defined in the pickUpTipConfigurations being used anywhere anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no these are not real numbers. pickUpTipConfigurations current will not be used anymore.

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

From HW:
Let's change the values for the perTipPickupCurrent configurations such that:

  • For 1-channel pickups, the current is the same as the pickup current for the single-channel version of the pipette
  • For 2-7 channel pickups inclusive, the current is Ntips / Nchannels times the as-of-now 8channel pickup current
  • For 8 channel pickups, the current is the same is the as-of-now 8channel pickup current

These will be good for the OT-2 pipettes (the different nozzle geometry means the overlap positioning won't change much), and they'll be good starting points for more in-depth testing of the Flex configurations.

From me:
We also should probably get rid of pickUpTipConfigurations.current.

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Code looks good, will try and get this tested!

return self._current_scalar
def get_tip_configuration_current(self) -> float:
return self._pick_up_current_map[
len(self._current_nozzle_configuration.map_store)
Copy link
Member

Choose a reason for hiding this comment

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

nit: i would love it if the nozzle configuration objects had like tip_count property that did this or something but it's ok if it works

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure can do that

Copy link
Contributor

@caila-marashaj caila-marashaj left a comment

Choose a reason for hiding this comment

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

looks good on hardware!

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Ah, looks like @caila-marashaj did some in person testing so we're good - let's just fix that malformed mu

@Laura-Danielle Laura-Danielle merged commit 0302955 into feat-partial-tip-configuration Oct 16, 2023
51 of 54 checks passed
@Laura-Danielle Laura-Danielle deleted the RLIQ-425-support-changing-current branch October 16, 2023 16:51
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.

4 participants