mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
fix(plots/motor_map): user can get data as dict from BECMotorMap
This commit is contained in:
@ -1,9 +1,8 @@
|
||||
# This file was automatically generated by generate_cli.py
|
||||
|
||||
from bec_widgets.cli.client_utils import rpc_call, RPCBase, BECFigureClientMixin
|
||||
from typing import Literal, Optional, overload
|
||||
|
||||
from bec_widgets.cli.client_utils import BECFigureClientMixin, RPCBase, rpc_call
|
||||
|
||||
|
||||
class BECPlotBase(RPCBase):
|
||||
@property
|
||||
@ -1234,3 +1233,11 @@ class BECMotorMap(RPCBase):
|
||||
Args:
|
||||
scatter_size(int): Size of the scatter points.
|
||||
"""
|
||||
|
||||
@rpc_call
|
||||
def get_data(self) -> "dict":
|
||||
"""
|
||||
Get the data of the motor map.
|
||||
Returns:
|
||||
dict: Data of the motor map.
|
||||
"""
|
||||
|
@ -43,6 +43,7 @@ class BECMotorMap(BECPlotBase):
|
||||
"set_num_dim_points",
|
||||
"set_background_value",
|
||||
"set_scatter_size",
|
||||
"get_data",
|
||||
]
|
||||
|
||||
# QT Signals
|
||||
@ -128,6 +129,18 @@ class BECMotorMap(BECPlotBase):
|
||||
# Redraw the motor map
|
||||
self._make_motor_map()
|
||||
|
||||
def get_data(self) -> dict:
|
||||
"""
|
||||
Get the data of the motor map.
|
||||
Returns:
|
||||
dict: Data of the motor map.
|
||||
"""
|
||||
data = {
|
||||
"x": self.database_buffer["x"],
|
||||
"y": self.database_buffer["y"],
|
||||
}
|
||||
return data
|
||||
|
||||
# TODO setup all visual properties
|
||||
def set_max_points(self, max_points: int) -> None:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user