Skip to content

GUI RPC Interface

This page lists common GUI RPC objects and methods used from the BEC IPython client.

Common objects

Object Purpose
gui GUI client entry point.
gui.bec Default BECDockArea RPC reference.
gui.available_widgets Widget classes available for remote creation.
gui.bec.Waveform Dynamic reference to a Waveform in the Dock Area.

GUI client

API Use
gui.show() Show the GUI.
gui.hide() Hide the GUI.
gui.raise_window() Bring the GUI window to the front.
gui.new(...) Create a top-level GUI widget or window.
gui.windows Access known GUI windows.
gui.window_list List available windows.
gui.available_widgets Inspect creatable widget classes.

Dock area

API Use
gui.bec.new(gui.available_widgets.Waveform) Add a widget to the Dock Area.
gui.bec.widget_map Inspect named widgets in the Dock Area.
gui.bec.widget_list List widgets in the Dock Area.
gui.bec.load_profile("alignment_cli") Load a profile.
gui.bec.load_profile("alignment_cli", restore_baseline=True) Restore the runtime copy from baseline, then load the profile.
gui.bec.save_profile("alignment_cli") Save the current layout.
gui.bec.restore_baseline_profile("alignment_cli", show_dialog=False) Restore a profile from its baseline without a confirmation dialog.
gui.bec.delete_profile("name") Delete a local profile.

Waveform

API Use
wf.plot(device_x=dev.samx, device_y=dev.bpm4i) Plot device data.
wf.plot(..., dap="GaussianModel") Plot data and attach a DAP model.
wf.add_dap_curve(device_label="bpm4i-bpm4i", dap_name="GaussianModel") Add a DAP curve to an existing source curve.
wf.get_dap_params() Read DAP model parameters.
wf.get_dap_summary() Read DAP output summaries.
wf.get_curve(0) Access a curve by index or label.
wf.get_all_data() Read all plotted curve data.
wf.clear_all() Remove all curves.
wf.x_mode Get or set the x-axis mode.
wf.signal_x Get or set the x-axis signal name.

Common patterns

Create a Waveform and plot a device:

wf = gui.bec.new(gui.available_widgets.Waveform)
wf.plot(device_x=dev.samx, device_y=dev.bpm4i)

Load a prepared profile and update the Waveform:

gui.bec.load_profile("alignment_cli")
wf = gui.bec.Waveform
wf.clear_all()
wf.plot(device_x=dev.samx, device_y=dev.bpm4i, dap="GaussianModel")

Restore a shipped baseline profile from a script:

gui.bec.load_profile("alignment_cli", restore_baseline=True)