Data viewer#
The JavaScope is used to observe log data during operation of the UltraZohm. In addition, log files can be created which can be further analyzed.
Fig. Fig. 75 shows logging the lifecheck signal of the UltraZohm. Two options are available to further analyze this log file:
Matlab Data Inspector#
To open the log file, open Matlab and navigate to ultrazohm_sw/javascope
.
Make sure that this is the current working directory for Matlab.
Call the script JS_plot_data.m
.
The script opens the latest log that is present in ultrazohm_sw/javascope
in the Matlab Data Inspector.
The read data is also available in the Matlab workspace for further processing.
To load a specific log file, set the file name accordingly, like so:
file_name = Logfile_list(logfile_list_index).name
paste file name here if you want to open a specific file
file_name = 'Log_2024-03-11_99-99-99.csv';
Additional settings, such as converting the log file to .mat
for further usage in Matlab can be set:
%% settings
delete_empty_log_files = 0;
save_all_logged_data = 0;
plot_all_channels = 0;
rename_channels_manually = 0;
import_data_to_simulink_datainspector = 1;
overwrite_data_in_simulink_datainspector = 1;
Python Data Viewer#
Note
The Python Data Viewer works out of the box inside the VS Code Remote Container. If the remote container is not used, the dependencies of ultrazohm_sw/docs
are required on the system.
The following steps start the python based data viewer:
Open a terminal and navigate to
ultrazohm_sw/javascope
Call the dataviewer like so
python dataviewer.py
Open the web page of the data viewer
Upload the log file that you want to inspect. Note that the data is only uploaded to your local machine since the dash app runs on a local server. I.e., all data is only present on your hard drive.
Inspect the log file
Data format#
The python based data viewer can read .csv
and .parquet
(which stores the logs more efficient, i.e., with less disc space).
Call convert_csv_to_parquet.py
to convert all logs present in the directory to parquet data format, like so
python convert_csv_to_parquet.py