1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-05-06 23:04:19 +02:00

feat: add PositionerControlLine

This commit is contained in:
2024-08-08 14:34:46 +02:00
parent a50d9c7b3f
commit c80a7cd108
8 changed files with 372 additions and 13 deletions
+22 -10
View File
@@ -24,6 +24,7 @@ class Widgets(str, enum.Enum):
DeviceComboBox = "DeviceComboBox"
DeviceLineEdit = "DeviceLineEdit"
PositionerBox = "PositionerBox"
PositionerControlLine = "PositionerControlLine"
RingProgressBar = "RingProgressBar"
ScanControl = "ScanControl"
StopButton = "StopButton"
@@ -488,7 +489,7 @@ class BECFigure(RPCBase):
col: "int | None" = None,
dap: "str | None" = None,
config: "dict | None" = None,
**axis_kwargs,
**axis_kwargs
) -> "BECWaveform":
"""
Add a 1D waveform plot to the figure. Always access the first waveform widget in the figure.
@@ -530,7 +531,7 @@ class BECFigure(RPCBase):
row: "int | None" = None,
col: "int | None" = None,
config: "dict | None" = None,
**axis_kwargs,
**axis_kwargs
) -> "BECImageShow":
"""
Add an image to the figure. Always access the first image widget in the figure.
@@ -560,7 +561,7 @@ class BECFigure(RPCBase):
row: "int | None" = None,
col: "int | None" = None,
config: "dict | None" = None,
**axis_kwargs,
**axis_kwargs
) -> "BECMotorMap":
"""
Add a motor map to the figure. Always access the first motor map widget in the figure.
@@ -831,7 +832,7 @@ class BECImageShow(RPCBase):
downsample: "Optional[bool]" = True,
opacity: "Optional[float]" = 1.0,
vrange: "Optional[tuple[int, int]]" = None,
**kwargs,
**kwargs
) -> "BECImageItem":
"""
Add an image to the figure. Always access the first image widget in the figure.
@@ -857,7 +858,7 @@ class BECImageShow(RPCBase):
downsample: "Optional[bool]" = True,
opacity: "Optional[float]" = 1.0,
vrange: "Optional[tuple[int, int]]" = None,
**kwargs,
**kwargs
):
"""
None
@@ -1146,7 +1147,7 @@ class BECImageWidget(RPCBase):
downsample: "Optional[bool]" = True,
opacity: "Optional[float]" = 1.0,
vrange: "Optional[tuple[int, int]]" = None,
**kwargs,
**kwargs
) -> "BECImageItem":
"""
None
@@ -1729,7 +1730,7 @@ class BECWaveform(RPCBase):
label: "str | None" = None,
validate: "bool" = True,
dap: "str | None" = None,
**kwargs,
**kwargs
) -> "BECCurve":
"""
Plot a curve to the plot widget.
@@ -1768,7 +1769,7 @@ class BECWaveform(RPCBase):
color: "Optional[str]" = None,
dap: "str" = "GaussianModel",
validate_bec: "bool" = True,
**kwargs,
**kwargs
) -> "BECCurve":
"""
Add LMFIT dap model curve to the plot widget.
@@ -2043,7 +2044,7 @@ class BECWaveformWidget(RPCBase):
label: "str | None" = None,
validate: "bool" = True,
dap: "str | None" = None,
**kwargs,
**kwargs
) -> "BECCurve":
"""
Plot a curve to the plot widget.
@@ -2077,7 +2078,7 @@ class BECWaveformWidget(RPCBase):
color: "str | None" = None,
dap: "str" = "GaussianModel",
validate_bec: "bool" = True,
**kwargs,
**kwargs
) -> "BECCurve":
"""
Add LMFIT dap model curve to the plot widget.
@@ -2352,6 +2353,17 @@ class PositionerBox(RPCBase):
"""
class PositionerControlLine(RPCBase):
@rpc_call
def set_positioner(self, positioner: str):
"""
Set the device
Args:
positioner (Positioner | str) : Positioner to set, accepts str or the device
"""
class Ring(RPCBase):
@rpc_call
def _get_all_rpc(self) -> "dict":