Plotting and Data Analysis from the BEC IPython Client¶
Use these guides when you want to plot live data, inspect scan history, fit curves with DAP, or combine BEC Widgets with ordinary Python analysis from the BEC IPython client.
If you are new to the gui object, read RPC GUI Control for the
underlying command model. To create and switch Dock Area profiles from commands, use
Create Dock Area Profiles from the BEC IPython Client.
Choose the right task¶
| Situation | Use this guide | What it gives you |
|---|---|---|
| You want to add a widget to the Dock Area before plotting. | Add Widgets to a Dock Area | Creates widgets and controls their dock placement from BEC IPython commands. |
| You want to plot live device data or style Waveform curves. | Control a Waveform from the IPython Client | Creates and configures Waveform plots from BEC IPython commands. |
| You want to attach DAP models to plotted data. | Fit Waveform Data with DAP | Adds one or more DAP model curves and reads fit parameters. |
| You want to inspect data from an already completed scan. | Access History with a Waveform | Plots history data in Waveform or reads raw values from bec.history. |
| You tried useful commands interactively and want to reuse them. | Script GUI Interactions | Turns plotting and light analysis steps into a small Python function. |
| You need predictable data for plotting or DAP examples. | Use Simulated Models from the IPython Client | Configures simulated device output before plotting it. |
Common plotting workflow¶
Most command-line plotting work follows this order:
- Configure a real or simulated device signal.
- Add a widget to the Dock Area when the layout does not already contain the widget you need.
- Plot live data in a Waveform.
- Add a DAP curve when you need a fitted model.
- Inspect scan history when you need to compare with previous scans.
- Read plotted data back from the Waveform with
wf.get_all_data()for quick checks or small transformations. - Move repeated commands into a small script only after the interactive workflow is useful.
Learning material¶
- RPC GUI Control explains how GUI command objects work.
- GUI RPC Interface lists common exposed methods.