diff --git a/bec_widgets/cli/client.py b/bec_widgets/cli/client.py index 8dcb29d3..d5d36267 100644 --- a/bec_widgets/cli/client.py +++ b/bec_widgets/cli/client.py @@ -5372,13 +5372,6 @@ class ScatterWaveform(RPCBase): Take a screenshot of the dock area and save it to a file. """ - @property - @rpc_call - def main_curve(self) -> "ScatterCurve": - """ - The main scatter curve item. - """ - @property @rpc_call def color_map(self) -> "str": diff --git a/bec_widgets/widgets/plots/scatter_waveform/scatter_waveform.py b/bec_widgets/widgets/plots/scatter_waveform/scatter_waveform.py index 05278c18..48a20f14 100644 --- a/bec_widgets/widgets/plots/scatter_waveform/scatter_waveform.py +++ b/bec_widgets/widgets/plots/scatter_waveform/scatter_waveform.py @@ -1,7 +1,5 @@ from __future__ import annotations -import json - import pyqtgraph as pg from bec_lib import bec_logger from bec_lib.endpoints import MessageEndpoints @@ -45,7 +43,6 @@ class ScatterWaveform(PlotBase): USER_ACCESS = [ *PlotBase.USER_ACCESS, # Scatter Waveform Specific RPC Access - "main_curve", "color_map", "color_map.setter", "plot", @@ -205,27 +202,6 @@ class ScatterWaveform(PlotBase): except ValidationError: return - @SafeProperty(str, designable=False, popup_error=True) - def curve_json(self) -> str: - """ - Get the curve configuration as a JSON string. - """ - return json.dumps(self.main_curve.config.model_dump(), indent=2) - - @curve_json.setter - def curve_json(self, value: str): - """ - Set the curve configuration from a JSON string. - - Args: - value(str): The JSON string to set the curve configuration from. - """ - try: - config = ScatterCurveConfig(**json.loads(value)) - self._add_main_scatter_curve(config) - except json.JSONDecodeError as e: - logger.error(f"Failed to decode JSON: {e}") - ################################################################################ # High Level methods for API ################################################################################ diff --git a/tests/end-2-end/test_plotting_framework_e2e.py b/tests/end-2-end/test_plotting_framework_e2e.py index f453f627..eddbbf29 100644 --- a/tests/end-2-end/test_plotting_framework_e2e.py +++ b/tests/end-2-end/test_plotting_framework_e2e.py @@ -44,11 +44,7 @@ def test_rpc_plotting_shortcuts_init_configs(qtbot, connected_client_gui_obj): im.image(monitor="eiger") mm.map(x_name="samx", y_name="samy") - sw.plot(x_name="samx", y_name="samy", z_name="bpm4i") - assert sw.main_curve.object_name == "bpm4i_bpm4i" - # Create a new curve on the scatter waveform should replace the old one sw.plot(x_name="samx", y_name="samy", z_name="bpm4a") - assert sw.main_curve.object_name == "bpm4a_bpm4a" mw.plot(monitor="waveform") # Adding multiple custom curves sho diff --git a/tests/unit_tests/test_scatter_waveform.py b/tests/unit_tests/test_scatter_waveform.py index 9abb01b0..f0ba5620 100644 --- a/tests/unit_tests/test_scatter_waveform.py +++ b/tests/unit_tests/test_scatter_waveform.py @@ -49,28 +49,6 @@ def test_scatter_waveform_color_map(qtbot, mocked_client): assert swf.color_map == "plasma" -def test_scatter_waveform_curve_json(qtbot, mocked_client): - swf = create_widget(qtbot, ScatterWaveform, client=mocked_client) - - # Add a device-based scatter curve - swf.plot(x_name="samx", y_name="samy", z_name="bpm4i", label="test_curve") - - json_str = swf.curve_json - data = json.loads(json_str) - assert isinstance(data, dict) - assert data["label"] == "test_curve" - assert data["x_device"]["name"] == "samx" - assert data["y_device"]["name"] == "samy" - assert data["z_device"]["name"] == "bpm4i" - - # Clear and reload from JSON - swf.clear_all() - assert swf.main_curve.getData() == (None, None) - - swf.curve_json = json_str - assert swf.main_curve.config.label == "test_curve" - - def test_scatter_waveform_update_with_scan_history(qtbot, mocked_client, monkeypatch): swf = create_widget(qtbot, ScatterWaveform, client=mocked_client)