Skip to content
Open
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
4 changes: 4 additions & 0 deletions software/control/core/scan_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ def add_flexible_region(self, region_id, center_x, center_y, center_z, Nx, Ny, o
if scan_coordinates: # Only add region if there are valid coordinates
self._log.info(f"Added Flexible Region: {region_id}")
self.region_centers[region_id] = [center_x, center_y, center_z]
self.region_shapes[region_id] = "Square"
self.region_fov_coordinates[region_id] = scan_coordinates
self._update_callback(
AddScanCoordinateRegion(fov_centers=FovCenter.from_scan_coordinates(scan_coordinates))
Expand All @@ -329,6 +330,7 @@ def add_single_fov_region(self, region_id, center_x, center_y, center_z):
raise ValueError(f"FOV with center (x,y)={center_x},{center_y} is not valid, cannot add region.")

self.region_centers[region_id] = [center_x, center_y, center_z]
self.region_shapes[region_id] = "Square"
self.region_fov_coordinates[region_id] = [(center_x, center_y)]
self._update_callback(AddScanCoordinateRegion(fov_centers=[FovCenter(x_mm=center_x, y_mm=center_y)]))

Expand All @@ -353,6 +355,7 @@ def add_flexible_region_with_step_size(self, region_id, center_x, center_y, cent
if scan_coordinates: # Only add region if there are valid coordinates
self._log.info(f"Added Flexible Region: {region_id}")
self.region_centers[region_id] = [center_x, center_y, center_z]
self.region_shapes[region_id] = "Square"
self.region_fov_coordinates[region_id] = scan_coordinates
self._update_callback(
AddScanCoordinateRegion(fov_centers=FovCenter.from_scan_coordinates(scan_coordinates))
Expand Down Expand Up @@ -459,6 +462,7 @@ def add_template_region(
if self.validate_coordinates(x, y):
scan_coordinates.append((x, y))
self.region_centers[region_id] = [x_mm, y_mm, z_mm]
self.region_shapes[region_id] = "Square"
self.region_fov_coordinates[region_id] = scan_coordinates
self._update_callback(AddScanCoordinateRegion(fov_centers=FovCenter.from_scan_coordinates(scan_coordinates)))

Expand Down