presenter module¶
-
class
package.views.presenter.Presenter¶ Bases:
objectPresenter manages the real-time data and present them to GUI like oscilloscope. This class is a part of MainView class, it is separated from MainView for functionality encapsulation.
-
MRCP_plot(about_to_plot_MRCP)¶ Plot MRCP template :param about_to_plot_MRCP: template buffer extracted from real-time data stream :return:
-
Time()¶ Call update subject view window image if task button clicked and display timer on experimenter GUI.
-
Update_SV_image()¶ Update subject view GUI visual cues inlcuding Idle, focus, prepare, two, one, task
-
addEventPlot(event_name, event_id)¶ Add marker during recording. Note: marker not supported in current version
-
choose_base_folder()¶ Choose directory to save recording files. :returns: directory path
-
filter_signal()¶ Apply BPF and notch filters to displayed signal
-
find_epoch_number()¶ Get the current epoch number in its own class to show it in task monitor in Online Experiment tab :return the index of this epoch in its own class
-
get_event_number_table_content()¶ Get task name and event number from event number table.
-
get_input_temp()¶ Choose tpyed templates from the text box below the MRCP plot window.
-
get_task_name_table_content()¶ Get task name, task description, image path and sound path from task name table in experimenter GUI :return: lists of table content
-
init_class_bad_epoch_table()¶ Initialize table header for bad epochs recording table in task monitor
-
init_class_epoch_counter_table()¶ Initialize table header for Task Monitor table
-
init_table_file_path()¶ Initialize file path table in Event and File Management tab
-
init_task_event_number_table()¶ Initialize the header of event number table.
-
init_task_name_table()¶ Initialize task table heade.
-
load_protocol()¶ Load existing experimental protocal.
-
openFileNameDialog_image()¶ Open file folder to choose task instruction image.
-
openFileNameDialog_protocol()¶ Open foldre to choose saved experimental protocal.
-
openFileNameDialog_sound()¶ Open file folder to choose sound file for task instruction.
-
paintEvent(e)¶ Paint the oscilloscope
-
paintInterface(qp)¶ Update stuff on the interface. Only graphical updates should be added here
-
play_task_sound(sound_path)¶ play sound for task instruction :param sound_path: .wav sound file directory path
-
plot_display_temp()¶ Plot certain MRCP templates selected by the text box below the MRCP plot window.
-
read_eeg()¶ Get real time data from LSL
-
read_sub_channel_names()¶ Read channel names typed in Sub Channel Manager in Oscilloscope tab and apply filter or scaler later
-
read_template_buffer()¶ Get bandpassed real time template buffer
-
saveFileNameDialog_protocol()¶ Save current tasks listed in the task table to an experimental protocal file.
-
set_MRCP_window_size(MRCP_window_size)¶ Set the time length of MRCP template displayed in Online Experiment tab
-
set_epoch_number()¶ Display current task epoch number in its own task in task monitor in Online Experiment tab
-
show_task_instruction_image()¶ Show task instruction image in subject view window
-
stop_SV()¶ Stop subject view window updating when tasks finished
-
update_MRCP_plot()¶ Update the signal in MRCP template window
-
update_SV_task()¶ Update task instruction image, task description and task sound on subject view GUI
-
update_loop()¶ Update three parts by real time data: template_buffer, filter displayed signal, ringbuffer. This function connects with main timer defined in MainView and is called every 20ms.
-
update_plot_scale(new_scale)¶ Update channel scales when changed :param: new_scale: new scale of data (mv)
-
update_plot_seconds(new_seconds)¶ Update the time length displayed in oscilloscope :param new_seconds: time length to display (s)
-
update_ringbuffers()¶ Update selected channels scale
-
update_table_file_path()¶ Update content in File Path table.
-
update_template_buffer()¶ Update buffer for drawing online MRCP template. Low pass filter followed by high pass filter are applied to the buffer.
-
update_title_scope()¶ Updates the title shown in the scope
-