Debian Codegraph @

doc/gui.rst

raw
1 .. raw:: html
2
3 <style> .red {color:red} </style>
4 <style> .blue {color:blue} </style>
5 <style> .green {color:green} </style>
6 <style> .cyan {color:cyan} </style>
7 <style> .magenta {color:magenta} </style>
8 <style> .orange {color:orange} </style>
9 <style> .brown {color:brown} </style>
10
11 .. role:: red
12 .. role:: blue
13 .. role:: green
14 .. role:: cyan
15 .. role:: magenta
16 .. role:: orange
17 .. role:: brown
18
19 .. _gui:
20
21 ---
22 GUI
23 ---
24
25 With the GUI tool you can
26
27 * visualize channels
28 * compare channels from multiple files in the same plot
29 * see channel, conversion and source metadata as stored in the MDF file
30 * access library functionality for single files (convert, export, cut, filter, resample, scramble) and multiple files (concatenate, stack)
31
32 After you pip install asammdf using ``pip install asammdf[gui]`` there will be a new script called *asammdf.exe* in the `python_installation_folder\\Scripts` folder.
33
34 The following dependencies are required by the GUI
35
36 * PyQt5
37 * pyqtgraph
38
39
40 General shortcuts
41 =================
42
43 ============ ====================== ================================================================================================================
44 Shortcut Action Description
45 ============ ====================== ================================================================================================================
46 F1 Help Opens this online help page
47 F2 Create plot Create a new Plot window using the checked channels from the selection tree
48 F3 Create numeric Create a new Numeric window using the checked channels from the selection tree
49 F4 Create tabular Create a new Tabular window using the checked channels from the selection tree
50 F11 Toggle fullscreen In the single files mode will display the current opened file in full screen
51 Ctrl+O Open file(s)
52 ============ ====================== ================================================================================================================
53
54
55 Menu
56 ====
57
58 File
59 ----
60 The first menu command is *Open*. Depending on the mode this allows to open files individually or for batch processing.
61
62 The second menu command is *Open folder*. If this is selected then, starting with the selected root folder, all sub-folders are
63 searched recursively for MDF files.
64
65 Once a file has been opened, the user can load or save a display configuration using the *Open configuration* and *Save configuration*
66 menu items.
67
68
69 Mode
70 ----
71
72 * *Single files* : files are opened individually
73 * *Batch processing* : allows processing multiple files
74 * *Comparison* : show channels from all the opened files
75
76
77 Settings
78 --------
79
80 The following settings are available
81
82 * **Sub-windows**: controls if multiple subplots will be created when the plot button is pressed
83
84 * ``Disabled``: a single plot is used that is overwritten
85 * ``Enabled``: a new subplot is added
86
87 * **Link sub-windows X-axis**: controls the subplots are linked on the X axis (zooming will affect all sub-windows)
88
89 * ``Disabled``
90 * ``Enabled``
91
92 * **Ignore value2text conversions**: do not apply the value to text conversions
93
94 * ``Disabled``
95 * ``Enabled``
96
97 * **Plot background**: switch plot background color (does not affect existing plots)
98
99 * ``Black``
100 * ``White``
101
102 * **Plot X axis**: select how the X axis will be displayed
103
104 * ``seconds``
105 * ``time`` : values will be formatted as hours, minutes and seconds
106 * ``date`` : the values will use the measurement start datetime
107
108 * **Theme**: switch application theme
109
110 * ``Dark``
111 * ``Light``
112
113 * **Step mode**: controls how the signal samples are interconnected visually in the Plot
114
115 * **Integer interpolation**: selects the way integer channels are interpolated
116
117 * ``0 - repeat previous sample``
118 * ``1 - linear interpolation``
119 * ``2 - hybrid interpolation``
120
121 * **Float interpolation**: selects the way float channels are interpolated
122
123 * ``0 - repeat previous sample``
124 * ``1 - linear interpolation``
125
126
127 The settings are saved and restored each time the GUI is started.
128
129
130 Plot
131 ----
132
133 There are several keyboard shortcuts for handling the plots:
134
135 ============ ====================== ================================================================================================================
136 Shortcut Action Description
137 ============ ====================== ================================================================================================================
138 C Edit signal color Opens a dialog to select the signal color [7]_
139 F Fit all Y-axis fit all active channels on the screen, keeping the current X-axis range
140 Shift+F Fit selected Y-axis fit all active selected channels on the screen; unselected channels are not fitted
141 G Grid Toggle grid lines
142 W Home Whole signals XY-axis fit
143 H Honeywell zomm in on the current cursor position using a constant zoom level of 0.1s/cm (real display width)
144 I Zoom-in X-axis zoom-in [1]_
145 O Zoom-out X-axis zoom-out [1]_
146 X Zoom to range If the region is enabled, it will zoom to it
147 M Statistics Toggle the display of the statistic panel
148 R Range Display a movable range that will trigger the display of the delta values for all plot channels [2]_
149 S Stack all Y Stack all active channels so that they don't overlap, keeping the X-axis range
150 Shift+S Stack selected Y Stack all active selected channels so that they don't overlap; unselected channels are not stacked
151 Y Lock/unlock region Lock or unlock the left margin of the region
152 . Toggle dots Toggle the display of signal samples (using dots affects performance)
153 ← Move cursor left Moves the cursor to the next sample on the left
154 → Move cursor right Moves the cursor to the next sample on the right
155 Ins Insert computation Insert new channel in the plot using functions and operations
156 F11 Toggle full screen In the single files mode will display the current opened file in full screen
157 Alt+I Toggle trigger texts Toggle the text boxes for the triggers [6]_
158 Alt+R Raw samples Toggle raw samples mode for the selected channels [6]_
159 Alt+S Scaled samples Toggle scaled (physical) samples mode for the selected channels
160 Ctrl+B Bin Toggle binary representation of integer channels
161 Ctrl+H Hex Toggle hex representation of integer channels
162 Ctrl+I Insert cursor comment Insert a visual vertical line and comment at the current cursor position [6]_
163 Ctrl+P Physical Toggle physical representation of integer channels
164 Ctrl+R Edit color ranges Opens a dialog to edit the channel or channel group color ranges [7]_
165 Ctrl+G Edit Y axis scaling Opens a dialog to visually edit the Y axis ranges acoording to the expected signal values [7]_
166 Ctrl+S Save plot channels Save channels from current active subplot in a new MF4 file
167 Ctrl+Shift+S Save all channels Save all channels from all sub-windows in a new MF4 file
168 Shift+C Cascade sub-windows Cascade the sub plots
169 Shift+Alt+F Toggle frames Will toggle the sub plots MDI window frames
170 Shift+L Toggle channel list Will toggle the channel tree for the current opened file
171 Shift+T Tile sub-windows Tiles sub-windows in a grid
172 Shift+V Tile vertically Tiles sub-windows vertically [3]_
173 Shift+H Tile horizontally Tiles sub-windows horizontally [3]_
174 Shift+← Shift channels left Shifts the selected channels to the left in the time domain
175 Shift+→ Shift channels right Shifts the selected channels to the right in the time domain
176 Shift+↑ Shift channels up Shifts the selected channels to the up
177 Shift+↓ Shift channels down Shifts the selected channels to the down
178 ============ ====================== ================================================================================================================
179
180
181
182 Single files
183 ============
184 The *Single files* page is used to open several files individually for visualization and processing (for example exporting to csv or hdf5).
185
186 Layout elements
187 ---------------
188
189 .. image:: images/single_files.png
190
191 1. Opened files tabs
192 2. Channel tree display mode
193 3. Complete channels tree
194 4. Command buttons
195 5. Windows area
196 6. Numeric window
197 7. Plot window
198 8. Tabular window
199 9. File operations
200
201 1. Opened files tabs
202 ^^^^^^^^^^^^^^^^^^^^
203 In the single files mode, you can open multiple files in parallel. The tab names have the title set to the short file name, and the complete file path can be seen as
204 the tab tool-tip.
205
206 There is no restriction, so the same file can be opened several times.
207
208 2. Channel tree display mode
209 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210 The channel tree can be displayed in three ways
211
212 * as a naturally sorted list
213 * grouped using the internal file structure
214 * only the selected channels
215
216 3. Complete channels tree
217 ^^^^^^^^^^^^^^^^^^^^^^^^^
218 This tree contains all the channels found in the measurement.
219
220 Double clicking a channel name will display a pop-up window with the channel information (CNBLOCK, CCBLOCK and SIBLOCK/CEBLOCK)
221
222 .. image:: images/channel_info.png
223
224 Only the channels that are checked in the channels tree will be selected for plotting when the *Create window* button is pressed.
225 Checking or unchecking channels will not affect the current plot or sub-windows.
226
227 4. Command buttons
228 ^^^^^^^^^^^^^^^^^^
229 From left to right the buttons have the following functionality
230
231 * **Load configuration**: restores channels tree and all sub-plot windows from a saved configuration file
232 * **Save configuration**: saves all sub-windows (channels, colors, common axis and enable state) and channel tree
233 * **Select all channels**: checks all channels in the channels tree
234 * **Reset selection**: unchecks all channels in the channels tree
235 * **Advanced search & select**: will open an advanced search dialog
236
237 * the dialog can use wildcard and regex patterns
238 * multiple channels can be selected, and thus checked in the channels tree
239 * in the "Pattern based window" tab the user can define a pattern that will be used to filter out the channels from the
240 measurement file, and as a second filtering step some condition can be used based on the channels values. This information
241 will be saved in the window configuration. The pattern based windows can be easily recognized by the title bar icon
242 * the keyboard shortcut ``Ctrl+F`` can also be used to bring up the search dialog
243
244 .. image:: images/advanced_search.png
245
246 * **Create window**: generates a new window (Numeric, Plot, Tabular, GPS, CAN/LIN/FlexRay Bus Trace) based on the current checked channels from the channels tree.
247 If sub-windows are disabled in the settings then the current window is replaced by the new plot.
248 If sub-windows are enabled then a new sub-plot will be added, and the already existing sub-windows will not be affected.
249 The same channel can be used in multiple sub-windows.
250
251
252
253 5. Windows area
254 ^^^^^^^^^^^^^^^
255 If sub-windows are enabled then multiple plots can be used. The sub-windows can be re-arranged using drag & drop.
256
257 6. Numeric window
258 ^^^^^^^^^^^^^^^^^
259 Numeric windows can handle a lot more channels than plot windows. You can use
260 a numeric window to see the channel values at certain time stamps, and to search for certain channel values.
261
262 .. image:: images/numeric.png
263
264 1. display area: here we can see the instantaneous signal values. The raw and scaled values are shown for each signal.
265 Double clicking a column header will toggle the sorting on that column.
266 2. integer format: choose between physical, hex and binary format.
267 3. float decimals: choose the precision used for float display
268 4. timestamp selection: use the input box or the slider to adjust the timestamp
269 5. signal values search mode: choose between raw and scaled signal samples when searching for a certain value
270 6. signal name pattern: use a wildcard pattern to select the signals that will be used for value searching
271 7. operator: operator that will be used for the search
272 8. target value: search target value
273 9. direction: timebase direction for searching the values
274
275 Double clicking a row will bring up the range editor for associated signal.
276
277 .. image:: images/numeric_range_editor.gif
278
279 7. Plot window
280 ^^^^^^^^^^^^^^
281 Plot windows are used to graphically display the channel samples.
282
283 .. image:: images/plot.png
284
285 `pyqtgraph` is used for the plots; to get the best performance consider the following tips.
286
287 * limit the number of channels: plotting hundreds of channels can get really slow
288 * disabling dots will make the plots a lot more responsive
289
290 The Plot window has three section
291 1. signal selection tree
292 2. graphical area
293 3. signal statistics panel (toggled using the ``M`` keyboard shortcut)
294
295 Each signal item from the signal selection tree has five elements
296
297 1. display enable checkbox
298 2. color select button
299 3. channel name and unit label
300 4. channel value label [4]_
301 5. common axis checkbox
302 6. individual axis checkbox [5]_
303
304
305 The user can also create channel groups in the selection tree. Simple channel groups are only used for grouping signals. Pattern based channel groups
306 can be used to filter signals based on the name or samples values.
307
308 The selection tree has an extended context menu accessible using the right mouse click.
309
310 Double clicking an item will open a range editor dialog, similar to the Numeric window range editor.
311
312
313 The initial graphics are view will have all the signal homed-in (see the *H* keyboard shortcut). The user is free to use the mouse to interact with the graphics area (zoom, pan).
314
315 The cursor is toggled using the *C* keyboard shortcut, and with it the channel values will be displayed for each item in the *Selected channels list*.
316 The cursor can also be invoked by clicking the plot area.
317
318 Using the *R* keyboard shortcut will toggle the range, and with it the channel values will be displayed for each item in the *Selected channels list*. When the range is
319 enabled, using the *H* keyboard shortcut will not home to the whole time range, but instead will use the range time interval.
320
321 The *Ctrl+H*, *Ctrl+B* and *Ctrl+P* keyboard shortcuts will
322
323 * change the axis values for integer channels to hex, bin or physical mode
324 * change the channel value display mode for each integer channel item in the *Signal selection tree*
325
326 The *Alt+R* and *Alt+S* keyboard shortcuts will switch between the raw and scaled signal samples.
327
328 Each vertical axis width can be modified using the + and - buttons.
329
330
331 .. image:: images/plot.gif
332
333
334
335 You can insert new computed channels by pressing the *insert* key. This will allow either to compute basic operations using the plot channels, to
336 apply a function on one of the plot channels, or to specify a simple expression than uses multiple signals from the Plot window.
337
338 .. image:: images/compute_channel_dialog.png
339
340 The currently active plot's channels can be saved to a new file by pressing *Ctrl+S*.
341 The channels from all sub-windows can be saved to a new file by pressing *Ctrl+Shift+S*.
342
343 The sub-windows can be tiled as a grid, vertically or horizontally (see the keyboard shortcuts).
344
345
346 8. Tabular window
347 ^^^^^^^^^^^^^^^^^
348
349 The tabular window is very similar to an Excel/CSV sheet.
350 The most powerful feature of this window is that multiple filters can be defined for the signals values.
351
352
353 .. image:: images/tabular1.png
354 .. image:: images/tabular2.png
355
356
357 The tabular window has the following elements:
358
359 1. display area: here we can see the signal values. The raw and scaled values are shown for each signal.
360 Right clicking a column header will show a pop-up window for controlling the sorting, defining signal ranges and
361 adjusting the columns width.
362 2. integer format: choose between physical, hex and binary format.
363 3. float decimals: choose the precision used for float display
364 4. timestamp format: use the input box or the slider to adjust the timestamp display as float value or as
365 datetime value
366 5. remove prefix: remove column names prefix; avoids unnecessary large column widths
367 6. toggle filters view: toggle the visibility of the filters (better vertical space if filters are not used)
368 7. filter enable
369 8. filter logical relation
370 9. filtering signal
371 10. filter operator
372 11. target value for filtering
373 12. apply filters: the actual filtering is done only after pressing the button.
374 The user can modify the existing filters without changing the tabular view.
375 13. query: the Tabular window used a pandas dataframe as backend. The filtering is
376 done by performing a query on the dataframe.
377
378
379 9. File operations
380 ^^^^^^^^^^^^^^^^^^
381 There are five aspects related to the measurement file that can be accessed using the tabs:
382
383 1. channels: here the user can visualize the signals using the available window types
384 2. modify & export: this tab contains the tools needed for processing the measurement file.
385 The use can filter signals, cut and resample the measurement, or export it to other file formats.
386 3. bus logging: this tab is only visible for the measurements that contain CAN or LIN bus logging.
387 The user can decode the raw bus logging using database files (.dbc, .ldf, .arxml)
388 4. attachments: this tab is only visible if the measurement contains attachments.
389 The user can extract the attachment and save it to a new file.
390 5. info: this tab contains an overview of the measurement file content (channel groups, file header comments, total number of channels)
391
392
393
394 10. CAN/LIN/FlexRay Bus Trace
395 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
396 This window types can only be created by pressing the ``Create window`` button. If the measurement
397 does not contain bus logging of the selected kind, then no window will be generated.
398
399 The filtering and signal ranges definition is done similar to the Tabular window.
400
401 11. Drag & Drop
402 ^^^^^^^^^^^^^^^
403 Channels can be dragged and dropped between sub-windows for easier configuration. Drag and drop in the free MDI can be used to create new windows.
404
405 .. image:: images/drag_and_drop.gif
406
407 Batch processing
408 ================
409 The *Batch processing* view is used to concatenate or stack multiple files, or to perform the same processing steps on multiple files.
410 Keep in mind that the order of the input files is always preserved, only the samples timestamps are influenced by the ``Sync using measurements timestamps`` checkbox.
411
412 .. image:: images/multiple_files.png
413
414 #. file list
415 #. file list sorting buttons
416 #. batch operations
417
418 a. concatenate requires input files with matching internal structure (same number of channel groups and the same set of channels in each n-th group). Each signal in the output file
419 will be the result of concatenation of the samples from the input files
420 b. modify & export: similar to the single files view
421 c. stack will create a single measurement that will contain all the channel groups from the input files. Identically named channels will not be concatenated, they will just appear
422 multiple times in the output file
423 d. bus logging: similar to the single files view
424
425 The files list can be rearranged in the list (1) by drag and dropping lines. Unwanted files can be deleted by
426 selecting them and pressing the *DEL* key. The files order is considered from top to bottom.
427
428 Comparison
429 ==========
430 Use *CTRL+F* to search channels from all the opened files. The channel names are prefixed
431 with the measurement index.
432
433 .. rubric:: Footnotes
434
435 .. [1] If the cursor is present then zooming will center on it.
436 .. [2] Clicking the plot will move the left margin of the region. Pressing CTRL while clicking the plot will move the right margin of the region.
437 .. [3] New in *asammdf 5.7.0*
438 .. [4] the value is only displayed if the cursor or range are active. For the cursor is will show the current value, and for the range it will show the value delta between the range start and stop timestamps
439 .. [5] New in *asammdf 5.7.0*
440 .. [6] New in *asammdf 5.20.0*
441 .. [7] New in *asammdf 7.1.0*
442
443
444