Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions asyncroscopy/Microscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,23 @@ def place_beam(self, position) -> None:
"""
self._place_beam(position)

@command(dtype_in=DevVarFloatArray, dtype_out=None)
def place_beam_list(self, positions) -> None:
"""
Place beam at multiple positions sequentially.
Extension of place_beam command
Why not call place_beam in loop of client side -> It fails
"""
if len(positions) % 2 != 0:
raise ValueError("Input must contain pairs of (x, y) values.")

for i in range(0, len(positions), 2):
x = float(positions[i])
y = float(positions[i + 1])

self._place_beam([x, y])


@command()
def blank_beam(self) -> None:
"""blank beam"""
Expand Down
Loading