RecordProtocol#
- class myogestic.gui.protocols.RecordProtocol(main_window)[source]#
Protocol for recording EMG and kinematics data.
This class provides methods for recording EMG and kinematics data during specified tasks. It enables users to specify the recording duration, task type, and label, and handles the data recording process.
- Parameters:
main_window (MyoGestic) – The parent application that manages the recording protocol.
- _selected_visual_interface#
The visual interface used for the recording.
- Type:
Optional[VisualInterfaceTemplate]
- _biosignal__buffer#
Buffer for storing timestamped EMG data samples.
Methods
__init__
(main_window)Finalize the recording process.
Reset the recording UI and clear the buffer.
close_event
(_)Handle the close event for the recording protocol.
Retrieve recorded EMG data and timestamps.
start_recording_preparation
(duration)Prepare for EMG data recording.
update_biosignal_buffer
(data)Update the buffer with incoming EMG data.
- close_event(_)[source]#
Handle the close event for the recording protocol.
- Parameters:
_ (QCloseEvent)
- Return type:
None
- retrieve_recorded_data()[source]#
Retrieve recorded EMG data and timestamps.
- Returns:
A tuple of EMG data and corresponding timestamps.
- Return type:
Tuple[np.ndarray, np.ndarray]