positions_list¶
This module contains just one class, which is used in the samples module to create a list of positions for tiling images.
class CreateTilePositions(object)¶
-
class
microscope_automation.samples.positions_list.
CreateTilePositions
(tile_type='none', tile_number=(2, 2), tile_size=(1, 1), degrees=0)[source]¶ Create position lists for tiling and multi-position imaging.
-
create_ellipse
(nx, ny)[source]¶ Return positions for ellipse with step size of one.
- Input:
nx, ny: number of tiles in x and y
- Output:
ellipse_list: list for rectangle positions, centered around zero and with step size of one
-
create_rectangle
(nx, ny)[source]¶ Return positions for rectangle with step size of one.
- Input:
nx, ny: number of tiles in x and y
- Output:
rect_list: list for rectangle positions, centered around zero and with step size of one
-
get_field_rotation
()[source]¶ Set size of tiles in x and y.
- Input:
none
- Output:
degrees: Angle the tile field is rotated counterclockwise in degrees
-
get_pos_list
(center=(0, 0, 0))[source]¶ Return list with positions.
- Input:
center: Center position for tiles as tuple (x, y, z)
- Output:
pos_list: list with tuples (x,y) for tile centers.
-
get_tile_number
()[source]¶ Return number of tiles in x and y.
- Input:
none
- Output:
tile_number: tuple with number of tiles in x and y direction
-
get_tile_size
()[source]¶ Retrieve size of tiles in x and y.
- Input:
none
- Output:
tile_size: tuple with size of tiles in x and y direction
-
get_tile_type
()[source]¶ Return type of tiling.
- Input:
none
- Output:
- tile_type: string to describe type of tiling. Allowed values:
‘none’: do not tile
‘rectangle’: tiles are arranged to form a rectangle
‘ellipse’: tiles are arranged to form an ellipse
-
rotate_pos_list
(pos_list, degrees)[source]¶ Rotate all coordinates in pos_list counterclockwise by angle degree around center = (0, 0, 0).
- Input:
pos_list: list with (x, y, z) coordinates
degrees: amount of counterclock rotation around origin in degree
- Output:
rot_list: list with (x, y, z) coordinates after rotation.
-
set_field_rotation
(degrees=0)[source]¶ Set size of tiles in x and y.
- Input:
degrees: Angle the tile field is rotated counterclockwise in degrees
- Output:
none
-
set_tile_number
(tile_number=(2, 2))[source]¶ Set number of tiles in x and y.
- Input:
tile_number: tuple with number of tiles in x and y direction
- Output:
none
-
set_tile_size
(tile_size=(1, 1))[source]¶ Set size of tiles in x and y.
- Input:
tile_size: tuple with size of tiles in x and y direction
- Output:
none
-