0
0
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:
2024-04-15 17:42:54 +02:00
parent c2c583fce6
commit c12f2cee80
2 changed files with 22 additions and 2 deletions

View File

@ -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.
"""

View File

@ -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:
"""