Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoegenburg committed Sep 20, 2024
1 parent cb088a8 commit c435826
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 9 additions & 2 deletions api/src/opentrons/protocol_api/core/engine/well.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@

from opentrons_shared_data.labware.constants import WELL_NAME_PATTERN

from opentrons.protocol_engine import WellLocation, WellOrigin, WellOffset, WellVolumeOffset
from opentrons.protocol_engine import (
WellLocation,
WellOrigin,
WellOffset,
WellVolumeOffset,
)
from opentrons.protocol_engine import commands as cmd
from opentrons.protocol_engine.clients import SyncClient as EngineClient
from opentrons.protocols.api_support.util import UnsupportedAPIError
Expand Down Expand Up @@ -125,7 +130,9 @@ def get_center(self) -> Point:
well_location=WellLocation(origin=WellOrigin.CENTER),
)

def get_meniscus(self, z_offset: float, operation_volume: Optional[float] = None) -> Point:
def get_meniscus(
self, z_offset: float, operation_volume: Optional[float] = None
) -> Point:
"""Get the coordinate of the well's meniscus, with a z-offset."""
return self._engine_client.state.geometry.get_well_position(
well_name=self._name,
Expand Down
8 changes: 6 additions & 2 deletions api/src/opentrons/protocol_api/labware.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,19 @@ def center(self) -> Location:
return Location(self._core.get_center(), self)

@requires_version(2, 21)
def meniscus(self, z: float = 0.0, operation_volume: Optional[float] = None) -> Location:
def meniscus(
self, z: float = 0.0, operation_volume: Optional[float] = None
) -> Location:
"""
:param z: An offset on the z-axis, in mm. Positive offsets are higher and
negative offsets are lower.
:return: A :py:class:`~opentrons.types.Location` corresponding to the
absolute position of the meniscus-center of the well, plus the ``z`` offset
(if specified).
"""
return Location(self._core.get_meniscus(z_offset=z, operation_volume=operation_volume), self)
return Location(
self._core.get_meniscus(z_offset=z, operation_volume=operation_volume), self
)

@requires_version(2, 8)
def from_center_cartesian(self, x: float, y: float, z: float) -> Point:
Expand Down

0 comments on commit c435826

Please sign in to comment.