Default view when loading a pre-generated jls file

in general, whenever i load a .jls file into the GUI the view always shows “current and voltage” with “fill 2” selected… where/how can i change this to show “current” and “none” by default???

or, is there a way to control the viewing options within the .jls file itself – which i happen to be generating programmatically???

Hi @biosbob - yes, but this is definitely not well-documented. You need to add a JSON-formatted user_data with metadata value 0x400. The metadata then updates the plot data structure. This should allow you to enable and disable chennels as you desire. The plot data structure is here. I think that you are interested in the enabled key.

I do not see a way to set the min/max fill from this data structure today. We could certainly add it.

can i put this in the same .jls file as my signal??? when i save a capture within the GUI it writes a 2nd annotation .jls with this user_data… i’ve been using pyjls info -v to inspect, but i have seen stuff like the marker annotations associated with a signal…

Hi @biosbob - You are correct that the Joulescope UI normally saves annotations as {filename}.anno.jls separately from the sample data {filename}.jls.

However, annotations and user_data are two different things. annotations are attached to a signal. user_data is independent of all signals and sources. However, the annotation loader injects these user_data items into the annotation stream that it provides to the Waveform widget.

The UI does load user_data from the {filename.jls, but it looks like it only cares about notes. We would have to modify this to also support the plot metadata.

See Controlling the GUI programmatically -- can/cannot - #6 by mliberty