pylabrobot.temperature_controlling.temperature_controller.TemperatureController.centers#
- TemperatureController.centers(xn: int = 1, yn: int = 1, zn: int = 1) List[Coordinate] #
Get equally spaced points in the x, y, and z directions.
- Parameters:
- Returns:
A grid of points in the x, y, and z directions.
- Return type:
Examples
Get the center of a resource:
>>> r = Resource("resource", size_x=12, size_y=12, size_z=12) >>> r.centers()
Coordinate(x=6.0, y=6.0, z=6.0)
Get the center of a resource with 2 points in the x direction:
>>> r = Resource("resource", size_x=12, size_y=12, size_z=12) >>> r.centers(xn=2)
[Coordinate(x=4.0, y=6.0, z=6.0), Coordinate(x=9.0, y=6.0, z=6.0)]
Get the center of a resource with 2 points in the x and y directions:
>>> r = Resource("resource", size_x=12, size_y=12, size_z=12) >>> r.centers(xn=2, yn=2) [Coordinate(x=4.0, y=4.0, z=6.0), Coordinate(x=8.0, y=4.0, z=6.0), Coordinate(x=4.0, y=8.0, z=6.0), Coordinate(x=8.0, y=8.0, z=6.0)]