pylabrobot.heating_shaking.heater_shaker.HeaterShaker.center#
- HeaterShaker.center(x: bool = True, y: bool = True, z: bool = False) Coordinate #
Get the center of this resource.
- Parameters:
- Return type:
Examples
Get the center of a resource in the xy plane:
>>> r = Resource("resource", size_x=12, size_y=12, size_z=12) >>> r.center()
Coordinate(x=6.0, y=6.0, z=0.0)
Get the center of a resource with only the x-coordinate:
>>> r = Resource("resource", size_x=12, size_y=12, size_z=12) >>> r.center(x=True, y=False, z=False)
Coordinate(x=6.0, y=0.0, z=0.0)
Get the center of a resource in the x, y, and z directions:
>>> r = Resource("resource", size_x=12, size_y=12, size_z=12) >>> r.center(x=True, y=True, z=True)
Coordinate(x=6.0, y=6.0, z=6.0)