Hi @biosbob -
1. Joulescope UI state
Let’s start with how the Joulescope UI stores state. The Joulescope UI stores state for each widget in each view on exit. The file is {userappdir}/joulescope/config/joulescope_ui_config.json
. It also keeps historical settings in {userappdir}/joulescope/config/joulescope_ui_config.ZZZ.json
.
Note that {userappdir}
depends on the OS. The easiest way to find it is to select Help → View logs… in the Joulescope UI. Go up one directory and select the config
directory.,
The Joulescope UI maintains state for JLS viewer mode separately. These are joulescope_ui_file_config.json
and joulescope_ui_file_config.ZZZ.json
.
You could edit these configuration files outside of the Joulescope UI to control your Joulescope UI experience. We definitely do not support this though 
The JLS file also has some settings that get applied when you load it in the UI, as we discussed in Default view when loading a pre-generated jls file
2. Editing State
In the Joulescope UI, you can explore and edit nearly all state with the Settings widget. Note the tabs for Settings
, Colors
, Fonts
, and Defines
. Under the Widgets
hierarchy, you can find the defaults for the Widget type and the specific settings for each of those Widgets in the current view. Widgets can provide other ways to manipulate this state, such as dedicated UI buttons.
Note that when you close a widget, you lose any settings changes for that widget. Adding a new widget of the same type starts with the defaults for that widget type. If you want to maintain different widget settings, you can add more views.
3. Programmatic Control
I am not entirely sure what you mean by this. The Joulescope UI does not have any scripting or automation tools today. I am thinking about adding a TCP/IP interface for both testing purposes and automation purposes. Today, you can add a plugin or modify the UI source code.
The UI uses Publish-Subscribe internally, and the application state discussed above lives as retained values in the PubSub instance. The PubSub instance is responsible for saving and restoring this state.
You can also explore the full PubSub mechanism. In the Settings widget, select UI and activate developer. You can add the Publish Spy and PubSub Explorer widgets to your view.
Since the Joulescope UI 1.0 and newer is all-in on PubSub and the command pattern, you can do everything programmatically that you can do with human UI interaction.
4. Waveform widget
The Waveform widget is complicated. I would love to have a bunch of free time to refactor the graphics presentation away from the Joulescope-y stuff to try to simplify this complexity, but that is not happening anytime soon. The widget has multiple modes of operation:
- Live streaming
- Paused viewing the capture buffer
- Viewing a JLS file from within a “normal” UI instance
- Viewing a JLS file form within a JLS “viewer” UI instance.
Due to the complexity, I am very reluctant to add significant new Waveform widget features unless they are broadly useful.
If I recall, I think your end goal is to capture Joulescope data using automation. You then analyze and display the results in another tool you create. Have you reached the limit where the Joulescope UI is really not the right tool?
5. Batch mode
Are you saying that you just want to convert a JLS file to a plot that you save as a PNG? Have you taken a look at the plot
entry point for pyjls? It can generate an image programmatically using Matplotlib. We have not spent any time making this nice. It does not support annotations, either.