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.
save_recording_cursor(biosignal, ...)Save the recording for the cursor.
- abstractmethod close_event(event)[source]#
 Close the interface and stop necessary processes.
- Parameters:
 event (QCloseEvent)
- Return type:
 None
- abstractmethod initialize_ui_logic()[source]#
 Initialize the logic of the UI elements.
- 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
- save_recording_cursor(biosignal, biosignal_timings, ground_truth, ground_truth_timings, record_duration, use_as_classification, recording_label, task, movement, task_label_map, ground_truth_sampling_frequency, **kwargs)[source]#
 Save the recording for the cursor.
- 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 (cursor direction).
movement (str) – The movement associated with the cursor task label.
task_label_map (dict[str, int]) – String task to numerical table mapping.
ground_truth_sampling_frequency (int | float) – The sampling frequency of the ground truth data.
kwargs (dict) – Additional custom data to save.
- Return type:
 None