refactor: change sl1 names following convention of controls

This commit is contained in:
gac-x12sa
2025-08-04 15:19:27 +02:00
committed by appel_c
parent 9e45e927a0
commit 40d6acf431
2 changed files with 6 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ sl1xr:
description: 'slit 1 (frontend) x ring'
deviceClass: ophyd.EpicsMotor
deviceConfig:
prefix: 'X12SA-FE-SLDI1:TRXR'
prefix: 'X12SA-FE-SL1:TRXR'
onFailure: raise
enabled: true
readoutPriority: baseline
@@ -55,7 +55,7 @@ sl1xw:
description: 'slit 1 (frontend) x wall'
deviceClass: ophyd.EpicsMotor
deviceConfig:
prefix: 'X12SA-FE-SLDI1:TRXW'
prefix: 'X12SA-FE-SL1:TRXW'
onFailure: raise
enabled: true
readoutPriority: baseline
@@ -69,7 +69,7 @@ sl1yb:
description: 'slit 1 (frontend) y bottom'
deviceClass: ophyd.EpicsMotor
deviceConfig:
prefix: 'X12SA-FE-SLDI1:TRYB'
prefix: 'X12SA-FE-SL1:TRYB'
onFailure: raise
enabled: true
readoutPriority: baseline
@@ -83,7 +83,7 @@ sl1yt:
description: 'slit 1 (frontend) y top'
deviceClass: ophyd.EpicsMotor
deviceConfig:
prefix: 'X12SA-FE-SLDI1:TRYT'
prefix: 'X12SA-FE-SL1:TRYT'
onFailure: raise
enabled: true
readoutPriority: baseline

View File

@@ -40,7 +40,7 @@ class IDSCamera(PSIDeviceBase):
async_update={"type": "add", "max_shape": [None]},
)
USER_ACCESS = ["live_mode", "roi", "set_rect_roi", "get_last_image"]
USER_ACCESS = ["live_mode", "mask", "set_rect_roi", "get_last_image"]
def __init__(
self,
@@ -124,7 +124,7 @@ class IDSCamera(PSIDeviceBase):
if x < 0 or y < 0 or width <= 0 or height <= 0:
raise ValueError("ROI coordinates and dimensions must be positive integers.")
img_shape = (self.cam.cam.height.value, self.cam.cam.width.value)
if x + width > img_shape[0] or y + height > img_shape[1]:
if x + width > img_shape[1] or y + height > img_shape[0]:
raise ValueError("ROI exceeds camera dimensions.")
mask = np.zeros(img_shape, dtype=np.uint8)
mask[y : y + height, x : x + width] = 1