Skip to content

Commit 7578db9

Browse files
committed
init commit
1 parent 0ceaefd commit 7578db9

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

api/src/opentrons/protocol_api/core/engine/transfer_components_executor.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,17 @@ def aspirate_and_wait(self, volume: float) -> None:
162162
# TODO: handle volume correction
163163
aspirate_props = self._transfer_properties.aspirate
164164
correction_volume = aspirate_props.correction_by_volume.get_for_volume(volume)
165+
is_meniscus = bool(
166+
aspirate_props.position_reference == PositionReference.LIQUID_MENISCUS
167+
)
165168
self._instrument.aspirate(
166169
location=self._target_location,
167170
well_core=None,
168171
volume=volume,
169172
rate=1,
170173
flow_rate=aspirate_props.flow_rate_by_volume.get_for_volume(volume),
171174
in_place=True,
172-
is_meniscus=None, # TODO: update this once meniscus is implemented
175+
is_meniscus=is_meniscus,
173176
correction_volume=correction_volume,
174177
)
175178
self._tip_state.append_liquid(volume)
@@ -186,6 +189,9 @@ def dispense_and_wait(
186189
# TODO: handle volume correction
187190
dispense_props = self._transfer_properties.dispense
188191
correction_volume = dispense_props.correction_by_volume.get_for_volume(volume)
192+
is_meniscus = bool(
193+
dispense_props.position_reference == PositionReference.LIQUID_MENISCUS
194+
)
189195
self._instrument.dispense(
190196
location=self._target_location,
191197
well_core=None,
@@ -194,7 +200,7 @@ def dispense_and_wait(
194200
flow_rate=dispense_props.flow_rate_by_volume.get_for_volume(volume),
195201
in_place=True,
196202
push_out=push_out_override,
197-
is_meniscus=None,
203+
is_meniscus=is_meniscus,
198204
correction_volume=correction_volume,
199205
)
200206
if push_out_override:
@@ -575,10 +581,11 @@ def absolute_point_from_position_reference_and_offset(
575581
case PositionReference.WELL_CENTER:
576582
reference_point = well.get_center()
577583
case PositionReference.LIQUID_MENISCUS:
578-
raise NotImplementedError(
579-
"Liquid transfer using liquid-meniscus relative positioning"
580-
" is not yet implemented."
581-
)
584+
# raise NotImplementedError(
585+
# "Liquid transfer using liquid-meniscus relative positioning"
586+
# " is not yet implemented."
587+
# )
588+
reference_point = well.get_meniscus()
582589
case _:
583590
raise ValueError(f"Unknown position reference {position_reference}")
584591
return reference_point + Point(offset.x, offset.y, offset.z)

api/src/opentrons/protocol_api/core/engine/well.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ def get_center(self) -> Point:
125125
well_location=WellLocation(origin=WellOrigin.CENTER),
126126
)
127127

128+
def get_meniscus(self) -> Point:
129+
"""Get the coordinate of the well's meniscus."""
130+
return self.get_bottom(self.current_liquid_height())
131+
128132
def load_liquid(
129133
self,
130134
liquid: Liquid,

api/src/opentrons/protocol_api/core/legacy/legacy_well_core.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ def get_center(self) -> Point:
106106
"""Get the coordinate of the well's center."""
107107
return self._geometry.center()
108108

109+
def get_meniscus(self) -> Point:
110+
"""Get the coordinate of the well's center."""
111+
raise APIVersionError(api_element="Getting a meniscus")
112+
109113
def load_liquid(
110114
self,
111115
liquid: Liquid,

api/src/opentrons/protocol_api/core/well.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ def get_bottom(self, z_offset: float) -> Point:
7171
def get_center(self) -> Point:
7272
"""Get the coordinate of the well's center."""
7373

74+
@abstractmethod
75+
def get_meniscus(self) -> Point:
76+
"""Get the coordinate of the well's meniscus."""
77+
7478
@abstractmethod
7579
def load_liquid(
7680
self,

0 commit comments

Comments
 (0)