view module¶
This module contains the main GUI window and a class for each device implementing respective the tab.
Each device-widget must implement the following functions to be compatible with the sampling loop of multilog :
def set_initialization_data(self, sampling: Any) -> None
set_measurement_data(self, rel_time: list, meas_data: Any) -> None
MainWindow¶
- class multilog.view.main_window.MainWindow(start_function, exit_function, parent=None)¶
Bases:
QMainWindowmultilog’s main window.
- __init__(start_function, exit_function, parent=None)¶
Initialize main window.
- Parameters:
start_function (func) – function to-be-connected to start button
exit_function (func) – function to-be-connected to exit button
- add_tab(tab_widget, tab_name)¶
Add device tab to the main layout.
- Parameters:
tab_widget (QWidget) – widget to-be added
tab_name (str) – name of the tab
- btn_exit_click()¶
- btn_start_click()¶
- set_current_time(current_time)¶
- set_output_directory(output_directory)¶
- set_start_time(start_time)¶
Base classes¶
- class multilog.view.base_classes.ImageWidget(parent=None)¶
Bases:
QSplitterBase class for devices displaying an image.
- set_cmap(cmap_name='turbo')¶
Set color map for the image (if data is 2D heatmap)
- set_image(data)¶
Set an image to be displayed.
- Parameters:
data (numpy.array) – image
- class multilog.view.base_classes.LineEdit(parent=None)¶
Bases:
QLineEditModified of QLineEdit: red color if modified and not saved.
- focusInEvent(self, a0: QFocusEvent | None)¶
- mousePressEvent(self, a0: QMouseEvent | None)¶
- class multilog.view.base_classes.PlotWidget(sensors, parameter='Temperature', unit='°C', parent=None)¶
Bases:
QSplitterBase class for devices displaying a 2D plot.
- __init__(sensors, parameter='Temperature', unit='°C', parent=None)¶
Setup plot widget tab.
- Parameters:
sensors (list) – list of sensors
parameter (str, optional) – name of visualized parameter. Defaults to “Temperature”.
unit (str, optional) – unit of visualized parameter. Defaults to “°C”.
- calc_x2_ticks()¶
Not implemented. Intended to be used for a datetime axis.
- edit_x_max_changed()¶
- edit_x_min_changed()¶
- edit_y_max_changed()¶
- edit_y_min_changed()¶
- set_data(sensor, x, y)¶
Set data for selected sensor in plot.
- Parameters:
sensor (str) – name of the sensor
x (list) – x values
y (list) – y values
- set_label(sensor, val)¶
Set the label with current measurement value
- Parameters:
sensor (str) – name of the sensor
val (str/float) – measurement value
- update_autoscale_x()¶
- update_autoscale_y()¶
Daq6510Widget¶
- class multilog.view.daq6510.Daq6510Widget(daq: Daq6510, parent=None)¶
Bases:
QWidget- __init__(daq: Daq6510, parent=None)¶
GUI widget of Kethley DAQ6510 multimeter.
- Parameters:
daq (Daq6510) – Daq6510 device including configuration information.
- set_initialization_data(sampling)¶
Update labels with sampling data (used before recording is started).
- Parameters:
sampling (dict) – {sensor name: value}
- set_measurement_data(rel_time, meas_data)¶
Update plot and labels with measurement data (used after recording was started).
- Parameters:
rel_time (list) – relative time of measurement data.
meas_data (dict) – {sensor name: measurement time series}
IfmFlowmeterWidget¶
- class multilog.view.ifm_flowmeter.IfmFlowmeterWidget(flowmeter: IfmFlowmeter, parent=None)¶
Bases:
QWidget- __init__(flowmeter: IfmFlowmeter, parent=None)¶
GUI widget of IFM flowmeter.
- Parameters:
flowmeter (IfmFlowmeter) – IfmFlowmeter device including configuration information.
- set_initialization_data(sampling)¶
Update labels with sampling data (used before recording is started).
- Parameters:
sampling (dict) –
{ “Flow”: {sensor name: value}, “Temperature”: {sensor name: value},
} –
- set_measurement_data(rel_time, meas_data)¶
Update plot and labels with measurement data (used after recording was started).
- Parameters:
rel_time (list) – relative time of measurement data.
meas_data (dict) –
{ “Flow”: {sensor name: measurement time series}, “Temperature”: {sensor name: measurement time series},
} –
EurothermWidget¶
- class multilog.view.eurotherm.EurothermWidget(eurotherm: Eurotherm, parent=None)¶
Bases:
QWidget- __init__(eurotherm: Eurotherm, parent=None)¶
GUI widget of Eurotherm controller.
- Parameters:
flowmeter (Eurotherm) – Eurotherm device including configuration information.
- set_initialization_data(sampling)¶
Update labels with sampling data (used before recording is started).
- Parameters:
sampling (dict) – {sampling name: value}
- set_measurement_data(rel_time, meas_data)¶
Update plot and labels with measurement data (used after recording was started).
- Parameters:
rel_time (list) – relative time of measurement data.
meas_data (dict) – {sampling name: measurement time series}
OptrisIP640Widget¶
- class multilog.view.optris_ip640.OptrisIP640Widget(optris_ip_640: OptrisIP640, parent=None)¶
Bases:
ImageWidget- __init__(optris_ip_640: OptrisIP640, parent=None)¶
GUI widget of Optirs Ip640 IR camera.
- Parameters:
optris_ip_640 (OptrisIP640) – OptrisIP640 device including configuration information.
- set_initialization_data(sampling)¶
Update image with sampling data (used before recording is started) using a grayscale colormap.
- Parameters:
sampling (np.array) – IR image.
- set_measurement_data(rel_time, meas_data)¶
Update plot and labels with measurement data (used after recording was started) using turbo colormap.
- Parameters:
rel_time (list) – relative time of measurement data. Unused.
meas_data (np.array) – IR image.
PyrometerLumasenseWidget¶
- class multilog.view.pyrometer_lumasense.PyrometerLumasenseWidget(pyrometer: PyrometerLumasense, parent=None)¶
Bases:
PlotWidget- __init__(pyrometer: PyrometerLumasense, parent=None)¶
GUI widget of Lumasense pyrometer.
- Parameters:
pyrometer (PyrometerLumasense) – PyrometerLumasense device including configuration information.
- adjust_e()¶
- adjust_t()¶
- set_initialization_data(sampling)¶
Update label with sampling data (used before recording is started).
- Parameters:
sampling (float) – temperature value
- set_measurement_data(rel_time, meas_data)¶
Update plot and labels with measurement data (used after recording was started).
- Parameters:
rel_time (list) – relative time of measurement data.
meas_data (list) – measurement time series
PyrometerArrayLumasenseWidget¶
- class multilog.view.pyrometer_array_lumasense.PyrometerArrayLumasenseWidget(pyrometer_array: PyrometerArrayLumasense, parent=None)¶
Bases:
PlotWidget- __init__(pyrometer_array: PyrometerArrayLumasense, parent=None)¶
GUI widget of Lumasense pyrometer array.
- Parameters:
pyrometer_array (PyrometerArrayLumasense) – PyrometerArrayLumasense device including configuration information.
- adjust_e(line_edit_e, headNr)¶
- set_initialization_data(sampling)¶
Update labels with sampling data (used before recording is started).
- Parameters:
sampling (dict) – {head name: temperature}
- set_measurement_data(rel_time, meas_data)¶
Update plot and labels with measurement data (used after recording was started).
- Parameters:
rel_time (list) – relative time of measurement data.
meas_data (dict) – {heat name: measurement time series}
BaslerCameraWidget¶
- class multilog.view.basler_camera.BaslerCameraWidget(basler_camera: BaslerCamera, parent=None)¶
Bases:
ImageWidget- __init__(basler_camera: BaslerCamera, parent=None)¶
GUI widget of Basler optical camera.
- Parameters:
basler_camera (BaslerCamera) – BaslerCamera device including configuration information.
- set_initialization_data(sampling)¶
Update image with sampling data (used before recording is started).
- Parameters:
sampling (np.array) – image.
- set_measurement_data(rel_time, meas_data)¶
Update plot and labels with measurement data (used after recording was started).
- Parameters:
rel_time (list) – relative time of measurement data. Unused.
meas_data (np.array) – image.
ProcessConditionLoggerWidget¶
- class multilog.view.process_condition_logger.ProcessConditionLoggerWidget(process_logger: ProcessConditionLogger, parent=None)¶
Bases:
QWidget- __init__(process_logger: ProcessConditionLogger, parent=None)¶
GUI widget for logging of process conditions.
- Parameters:
process_logger (ProcessConditionLogger) – ProcessConditionLogger device including configuration information.
- set_initialization_data(sampling)¶
This function exists to conform with the main sampling loop. It’s empty because no data needs to be visualized.
- set_measurement_data(rel_time, meas_data)¶
This function exists to conform with the main sampling loop. It’s empty because no data needs to be visualized.
- update_combo_condition(condition_name)¶
This is called if the index of an input box was changed by the user. The data in the ProcessConditionLogger is updated.
- Parameters:
condition_name (str) – name of the changed process
- update_text_condition(condition_name)¶
This is called if the text of an input filed was changed by the user. The data in the ProcessConditionLogger is updated.
- Parameters:
condition_name (str) – name of the changed process