RecordingInterfaceTemplate#
- class myogestic.gui.widgets.templates.RecordingInterfaceTemplate(main_window, name='RecordingUI', ui=None, incoming_message_signal=None, ground_truth__nr_of_recording_values=-1, ground_truth__task_map=None)[source]#
Base class for the recording interface of a visual interface.
This class contains the logic and the UI elements of the recording interface of a visual interface.
- Parameters:
- _main_window#
The _main_window widget of the visual interface.
- Type:
Optional[QObject]
- incoming_message_signal#
The incoming message signal of the visual interface.
- Type:
PySide6.QtCore.SignalInstance
- ground_truth__nr_of_recording_values#
The number of recording values the visual interface sends to MyoGestic.
- Type:
- ground_truth__task_map#
The task map. The keys are the task names and the values are the task indices.
Methods
__init__
(main_window[, name, ui, ...])_set_progress_bar
(progress_bar, value, total)Set the value of a progress bar.
close_event
(event)Close the interface and stop necessary processes.
disable
()Disable all UI elements.
enable
()Enable all UI elements.
Initialize the logic of the UI elements.
save_recording
(biosignal, biosignal_timings, ...)Save the recording.
- abstract close_event(event)[source]#
Close the interface and stop necessary processes.
- Parameters:
event (QCloseEvent)
- Return type:
None
- save_recording(biosignal, biosignal_timings, ground_truth, ground_truth_timings, record_duration, use_as_classification, recording_label, task, ground_truth_sampling_frequency, **kwargs)[source]#
Save the recording.
- Parameters:
biosignal (numpy.ndarray) – The recorded biosignal data.
biosignal_timings (numpy.ndarray) – The recorded biosignal timings.
ground_truth (numpy.ndarray) – The recorded ground truth data.
ground_truth_timings (numpy.ndarray) – The recorded ground truth timings.
record_duration (int | float) – The duration of the recording in seconds.
use_as_classification (bool) – Whether to use the recording as classification data.
recording_label (str) – The label of the recording.
task (str) – The task of the recording.
ground_truth_sampling_frequency (int | float) – The sampling frequency of the ground truth data.
kwargs (dict) – Additional custom data to save.
- Return type:
None