src package

Subpackages

Submodules

src.main module

Main file launching the project.

src.main_controller module

Main controller

class src.main_controller.mainController(screen_size)[source]

Bases: main_listener.mainListener

change_dataset(index_selected)[source]

Change the dataset selected and display the corresponding information. :param index_selected: The index of the dataset selected. :type index_selected: int

channel_location_clicked()[source]

Create the controller for displaying information about the channel locations of the dataset.

channel_location_finished(channel_locations, channel_names)[source]

Modify information about channels of the dataset that have been changed by the user. :param channel_locations: Channel location :type channel_locations: dict :param channel_names: Channel names :type channel_names: list of str

classify_clicked()[source]

Create the controller for classifying the dataset.

classify_computation_error()[source]

Close the waiting window and display an error message because an error occurred during the computation.

classify_computation_finished()[source]

Close the waiting window when the classification is done on the dataset.

classify_finished()[source]

The classification is completely done, plot the results.

classify_information(pipeline_selected, feature_selection, number_of_channels_to_select, hyper_tuning, cross_val_number, trials_selected)[source]

Create the waiting window while the classification is done on the dataset. :param pipeline_selected: The pipeline(s) used for the classification of the dataset. :type pipeline_selected: list of str :param feature_selection: Boolean telling if the computation of some feature selection techniques must be performed on the dataset. :type feature_selection: boolean :param number_of_channels_to_select: Number of channels to select for the feature selection. :type number_of_channels_to_select: int :param hyper_tuning: Boolean telling if the computation of the tuning of the hyper-parameters of the pipelines must be performed on the dataset. :type hyper_tuning: boolean :param cross_val_number: Number of cross-validation fold used by the pipelines on the dataset. :type cross_val_number: int :param trials_selected: The indexes of the trials selected for the computation :type trials_selected: list of int

clear_data_confirmed()[source]

The clearing of the dataset is confirmed.

clear_dataset_clicked()[source]

Remove the current dataset loaded.

clear_study_clicked()[source]

Remove the current study loaded.

create_study_clicked()[source]

Create the controller for retrieving information about the study that is wanted to be created.

create_study_information(study_name, task_name, dataset_names, dataset_indexes, subjects, sessions, runs, conditions, groups)[source]

Call the creation of the study with the given parameters. :param study_name: The name of the study :type study_name: str :param task_name: The name of the task linked to the study :type task_name: str :param dataset_names: All the dataset names :type dataset_names: list of str :param dataset_indexes: The indexes of the datasets selected to be in the study :type dataset_indexes: list of int :param subjects: The subjects assigned to each dataset in the study :type subjects: list of str :param sessions: The sessions assigned to each dataset in the study :type sessions: list of str :param runs: The runs assigned to each dataset in the study :type runs: list of str :param conditions: The conditions assigned to each dataset in the study :type conditions: list of str :param groups: The groups assigned to each dataset in the study :type groups: list of str

dataset_info_clicked()[source]

Create the controller for displaying some information about the dataset.

dataset_info_information(channels_selected)[source]

Change the information that have been modified by the user manually. :param channels_selected: :type channels_selected:

display_all_info()[source]

Retrieve all the information that will be displayed on the main window and unlock all the menus.

download_fsaverage_mne_data_computation_finished()[source]

Close the waiting window when the download of the fsaverage and sample datasets is done.

download_fsaverage_mne_data_information()[source]

Create the waiting window while the download of the fsaverage and sample datasets is done.

edit_study_clicked()[source]

Create the controller for editing the study.

edit_study_information(study_name, task_name, subjects, sessions, runs, conditions, groups)[source]

Send the information to the study to be edited. :param study_name: The name of the study :type study_name: str :param task_name: The name of the task linked to the study :type task_name: str :param subjects: The subjects assigned to each dataset in the study :type subjects: list of str :param sessions: The sessions assigned to each dataset in the study :type sessions: list of str :param runs: The runs assigned to each dataset in the study :type runs: list of str :param conditions: The conditions assigned to each dataset in the study :type conditions: list of str :param groups: The groups assigned to each dataset in the study :type groups: list of str

envelope_correlation_clicked()[source]

Create the controller for computing the envelope correlation on the dataset.

envelope_correlation_computation_error()[source]

Close the waiting window and display an error message because an error occurred during the computation.

envelope_correlation_computation_finished()[source]

Close the waiting window when the computation of the envelope correlation is done on the dataset.

envelope_correlation_finished()[source]

The computation of the envelope correlation is completely done, plot it.

envelope_correlation_information(psi, fmin, fmax, connectivity_method, n_jobs, export_path)[source]

Create the waiting window while the computation of the envelope correlation is done on the dataset. :param psi: Check if the computation of the Phase Slope Index must be done. The PSI give an indication to the directionality of the connectivity. :type psi: bool :param fmin: Minimum frequency from which the envelope correlation will be computed. :type fmin: float :param fmax: Maximum frequency from which the envelope correlation will be computed. :type fmax: float :param connectivity_method: Method used for computing the source space connectivity. :type connectivity_method: str :param n_jobs: Number of processes used to compute the source estimation :type n_jobs: int :param export_path: Path where the envelope correlation data will be stored. :type export_path: str

event_values_clicked()[source]

Create the controller for displaying information about the event of the dataset. Display an error message if the dataset is a “Raw” dataset, because only “Epochs” dataset have events.

event_values_finished(event_values, event_ids)[source]

Update the event values that have been modified by the user and display the information on the main window. :param event_values: Event values :type event_values: list of, list of int :param event_ids: Event ids :type event_ids: dict

export_data_csv_computation_error()[source]

Close the waiting window because the exportation of the data into a CSV file had an error.

export_data_csv_computation_finished()[source]

Close the waiting window when the exportation of the data into a CSV file is done.

export_data_set_computation_error()[source]

Close the waiting window because the exportation of the data into a SET file had an error.

export_data_set_computation_finished()[source]

Close the waiting window when the exportation of the data into a SET file is done.

export_data_to_csv_file_clicked(path_to_file)[source]

Check if the path to the file is correct. Export the data to a CSV file. :param path_to_file: Path to the file. :type path_to_file: str

export_data_to_set_file_clicked(path_to_file)[source]

Check if the path to the file is correct. Export the data to a SET file. :param path_to_file: Path to the file. :type path_to_file: str

export_events_to_file_clicked()[source]

Check if the path to the file is correct. Export the events to a TXT file.

export_events_txt_computation_error()[source]

Close the waiting window because the exportation of the data into a TXT file had an error.

export_events_txt_computation_finished()[source]

Close the waiting window when the exportation of the events of the dataset into a TXT file is done.

extract_epochs_clicked()[source]

Create the controller for extracting epochs from the dataset.

extract_epochs_computation_error()[source]

Close the waiting window because the extraction of epochs had an error.

extract_epochs_computation_finished()[source]

Close the waiting window when the extraction of epochs is done on the dataset.

extract_epochs_finished()[source]

The extraction of epochs is completely done, update the information on the main window.

extract_epochs_information(tmin, tmax, trials_selected)[source]

Create the waiting window while the extraction of epochs is done on the dataset. :param tmin: Start time of the epoch to keep :type tmin: float :param tmax: End time of the epoch to keep :type tmax: float :param trials_selected: The indexes of the trials selected for the computation :type trials_selected: list of int

filter_clicked()[source]

Create the controller for filtering the dataset.

filter_computation(low_frequency, high_frequency, channels_selected, filter_method, index=None)[source]

Call the model to perform the filtering on the chosen dataset. :param low_frequency: Lowest frequency from where the data will be filtered. :type low_frequency: float :param high_frequency: Highest frequency from where the data will be filtered. :type high_frequency: float :param channels_selected: Channels on which the filtering will be performed. :type channels_selected: list of str :param filter_method: Method used for the filtering, either FIR or IIR. :type filter_method: str :param index: The index of the dataset of the study. :type index: int

filter_computation_error()[source]

Close the waiting window because the filtering had an error.

filter_computation_finished(low_frequency=None, high_frequency=None, channels_selected=None, filter_method=None)[source]

Close the waiting window when the filtering is done on the dataset. :param low_frequency: Lowest frequency from where the data will be filtered. :type low_frequency: float :param high_frequency: Highest frequency from where the data will be filtered. :type high_frequency: float :param channels_selected: Channels on which the filtering will be performed. :type channels_selected: list of str :param filter_method: Method used for the filtering, either FIR or IIR. :type filter_method: str

filter_finished()[source]

The filtering is completely done, update the information on the main window.

filter_information(low_frequency, high_frequency, channels_selected, filter_method)[source]

Create the waiting window while the filtering is done on the dataset. :param low_frequency: Lowest frequency from where the data will be filtered. :type low_frequency: float :param high_frequency: Highest frequency from where the data will be filtered. :type high_frequency: float :param channels_selected: Channels on which the filtering will be performed. :type channels_selected: list of str :param filter_method: Method used for the filtering, either FIR or IIR. :type filter_method: str

find_events_from_channel_clicked()[source]

Create the controller for finding the events based on a stimulation channel.

find_events_from_channel_computation_error()[source]

Close the waiting window and display an error message because an error occurred during the computation.

find_events_from_channel_computation_finished()[source]

Close the waiting window when the events are found based on the stimulation channel.

find_events_from_channel_finished()[source]

Display the new information about the events on the main window.

find_events_from_channel_information(stim_channel)[source]

Create the waiting window while finding the events based on the stimulation channel. :param stim_channel: The stimulation channel used to find the events. :type stim_channel: str

get_main_view()[source]

Gets the main view. :return: The main view :rtype: mainView

ica_data_decomposition_computation_error()[source]

Close the waiting window because the ICA decomposition had an error.

ica_data_decomposition_computation_finished(ica_method=None)[source]

Close the waiting window when the computation the ICA decomposition is done on the dataset. :param ica_method: Method used for performing the ICA decomposition :type ica_method: str

ica_decomposition_clicked()[source]

Create the controller for computing the ICA decomposition on the dataset.

ica_decomposition_computation(ica_method, index=None)[source]

Call the model for computing the ica decomposition on the chosen dataset. :param ica_method: Method used for performing the ICA decomposition :type ica_method: str :param index: The index of the dataset of the study. :type index: int

ica_decomposition_finished()[source]

The computation the ICA decomposition is completely done, update the information on the main window.

ica_decomposition_information(ica_method)[source]

Create the waiting window while the computation the ICA decomposition is done on the dataset. :param ica_method: Method used for performing the ICA decomposition :type ica_method: str

inspect_reject_data_clicked()[source]
load_data_info()[source]

Create the controller for loading more information about the dataset.

load_data_info_computation_finished()[source]

Close the waiting window when the additional information about the dataset are loaded.

load_data_info_confirmed()[source]

The loading of more information is confirmed.

load_data_info_finished()[source]

More information about the dataset are loaded, tell the main window to display all the information about the dataset.

load_data_info_information(montage, channels_selected, tmin, tmax, dataset_name)[source]

Create the waiting window while more information about the dataset are loaded. :param montage: Montage of the headset :type montage: str :param channels_selected: Channels selected :type channels_selected: list of str :param tmin: Start time of the epoch or raw file to keep :type tmin: float :param tmax: End time of the epoch or raw file to keep :type tmax: float :param dataset_name: The name of the loaded dataset. :type dataset_name: str

open_cnt_file_clicked(path_to_file)[source]

Check if the path to the file is correct. Create the waiting window while the CNT file is opened. :param path_to_file: Path to the file. :type path_to_file: str

open_cnt_file_computation_error()[source]

Close the waiting window because the opening of the ANT eego CNT file had an error.

open_cnt_file_computation_finished()[source]

Close the waiting window when the CNT file is opened.

open_cnt_file_finished()[source]

The CNT file is loaded, ask more information about the dataset that will be used.

open_fif_file_clicked(path_to_file)[source]

Check if the path to the file is correct. Create the waiting window while the FIF file is opened. :param path_to_file: Path to the file. :type path_to_file: str

open_fif_file_computation_error()[source]

Close the waiting window because the opening of the FIF file had an error.

open_fif_file_computation_finished()[source]

Close the waiting window when the FIF file is opened.

open_fif_file_finished()[source]

The FIF file is loaded, ask more information about the dataset that will be used.

open_set_file_clicked(path_to_file)[source]

Check if the path to the file is correct. Create the waiting window while the SET file is opened. :param path_to_file: Path to the file. :type path_to_file: str

open_set_file_computation_error()[source]

Close the waiting window because the opening of the SET file had an error.

open_set_file_computation_finished()[source]

Close the waiting window when the SET file is opened.

open_set_file_finished()[source]

The SET file is loaded, ask more information about the dataset that will be used.

plot_ERP_image_clicked()[source]

Create the controller for computing the ERP image the dataset.

plot_ERP_image_information(channel_selected)[source]

The computation of the ERP image is completely done, plot it. :param channel_selected: Channel selected for the ERP image. :type channel_selected: str

plot_ERPs_clicked()[source]

Create the controller for computing the ERPs the dataset.

plot_ERPs_information(channels_selected)[source]

The computation of the ERPs is completely done, plot it. :param channels_selected: Channels selected for the ERP image. :type channels_selected: list of str

plot_channel_locations_clicked()[source]

Create the controller for plotting the channels’ locations of the dataset.

plot_data_clicked()[source]

Plot the data of the dataset.

plot_spectra_maps_clicked()[source]

Create the controller for computing the power spectral density of the dataset.

plot_spectra_maps_computation_error()[source]

Close the waiting window when the computation of the power spectral density is done on the dataset.

plot_spectra_maps_computation_finished()[source]

Close the waiting window when the computation of the power spectral density is done on the dataset.

plot_spectra_maps_finished()[source]

The computation of the power spectral density is completely done, plot it.

plot_spectra_maps_information(minimum_frequency, maximum_frequency, minimum_time, maximum_time, topo_time_points)[source]

Create the waiting window while the computation of the power spectral density is done on the dataset. :param minimum_frequency: Minimum frequency from which the power spectral density will be computed. :type minimum_frequency: float :param maximum_frequency: Maximum frequency from which the power spectral density will be computed. :type maximum_frequency: float :param minimum_time: Minimum time of the epochs from which the power spectral density will be computed. :type minimum_time: float :param maximum_time: Maximum time of the epochs from which the power spectral density will be computed. :type maximum_time: float :param topo_time_points: The time points for the topomaps. :type topo_time_points: list of float

plot_study_clicked()[source]

Create the controller for plotting the study.

plot_time_frequency_clicked()[source]

Create the controller for computing the time-frequency analysis on the dataset.

plot_time_frequency_computation_error()[source]

Close the waiting window and display an error message because an error occurred during the computation.

plot_time_frequency_computation_finished()[source]

Close the waiting window when the computation of the time-frequency analysis is done on the dataset.

plot_time_frequency_finished()[source]

The computation of the time-frequency analysis is completely done, plot it.

plot_time_frequency_information(method_tfr, channel_selected, min_frequency, max_frequency, n_cycles)[source]

Create the waiting window while the computation of the time-frequency analysis is done on the dataset. :param method_tfr: Method used for computing the time-frequency analysis. :type method_tfr: str :param channel_selected: Channel on which the time-frequency analysis will be computed. :type channel_selected: str :param min_frequency: Minimum frequency from which the time-frequency analysis will be computed. :type min_frequency: float :param max_frequency: Maximum frequency from which the time-frequency analysis will be computed. :type max_frequency: float :param n_cycles: Number of cycles used by the time-frequency analysis for his computation. :type n_cycles: int

plot_topographies_clicked()[source]

Create the controller for plotting the topographies of the dataset.

plot_topographies_information(time_points, mode)[source]

Plot the topographies of the dataset. :param time_points: Time points at which the topographies will be plotted. :type time_points: list of float :param mode: Mode used for plotting the topographies. :type mode: str

re_referencing_clicked()[source]

Create the controller for re-referencing the dataset.

re_referencing_computation(references, save_data, load_data, n_jobs, index=None)[source]

Call the model to do the re-referencing. :param references: References from which the data will be re-referenced. Can be a single or multiple channels; Can be an average of all channels; Can be a “point to infinity”. :type references: list of str; str :param save_data: Boolean telling if the data computed must be saved into files. :type save_data: bool :param load_data: Boolean telling if the data used for the computation can be read from computer files. :type load_data: bool :param n_jobs: Number of parallel processes used to compute the re-referencing :type n_jobs: int :param index: The index of the dataset of the study. :type index: int

re_referencing_computation_error()[source]

Close the waiting window because the re-referencing had an error.

re_referencing_computation_finished(references=None, save_data=None, load_data=None, n_jobs=None)[source]

Close the waiting window when the re-referencing is done on the dataset. :param references: References from which the data will be re-referenced. Can be a single or multiple channels; Can be an average of all channels; Can be a “point to infinity”. :type references: list of str; str :param save_data: Boolean telling if the data computed must be saved into files. :type save_data: bool :param load_data: Boolean telling if the data used for the computation can be read from computer files. :type load_data: bool :param n_jobs: Number of parallel processes used to compute the re-referencing :type n_jobs: int

re_referencing_finished()[source]

The re-referencing is completely done, update the information on the main window.

re_referencing_information(references, save_data, load_data, n_jobs)[source]

Create the waiting window while the re-referencing is done on the dataset. :param references: References from which the data will be re-referenced. Can be a single or multiple channels; Can be an average of all channels; Can be a “point to infinity”. :type references: list of str; str :param save_data: Boolean telling if the data computed must be saved into files. :type save_data: bool :param load_data: Boolean telling if the data used for the computation can be read from computer files. :type load_data: bool :param n_jobs: Number of parallel processes used to compute the re-referencing :type n_jobs: int

read_events_file_clicked(path_to_file)[source]

Check if the path to the file is correct. Read the event file if the dataset is “Raw”, otherwise display an error message because “Epochs” dataset already have events, and they can be modified directly. :param path_to_file: Path to the file. :type path_to_file: str

resampling_clicked()[source]

Create the controller for filtering the dataset.

resampling_computation(frequency, index=None)[source]

Call the model to do the resampling. :param frequency: The new frequency at which the data will be resampled. :type frequency: int :param index: The index of the dataset of the study. :type index: int

resampling_computation_error()[source]

Close the waiting window because the resampling had an error.

resampling_computation_finished(frequency=None)[source]

Close the waiting window when the resampling is done on the dataset. :param frequency: The new frequency at which the data will be resampled. :type frequency: int

resampling_finished()[source]

The resampling is completely done, update the information on the main window.

resampling_information(frequency)[source]

Create the waiting window while the resampling is done on the dataset or the study. :param frequency: The new frequency at which the data will be resampled. :type frequency: int

save_file_as_clicked()[source]

Save the file into the fif format and display the new path file on the main window.

save_file_clicked()[source]

Save the file into the fif format and display the new path file on the main window.

select_data_clicked()[source]
select_data_events_clicked()[source]
sensor_space_connectivity_clicked()[source]

Create the controller for computing the sensor space connectivity on the dataset.

sensor_space_connectivity_computation_error()[source]

Close the waiting window and display an error message because an error occurred during the computation.

sensor_space_connectivity_computation_finished()[source]

Close the waiting window when the computation of the sensor space connectivity is done on the dataset.

sensor_space_connectivity_finished()[source]

The computation of the sensor space connectivity is completely done, plot it.

sensor_space_connectivity_information(export_path)[source]

Create the waiting window while the computation of the sensor space connectivity is done on the dataset. :param export_path: Path where the sensor space connectivity data will be stored. :type export_path: str

show()[source]

Shows the main view.

snr_clicked()[source]

Create the controller for computation the SNR from the dataset.

snr_computation_error()[source]

Close the waiting window because the computation of the SNR had an error.

snr_computation_finished()[source]

Close the waiting window when the computation of the SNR is done on the dataset.

snr_finished()[source]

The computation of the SNR is completely done, plot the results.

snr_information(snr_methods, source_method, read, write, picks, trials_selected)[source]

Create the waiting window while the SNR computation is done on the dataset. :param snr_methods: The methods used for computing the SNR :type snr_methods: list of str :param source_method: The method used for computing the source estimation :type source_method: str :param read: Boolean telling if the data used for the computation can be read from computer files. :type read: bool :param write: Boolean telling if the data computed must be saved into files. :type write: bool :param picks: The list of channels selected used for the computation :type picks: list of str :param trials_selected: The indexes of the trials selected for the computation :type trials_selected: list of int

source_estimation_clicked()[source]

Create the controller for computing the source estimation of the dataset.

source_estimation_computation_error()[source]

Close the waiting window and display an error message because an error occurred during the computation.

source_estimation_computation_finished()[source]

Close the waiting window when the computation of the source estimation is done on the dataset.

source_estimation_finished()[source]

The computation of the source estimation is completely done, update the information on the main window.

source_estimation_information(source_estimation_method, save_data, load_data, epochs_method, trials_selected, tmin, tmax, n_jobs, export_path)[source]

Create the waiting window while the computation of the source estimation is done on the dataset. :param source_estimation_method: The method used to compute the source estimation :type source_estimation_method: str :param save_data: Boolean telling if the data computed must be saved into files. :type save_data: bool :param load_data: Boolean telling if the data used for the computation can be read from computer files. :type load_data: bool :param epochs_method: On what data the source estimation will be computed. Can be three values : - “single trial” : Compute the source estimation on a single trial that is precised. - “evoked” : Compute the source estimation on the average of all the signals. - “averaged” : Compute the source estimation on every trial, and then compute the average of them. :type epochs_method: str :param trials_selected: The indexes of the trials selected for the computation :type trials_selected: list of int :param tmin: Start time of the epoch or raw file :type tmin: float :param tmax: End time of the epoch or raw file :type tmax: float :param n_jobs: Number of processes used to compute the source estimation :type n_jobs: int :param export_path: Path where the source estimation data will be stored. :type export_path: str

source_space_connectivity_clicked()[source]

Create the controller for computing the source space connectivity on the dataset.

source_space_connectivity_computation_error()[source]

Close the waiting window and display an error message because an error occurred during the computation.

source_space_connectivity_computation_finished()[source]

Close the waiting window when the computation of the source space connectivity is done on the dataset.

source_space_connectivity_finished()[source]

The computation of the source space connectivity is completely done, plot it.

source_space_connectivity_information(connectivity_method, spectrum_estimation_method, source_estimation_method, save_data, load_data, n_jobs, export_path, psi, fmin, fmax)[source]

Create the waiting window while the computation of the source space connectivity is done on the dataset. :param connectivity_method: Method used for computing the source space connectivity. :type connectivity_method: str :param spectrum_estimation_method: Method used for computing the spectrum estimation used inside the computation of the source space connectivity. :type spectrum_estimation_method: str :param source_estimation_method: Method used for computing the source estimation used inside the computation of the source space connectivity. :type source_estimation_method: str :param save_data: Boolean telling if the data computed must be saved into files. :type save_data: bool :param load_data: Boolean telling if the data used for the computation can be read from computer files. :type load_data: bool :param n_jobs: Number of processes used to compute the source estimation :type n_jobs: int :param export_path: Path where the source space connectivity data will be stored. :type export_path: str :param psi: Check if the computation of the Phase Slope Index must be done. The PSI give an indication to the directionality of the connectivity. :type psi: bool :param fmin: Minimum frequency from which the envelope correlation will be computed. :type fmin: float :param fmax: Maximum frequency from which the envelope correlation will be computed. :type fmax: float

spectro_temporal_connectivity_clicked()[source]
spectro_temporal_connectivity_information()[source]
statistics_connectivity_clicked()[source]

Create the controller for computing the envelope correlation and the statistics on the dataset.

statistics_connectivity_computation_error()[source]

Close the waiting window and display an error message because an error occurred during the computation.

statistics_connectivity_computation_finished()[source]

Close the waiting window when the computation of the envelope correlation is done on the dataset.

statistics_connectivity_finished()[source]

The computation of the envelope correlation is completely done, plot it.

statistics_connectivity_information(psi, fmin, fmax, connectivity_method, n_jobs, export_path, stats_first_variable, stats_second_variable)[source]

Create the waiting window while the computation of the envelope correlation is done on the dataset. :param psi: Check if the computation of the Phase Slope Index must be done. The PSI give an indication to the directionality of the connectivity. :type psi: bool :param fmin: Minimum frequency from which the envelope correlation will be computed. :type fmin: float :param fmax: Maximum frequency from which the envelope correlation will be computed. :type fmax: float :param connectivity_method: Method used for computing the source space connectivity. :type connectivity_method: str :param n_jobs: Number of processes used to compute the source estimation :type n_jobs: int :param export_path: Path where the envelope correlation data will be stored. :type export_path: str :param stats_first_variable: The first independent variable on which the statistics must be computed (an event id) :type stats_first_variable: str :param stats_second_variable: The second independent variable on which the statistics must be computed (an event id) :type stats_second_variable: str

statistics_erp_clicked()[source]

Create the controller for computing the ERPs the dataset.

statistics_erp_information(channels_selected, stats_first_variable, stats_second_variable)[source]

The computation of the ERPs is completely done, plot it. :param channels_selected: Channels selected for the ERP. :type channels_selected: list of str :param stats_first_variable: The first independent variable on which the statistics must be computed (an event id) :type stats_first_variable: str :param stats_second_variable: The second independent variable on which the statistics must be computed (an event id) :type stats_second_variable: str

statistics_ersp_itc_clicked()[source]

Create the controller for computing the time-frequency analysis and the statistics on the dataset.

statistics_ersp_itc_computation_error()[source]

Close the waiting window and display an error message because an error occurred during the computation.

statistics_ersp_itc_computation_finished()[source]

Close the waiting window when the computation of the time-frequency analysis is done on the dataset.

statistics_ersp_itc_finished()[source]

The computation of the time-frequency analysis is completely done, plot it.

statistics_ersp_itc_information(method_tfr, channel_selected, min_frequency, max_frequency, n_cycles, stats_first_variable, stats_second_variable)[source]

Create the waiting window while the computation of the time-frequency analysis is done on the dataset. :param method_tfr: Method used for computing the time-frequency analysis. :type method_tfr: str :param channel_selected: Channel on which the time-frequency analysis will be computed. :type channel_selected: str :param min_frequency: Minimum frequency from which the time-frequency analysis will be computed. :type min_frequency: float :param max_frequency: Maximum frequency from which the time-frequency analysis will be computed. :type max_frequency: float :param n_cycles: Number of cycles used by the time-frequency analysis for his computation. :type n_cycles: int :param stats_first_variable: The first independent variable on which the statistics must be computed (an event id) :type stats_first_variable: str :param stats_second_variable: The second independent variable on which the statistics must be computed (an event id) :type stats_second_variable: str

statistics_psd_clicked()[source]

Create the controller for computing the power spectral density and the statistics of the dataset.

statistics_psd_computation_error()[source]

Close the waiting window when the computation of the power spectral density is done on the dataset.

statistics_psd_computation_finished()[source]

Close the waiting window when the computation of the power spectral density is done on the dataset.

statistics_psd_finished()[source]

The computation of the power spectral density is completely done, plot it.

statistics_psd_information(minimum_frequency, maximum_frequency, minimum_time, maximum_time, topo_time_points, channel_selected, stats_first_variable, stats_second_variable)[source]

Create the waiting window while the computation of the power spectral density is done on the dataset. :param minimum_frequency: Minimum frequency from which the power spectral density will be computed. :type minimum_frequency: float :param maximum_frequency: Maximum frequency from which the power spectral density will be computed. :type maximum_frequency: float :param minimum_time: Minimum time of the epochs from which the power spectral density will be computed. :type minimum_time: float :param maximum_time: Maximum time of the epochs from which the power spectral density will be computed. :type maximum_time: float :param topo_time_points: The time points for the topomaps. :type topo_time_points: list of float :param channel_selected: Channel selected for the ERP. :type channel_selected: str :param stats_first_variable: The first independent variable on which the statistics must be computed (an event id) :type stats_first_variable: str :param stats_second_variable: The second independent variable on which the statistics must be computed (an event id) :type stats_second_variable: str

statistics_snr_clicked()[source]

Create the controller for computing the SNR from the dataset and the statistics on specified data.

statistics_snr_computation_error()[source]

Close the waiting window because the computation of the SNR and the statistics had an error.

statistics_snr_computation_finished()[source]

Close the waiting window when the computation of the SNR and the statistics are done on the dataset.

statistics_snr_finished()[source]

The computation of the SNR and the statistics are completely done, plot the results.

statistics_snr_information(snr_methods, source_method, read, write, picks, stats_first_variable, stats_second_variable)[source]

Create the waiting window while the SNR computation and the statistics is done on the dataset. :param snr_methods: The methods used for computing the SNR :type snr_methods: list of str :param source_method: The method used for computing the source estimation :type source_method: str :param read: Boolean telling if the data used for the computation can be read from computer files. :type read: bool :param write: Boolean telling if the data computed must be saved into files. :type write: bool :param picks: The list of channels selected used for the computation :type picks: list of str :param stats_first_variable: The first independent variable on which the statistics must be computed (an event id) :type stats_first_variable: str :param stats_second_variable: The second independent variable on which the statistics must be computed (an event id) :type stats_second_variable: str

study_selected()[source]

Select the current study and display the corresponding information.

src.main_listener module

Main listener

class src.main_listener.mainListener[source]

Bases: abc.ABC

The main listener is the link between the main view and the main controller, but also between most of the controllers. When the controller wants to send the information back to the main controller (who created it) it passes through the main listener, that will send the information to the main controller. It is here to “listen” and send the information to the correct place.

change_dataset(index_selected)[source]
channel_location_clicked()[source]
channel_location_finished(channel_locations, channel_names)[source]
classify_clicked()[source]
classify_computation_error()[source]
classify_computation_finished()[source]
classify_finished()[source]
classify_information(pipeline_selected, feature_selection, number_of_channels_to_select, hyper_tuning, cross_val_number, trials_selected)[source]
clear_dataset_clicked()[source]
clear_study_clicked()[source]
create_study_clicked()[source]
create_study_information(study_name, task_name, dataset_names, dataset_indexes, subjects, sessions, runs, conditions, groups)[source]
dataset_info_clicked()[source]
dataset_info_information(channels_selected)[source]
download_fsaverage_mne_data_computation_finished()[source]
download_fsaverage_mne_data_information()[source]
edit_study_clicked()[source]
envelope_correlation_clicked()[source]
envelope_correlation_computation_error()[source]
envelope_correlation_computation_finished()[source]
envelope_correlation_finished()[source]
envelope_correlation_information(psi, fmin, fmax, connectivity_method, n_jobs, export_path)[source]
event_values_clicked()[source]
event_values_finished(event_values, event_ids)[source]
export_data_csv_computation_error()[source]
export_data_csv_computation_finished()[source]
export_data_set_computation_error()[source]
export_data_set_computation_finished()[source]
export_data_to_csv_file_clicked(path_to_file)[source]
export_data_to_set_file_clicked(path_to_file)[source]
export_events_to_file_clicked()[source]
export_events_txt_computation_error()[source]
export_events_txt_computation_finished()[source]
extract_epochs_clicked()[source]
extract_epochs_computation_error()[source]
extract_epochs_computation_finished()[source]
extract_epochs_finished()[source]
extract_epochs_information(tmin, tmax, trials_selected)[source]
filter_clicked()[source]
filter_computation_error()[source]
filter_computation_finished()[source]
filter_finished()[source]
filter_information(low_frequency, high_frequency, channels_selected, filter_method)[source]
find_events_from_channel_clicked()[source]
find_events_from_channel_computation_error()[source]
find_events_from_channel_computation_finished()[source]
find_events_from_channel_information(stim_channel)[source]
ica_data_decomposition_computation_error()[source]
ica_data_decomposition_computation_finished()[source]
ica_decomposition_clicked()[source]
ica_decomposition_finished()[source]
ica_decomposition_information(ica_method)[source]
inspect_reject_data_clicked()[source]
load_data_info_computation_finished()[source]
load_data_info_information(montage, channels_selected, tmin, tmax, dataset_name)[source]
open_cnt_file_clicked(path_to_file)[source]
open_cnt_file_computation_error()[source]
open_cnt_file_computation_finished()[source]
open_cnt_file_finished()[source]
open_fif_file_clicked(path_to_file)[source]
open_fif_file_computation_error()[source]
open_fif_file_computation_finished()[source]
open_fif_file_finished()[source]
open_set_file_clicked(path_to_file)[source]
open_set_file_computation_error()[source]
open_set_file_computation_finished()[source]
open_set_file_finished()[source]
plot_ERP_image_clicked()[source]
plot_ERP_image_information(channels_selected)[source]
plot_ERPs_clicked()[source]
plot_ERPs_information(channel_selected)[source]
plot_channel_locations_clicked()[source]
plot_data_clicked()[source]
plot_spectra_maps_clicked()[source]
plot_spectra_maps_computation_error()[source]
plot_spectra_maps_computation_finished()[source]
plot_spectra_maps_finished()[source]
plot_spectra_maps_information(minimum_frequency, maximum_frequency, minimum_time, maximum_time, topo_time_points)[source]
plot_study_clicked()[source]
plot_time_frequency_clicked()[source]
plot_time_frequency_computation_error()[source]
plot_time_frequency_computation_finished()[source]
plot_time_frequency_finished()[source]
plot_time_frequency_information(method_tfr, channel_selected, min_frequency, max_frequency, n_cycles)[source]
plot_topographies_clicked()[source]
plot_topographies_information(time_points, mode)[source]
re_referencing_clicked()[source]
re_referencing_computation_error()[source]
re_referencing_computation_finished()[source]
re_referencing_finished()[source]
re_referencing_information(references, save_data, load_data, n_jobs)[source]
read_events_file_clicked(path_to_file)[source]
resampling_clicked()[source]
resampling_computation_error()[source]
resampling_computation_finished()[source]
resampling_finished()[source]
resampling_information(frequency)[source]
save_file_as_clicked()[source]
save_file_clicked()[source]
select_data_clicked()[source]
select_data_events_clicked()[source]
sensor_space_connectivity_clicked()[source]
sensor_space_connectivity_computation_error()[source]
sensor_space_connectivity_computation_finished()[source]
sensor_space_connectivity_finished()[source]
sensor_space_connectivity_information(export_path)[source]
snr_clicked()[source]
snr_computation_error()[source]
snr_computation_finished()[source]
snr_finished()[source]
snr_information(snr_methods, source_method, read, write, picks, trials_selected)[source]
source_estimation_clicked()[source]
source_estimation_computation_finished()[source]
source_estimation_finished()[source]
source_estimation_information(source_estimation_method, save_data, load_data, epochs_method, trial_number, tmin, tmax, n_jobs, export_path)[source]
source_space_connectivity_clicked()[source]
source_space_connectivity_computation_finished()[source]
source_space_connectivity_finished()[source]
source_space_connectivity_information(connectivity_method, spectrum_estimation_method, source_estimation_method, save_data, load_data, n_jobs, export_path, psi, fmin, fmax)[source]
spectro_temporal_connectivity_clicked()[source]
spectro_temporal_connectivity_information()[source]
statistics_connectivity_clicked()[source]
statistics_connectivity_information(psi, fmin, fmax, connectivity_method, n_jobs, export_path, stats_first_variable, stats_second_variable)[source]
statistics_erp_clicked()[source]
statistics_erp_information(channels_selected, stats_first_variable, stats_second_variable)[source]
statistics_ersp_itc_clicked()[source]
statistics_ersp_itc_information(method_tfr, channel_selected, min_frequency, max_frequency, n_cycles, stats_first_variable, stats_second_variable)[source]
statistics_psd_clicked()[source]
statistics_psd_information(minimum_frequency, maximum_frequency, minimum_time, maximum_time, topo_time_points, channel_selected, stats_first_variable, stats_second_variable)[source]
statistics_snr_clicked()[source]
statistics_snr_information(snr_methods, source_method, read, write, picks, stats_first_variable, stats_second_variable)[source]
study_selected()[source]

src.main_model module

Main model

class src.main_model.mainModel[source]

Bases: object

classify(pipeline_selected, feature_selection, number_of_channels_to_select, hyper_tuning, cross_val_number, trials_selected)[source]

Creates the parallel runnable for computing the classification with pipeline(s) of artificial intelligence of the dataset. :param pipeline_selected: The pipeline(s) used for the classification of the dataset. :type pipeline_selected: list of str :param feature_selection: Boolean telling if the computation of some feature selection techniques must be performed on the dataset. :type feature_selection: boolean :param number_of_channels_to_select: Number of channels to select for the feature selection. :type number_of_channels_to_select: int :param hyper_tuning: Boolean telling if the computation of the tuning of the hyper-parameters of the pipelines must be performed on the dataset. :type hyper_tuning: boolean :param cross_val_number: Number of cross-validation fold used by the pipelines on the dataset. :type cross_val_number: int :param trials_selected: The indexes of the trials selected for the computation :type trials_selected: list of int

classify_computation_error()[source]

Notifies the main controller that the computation had an error.

classify_computation_finished()[source]

Notifies the main controller that the computation is done.

clear_current_dataset()[source]

Clear the data of the removed dataset.

clear_study()[source]

Clear the current study.

create_channels_locations()[source]

Retrieves the location of all channels from the MNE “Epochs” or “Raw” object for an easier use. Store the information inside the “self.channels_locations” attribute.

static create_mask_from_variable_to_keep(file_data, stats_variable)[source]

Create a mask to know which trial to keep and which one to remove for the computation. :return mask: Mask of trials to remove. True means remove, and False means keep. :rtype mask: list of boolean

create_study(study_name, task_name, dataset_names, dataset_indexes, subjects, sessions, runs, conditions, groups)[source]

Create the study with the given information. :param study_name: The name of the study :type study_name: str :param task_name: The name of the task linked to the study :type task_name: str :param dataset_names: The name of the datasets linked to the study :type dataset_names: list of str :param dataset_indexes: The indexes of the datasets selected to be in the study :type dataset_indexes: list of int :param subjects: The subjects assigned to each dataset in the study :type subjects: list of str :param sessions: The sessions assigned to each dataset in the study :type sessions: list of str :param runs: The runs assigned to each dataset in the study :type runs: list of str :param conditions: The conditions assigned to each dataset in the study :type conditions: list of str :param groups: The groups assigned to each dataset in the study :type groups: list of str

edit_study_information(study_name, task_name, subjects, sessions, runs, conditions, groups)[source]

Send the information to the study to be edited. :param study_name: The name of the study :type study_name: str :param task_name: The name of the task linked to the study :type task_name: str :param subjects: The subjects assigned to each dataset in the study :type subjects: list of str :param sessions: The sessions assigned to each dataset in the study :type sessions: list of str :param runs: The runs assigned to each dataset in the study :type runs: list of str :param conditions: The conditions assigned to each dataset in the study :type conditions: list of str :param groups: The groups assigned to each dataset in the study :type groups: list of str

envelope_correlation(psi, fmin, fmax, connectivity_method, n_jobs, export_path)[source]

Creates the parallel runnable for computing the envelope correlation between the channels of the dataset. :param psi: Check if the computation of the Phase Slope Index must be done. The PSI give an indication to the directionality of the connectivity. :type psi: bool :param fmin: Minimum frequency from which the envelope correlation will be computed. :type fmin: float :param fmax: Maximum frequency from which the envelope correlation will be computed. :type fmax: float :param connectivity_method: Method used for computing the source space connectivity. :type connectivity_method: str :param n_jobs: Number of processes used to compute the source estimation :type n_jobs: int :param export_path: Path where the envelope correlation data will be stored. :type export_path: str

envelope_correlation_computation_error()[source]

Notifies the main controller that an error has occurred during the computation

envelope_correlation_computation_finished()[source]

Notifies the main controller that the computation of the envelope correlation is done.

export_data_csv_computation_error()[source]

Notifies the main controller that the computation had an error.

export_data_csv_computation_finished()[source]

Retrieves the data from the runnable when the data are exported into a CSV file. Notifies the main controller that the computation is done.

export_data_set_computation_error()[source]

Notifies the main controller that the computation had an error.

export_data_set_computation_finished()[source]

Retrieves the data from the runnable when the data are exported into a SET file. Notifies the main controller that the computation is done.

export_data_to_csv_file_clicked(path_to_file)[source]

Check if the path to the file is correct. Export the data to a CSV file. :param path_to_file: Path to the file. :type path_to_file: str

export_data_to_set_file_clicked(path_to_file)[source]

Check if the path to the file is correct. Export the data to a SET file. :param path_to_file: Path to the file. :type path_to_file: str

export_events_to_file_clicked(path_to_file)[source]

Check if the path to the file is correct. Export the events to a TXT file. :param path_to_file: Path to the file. :type path_to_file: str

export_events_txt_computation_error()[source]

Notifies the main controller that the computation had an error.

export_events_txt_computation_finished()[source]

Retrieves the data from the runnable when the events are exported into a TXT file. Notifies the main controller that the computation is done.

extract_epochs(tmin, tmax, trials_selected)[source]

Creates the parallel runnable for extracting the epochs of a dataset based on the events provided/or found beforehand. :param tmin: Start time of the epoch to keep :type tmin: float :param tmax: End time of the epoch to keep :type tmax: float :param trials_selected: The indexes of the trials selected for the computation :type trials_selected: list of int

extract_epochs_computation_error()[source]

Notifies the main controller that the computation had an error.

extract_epochs_computation_finished()[source]

Retrieves the data from the runnable when the epochs are extracted from the available events. Notifies the main controller that the computation is done.

filter(low_frequency, high_frequency, channels_selected, filter_method, index=None)[source]

Creates the parallel runnable for filtering the dataset. :param low_frequency: Lowest frequency from where the data will be filtered. :type low_frequency: float :param high_frequency: Highest frequency from where the data will be filtered. :type high_frequency: float :param channels_selected: Channels on which the filtering will be performed. :type channels_selected: list of str :param filter_method: Method used for the filtering, either FIR or IIR. :type filter_method: str :param index: The index of the dataset of the study. :type index: int

filter_computation_error()[source]

Notifies the main controller that the computation had an error.

filter_computation_finished()[source]

Retrieves the data from the runnable when the filtering is computed. Notifies the main controller that the computation is done.

find_events_from_channel(stim_channel)[source]

Creates the parallel runnable for finding the events from a stimulation channel. :param stim_channel: Channel containing the stimulation/the events :type stim_channel: str

find_events_from_channel_computation_error()[source]

Notifies the main controller that the computation had an error.

find_events_from_channel_computation_finished()[source]

Retrieves the data from the runnable when the events are found from the provided channel. Notifies the main controller that the computation is done.

get_SNR_methods()[source]

Get the SNR methods used for the computation. :return: SNR methods :rtype: list of str

get_SNRs()[source]

Get the SNR values computed over the data. :return: SNR :rtype: list of, list of float

get_all_channels_names()[source]

Gets all the channels’ names of the dataset. :return: The channels’ names. :rtype: list of str

get_all_dataset_names()[source]

Gets the dataset name of all the datasets. :return: The dataset names :rtype: list of str

get_all_displayed_info()[source]

Gets all the information of the dataset that will be displayed on the main window. :return: A list of all the displayed information. :rtype: list of str/float/int

get_all_file_data()[source]

Gets the MNE “Epochs” or “Raw” data of all the datasets. :return: The MNE “Epochs” or “Raw” objects. :rtype: list of Epochs/Raw

get_all_file_path_name()[source]

Gets the file path of all the datasets. :return: The file path of all the datasets :rtype: list of str

get_all_file_type()[source]

Gets the type of all the files. :return: The type of all the files. :rtype: list of str

get_all_ica()[source]

Gets the status of the ICA decomposition of all the datasets. :return: “Yes” if it is known by the software that the ICA decomposition has been performed. “No” otherwise. :rtype: list of str

get_all_study_displayed_info()[source]

Gets all the information of the study that will be displayed on the main window. :return: A list of all the displayed information. :rtype: list of str/float/int

get_all_tmp_channels_names()[source]

Gets all the channels’ names of the dataset being loaded. :return: The channels’ names. :rtype: list of str

get_channels_locations()[source]

Gets the channels’ locations of the dataset. :return: The channels’ locations. :rtype: dict

get_channels_locations_status()[source]

Gets the status of the channels’ locations of the dataset. :return: “Unknown” if the channels’ locations dict is empty. “Available” otherwise. :rtype: str

get_classifier()[source]

Gets the classifier object obtained after the computation performed on the dataset. :return: The classifiers :rtype: ApplePyClassifier

get_current_dataset_index()[source]

Gets the current dataset index. :return: The current dataset index. :rtype: int

get_dataset_name()[source]

Gets the dataset name of the dataset. :return: The dataset name :rtype: str

get_dataset_size()[source]

Gets the size in megabits of the dataset. :return: The size of the dataset. :rtype: float

get_directory_path_from_file_path()[source]

Gets the directory path of the dataset. :return: The directory path of the dataset. :rtype: str

get_envelope_correlation_data()[source]

Gets the data of the envelope correlation computation performed on the dataset. :return: The envelope correlation’s data. :rtype: list of, list of float

get_epochs_end()[source]

Gets the end time of the epochs of the dataset. :return: The end time of the epochs. :rtype: float

get_epochs_start()[source]

Gets the start time of the epochs of the dataset. :return: The start time of the epochs. :rtype: float

get_event_ids()[source]

Gets the event ids present in the dataset. :return: The events’ ids :rtype: dict

get_event_values(index=None)[source]

Gets the events’ information present in the dataset. :param index: The index of the dataset to get the event from. If None, the current dataset index will be taken. :type index: int :return: The events’ information. Each event is represented by a list of 3 elements: First the latency time of the event; Second a “0” for MNE backwards compatibility; Third the event id. :rtype: list of, list of int

get_file_data()[source]

Gets the MNE “Epochs” or “Raw” data of the dataset. :return: The MNE “Epochs” or “Raw” object. :rtype: Epochs/Raw

get_file_path_name()[source]

Gets the file path of the dataset. :return: The file path of the dataset :rtype: str

get_file_path_name_without_extension(index=None)[source]

Gets the file path of the dataset without the extension of the file. :param index: The index of the dataset to get the event from. If None, the current dataset index will be taken. :type index: int :return: The file path of the dataset without the extension. :rtype: str

get_file_type()[source]

Gets the type of the file. :return: The type of the file. :rtype: str

get_ica()[source]

Gets the status of the ICA decomposition of the dataset. :return: “Yes” if it is known by the software that the ICA decomposition has been performed. “No” otherwise. :rtype: str

get_itc()[source]

Gets the “itc” data of the time-frequency analysis computation performed on the dataset. :return: “itc” data of the time-frequency analysis computation. :rtype: MNE.AverageTFR

get_number_of_channels()[source]

Gets the number of channels that are present in the dataset. :return: The number of channels :rtype: int

get_number_of_epochs()[source]

Gets the number of epochs present in the dataset. :return: The number of epochs. 1 for “Raw” type of dataset. :rtype: int

get_number_of_events()[source]

Gets the number of events present in the dataset. :return: The number of events. None for “Raw” type of dataset. :rtype: int/None

get_number_of_frames()[source]

Gets the number of frames of the dataset. The number of frames depend from the start and end times of the epochs and the sampling frequency. :return: The number of frames. :rtype: int

get_power()[source]

Gets the “power” data of the time-frequency analysis computation performed on the dataset. :return: “power” data of the time-frequency analysis computation. :rtype: MNE.AverageTFR

get_psd_fig()[source]

Get the power spectral density’s figure :return: The figure of the actual power spectral density’s data computed :rtype: matplotlib.Figure

get_psd_topo_fig()[source]

Get the power spectral density’s figure fo the topographies :return: The figure of the topographies of the actual power spectral density’s data computed :rtype: matplotlib.Figure

get_psi_data_envelope_correlation()[source]

Get the psi’s data for the envelope correlation. :return: The psi’s data. Or nothing if the psi’s data has not been computed. :rtype: list of, list of float

get_psi_data_source_space()[source]

Get the psi’s data for the source space connectivity. :return: The psi’s data. Or nothing if the psi’s data has not been computed. :rtype: list of, list of float

get_read_events()[source]

Gets the read events obtained after the epochs’ importation. :return: The read events. :rtype: list of int

get_reference()[source]

Gets the references from which the dataset is based. :return: The references. :rtype: list of str/str

get_sampling_frequency()[source]

Gets the sampling frequency of the dataset. :return: The sampling frequency. :rtype: float

get_sensor_space_connectivity_data()[source]

Gets the data of the sensor space connectivity computation performed on the dataset. :return: The sensor space’s data. :rtype: list of, list of float

get_source_estimation_data()[source]

Gets the data of the source estimation computation performed on the dataset. :return: The source estimation’s data. :rtype: MNE.SourceEstimation

get_source_space_connectivity_data()[source]

Gets the data of the source space connectivity computation performed on the dataset. :return: The source space’s data. :rtype: list of, list of float

get_statistics_SNR_methods()[source]

Get the SNR methods used for the computation. :return: SNR methods :rtype: list of str

get_statistics_SNR_t_values()[source]

Get the T-values computed over the SNRs of the two independent variables. :return: T-values computed over the SNRs of the two independent variables. :rtype: list of float

get_statistics_connectivity_data_one()[source]

Gets the data of the envelope correlation computation performed on the dataset of the first independent variable. :return: The envelope correlation’s data. :rtype: list of, list of float

get_statistics_connectivity_data_two()[source]

Gets the data of the envelope correlation computation performed on the dataset of the second independent variable. :return: The envelope correlation’s data. :rtype: list of, list of float

get_statistics_ersp_itc_channel_selected()[source]

Gets the channel used for the computation of the time-frequency analysis performed on the dataset. :return: The channel used for the time-frequency analysis computation. :rtype: list of str

get_statistics_first_SNRs()[source]

Get the SNRs computed over the first independent variable. :return: The SNRs computed over the first independent variable. :rtype: list of, list of float

get_statistics_itc_one()[source]

Gets the “itc” data of the time-frequency analysis computation performed on the dataset of the first independent variable. :return: “itc” data of the time-frequency analysis computation. :rtype: MNE.AverageTFR

get_statistics_itc_two()[source]

Gets the “itc” data of the time-frequency analysis computation performed on the dataset of the second independent variable. :return: “itc” data of the time-frequency analysis computation. :rtype: MNE.AverageTFR

get_statistics_power_one()[source]

Gets the “power” data of the time-frequency analysis computation performed on the dataset of the first independent variable. :return: “power” data of the time-frequency analysis computation. :rtype: MNE.AverageTFR

get_statistics_power_two()[source]

Gets the “power” data of the time-frequency analysis computation performed on the dataset of the second independent variable. :return: “power” data of the time-frequency analysis computation. :rtype: MNE.AverageTFR

get_statistics_psd_fig_one()[source]

Get the power spectral density’s figure of the first independent variable :return: The figure of the actual power spectral density’s data computed :rtype: matplotlib.Figure

get_statistics_psd_fig_two()[source]

Get the power spectral density’s figure of the second independent variable :return: The figure of the actual power spectral density’s data computed :rtype: matplotlib.Figure

get_statistics_psd_topo_fig_one()[source]

Get the power spectral density’s figure of the topographies of the first independent variable :return: The figure of the topographies of the actual power spectral density’s data computed :rtype: matplotlib.Figure

get_statistics_psd_topo_fig_two()[source]

Get the power spectral density’s figure of the topographies of the second independent variable :return: The figure of the topographies of the actual power spectral density’s data computed :rtype: matplotlib.Figure

get_statistics_psi_data_one()[source]

Get the psi’s data for the envelope correlation of the first independent variable. :return: The psi’s data. Or nothing if the psi’s data has not been computed. :rtype: list of, list of float

get_statistics_psi_data_two()[source]

Get the psi’s data for the envelope correlation of the second independent variable. :return: The psi’s data. Or nothing if the psi’s data has not been computed. :rtype: list of, list of float

get_statistics_second_SNRs()[source]

Get the SNRs computed over the second independent variable. :return: The SNRs computed over the second independent variable. :rtype: list of, list of float

get_study()[source]

Gets the study of the datasets selected. :return: The current study :rtype: studyModel

get_study_selected()[source]

Gets the state of the study :return: True if the study is selected, False otherwise. :rtype: bool

get_tfr_channel_selected()[source]

Gets the channel used for the computation of the time-frequency analysis performed on the dataset. :return: The channel used for the time-frequency analysis computation. :rtype: list of str

get_tmp_epochs_end()[source]

Gets the end time of the epochs of the dataset being loaded. :return: The end time of the epochs. :rtype: float

get_tmp_epochs_start()[source]

Gets the start time of the epochs of the dataset being loaded. :return: The start time of the epochs. :rtype: float

ica_data_decomposition(ica_method, index=None)[source]

Creates the parallel runnable for performing the ICA decomposition of the dataset. :param ica_method: Method used for performing the ICA decomposition :type ica_method: str :param index: The index of the dataset of the study. :type index: int

ica_data_decomposition_computation_error()[source]

Notifies the main controller that the computation had an error.

ica_data_decomposition_computation_finished()[source]

Retrieves the data from the runnable when the ICA decomposition is computed. Notifies the main controller that the computation is done.

is_fif_file()[source]

Check if the dataset loaded is loaded from a FIF file. :return: True if the file used is a FIF file, False otherwise. :rtype: boolean

load_data_info(montage, channels_selected, tmin, tmax, dataset_name)[source]

Creates the parallel runnable for setting the additional information for the dataset. :param montage: Montage of the headset :type montage: str :param channels_selected: Channels selected :type channels_selected: list of str :param tmin: Start time of the epoch or raw file to keep :type tmin: float :param tmax: End time of the epoch or raw file to keep :type tmax: float :param dataset_name: The name of the loaded dataset. :type dataset_name: str

load_data_info_computation_finished()[source]

Retrieves the data from the runnable when the last information have been updated. Notifies the main controller that the reading is done.

open_cnt_file(path_to_file)[source]

Creates the parallel runnable for opening a CNT file. :param path_to_file: Path to the file :type path_to_file: str

open_cnt_file_computation_error()[source]

Notifies the main controller that the computation had an error.

open_cnt_file_computation_finished()[source]

Retrieves the data from the runnable when the CNT file has been opened. Notifies the main controller that the reading is done.

open_fif_file(path_to_file)[source]

Creates the parallel runnable for opening a FIF file. :param path_to_file: Path to the file :type path_to_file: str

open_fif_file_computation_error()[source]

Notifies the main controller that the computation had an error.

open_fif_file_computation_finished()[source]

Retrieves the data from the runnable when the FIF file has been opened. Notifies the main controller that the reading is done.

open_set_file(path_to_file)[source]

Creates the parallel runnable for opening a SET file. :param path_to_file: Path to the file :type path_to_file: str

open_set_file_computation_error()[source]

Notifies the main controller that the computation had an error.

open_set_file_computation_finished()[source]

Retrieves the data from the runnable when the SET file has been opened. Notifies the main controller that the reading is done.

power_spectral_density(minimum_frequency, maximum_frequency, minimum_time, maximum_time, topo_time_points)[source]

Creates the parallel runnable for computing the power spectral density. :param minimum_frequency: Minimum frequency from which the power spectral density will be computed. :type minimum_frequency: float :param maximum_frequency: Maximum frequency from which the power spectral density will be computed. :type maximum_frequency: float :param minimum_time: Minimum time of the epochs from which the power spectral density will be computed. :type minimum_time: float :param maximum_time: Maximum time of the epochs from which the power spectral density will be computed. :type maximum_time: float :param topo_time_points: The time points for the topomaps. :type topo_time_points: list of float

power_spectral_density_computation_error()[source]

Notifies the main controller that an error has occurred during the computation

power_spectral_density_computation_finished()[source]

Notifies the main controller that the computation is done.

re_referencing(references, save_data, load_data, n_jobs, index=None)[source]

Creates the parallel runnable for performing a re-referencing. :param references: References from which the data will be re-referenced. Can be a single or multiple channels; Can be an average of all channels; Can be a “point to infinity”. :type references: list of str; str :param save_data: Boolean telling if the data computed must be saved into files. :type save_data: bool :param load_data: Boolean telling if the data used for the computation can be read from computer files. :type load_data: bool :param n_jobs: Number of parallel processes used to compute the re-referencing :type n_jobs: int :param index: The index of the dataset of the study. :type index: int

re_referencing_computation_error()[source]

Notifies the main controller that the computation had an error.

re_referencing_computation_finished()[source]

Retrieves the data from the runnable when the re-referencing is computed. Notifies the main controller that the computation is done.

read_events_file(path_to_file)[source]

Read an events file provided. This events file must be a FIF or a TXT file. The FIF files are provided when exporting an event file from MNE or MNE_Vision The TXT files are file where each line is of the form ” :param path_to_file: Path to the file :type path_to_file: str

resampling(new_frequency, index=None)[source]

Creates the parallel runnable for performing a resampling. :param new_frequency: The new frequency at which the data will be resampled. :type new_frequency: int :param index: The index of the dataset of the study. :type index: int

resampling_computation_error()[source]

Notifies the main controller that the computation had an error.

resampling_computation_finished()[source]

Retrieves the data from the runnable when the resampling is computed. Notifies the main controller that the computation is done.

reset_tmp_attributes()[source]

Resets the temporary variable when a new dataset is completely loaded.

save_file(path_to_file)[source]

Saves the dataset into a FIF file, which is the extension of MNE. If the dataset is already a FIF file, overwrite it, otherwise create a new one. The name of the dataset will be the same as the previous one, but will have a FIF extension and will follow MNE conventions for file naming. :param path_to_file: Path to the file. :type path_to_file: str

save_file_as(path_to_file)[source]

Saves the dataset into a FIF file, which is the extension of MNE. The name of the dataset will be the one provided by the user, but will have a FIF extension and will follow MNE conventions for file naming. :param path_to_file: Path to the file. :type path_to_file: str

sensor_space_connectivity(export_path)[source]

Creates the parallel runnable for computing the connectivity of the sensor space of the dataset. :param export_path: Path where the sensor space connectivity data will be stored. :type export_path: str

sensor_space_connectivity_computation_error()[source]

Notifies the main controller that the computation had an error.

sensor_space_connectivity_computation_finished()[source]

Notifies the main controller that the computation is done.

set_channel_locations(channel_locations, channel_names)[source]

Sets the channels’ locations inside the MNE “Epochs” or “Raw” object of the dataset. From the simpler format present in the “self.channels_location” attribute, creates a list of the form of the one used by MNE. :param channel_locations: The channels’ locations. :type channel_locations: dict :param channel_names: The channels’ names :type channel_names: list of str

set_channel_names(channel_names)[source]

Sets the channels’ names inside the MNE “Epochs” or “Raw” object of the dataset. :param channel_names: The channels’ names. :type channel_names: list of str

set_current_dataset_index(index_selected)[source]

Sets the current dataset index of the currently selected dataset. :param index_selected: The index of the currently selected dataset. :type index_selected: int

set_event_ids(event_ids)[source]

Sets the events’ ids for the dataset. :param event_ids: The events’ ids. :type event_ids: dict

set_event_values(event_values, index=None)[source]

Sets the values of the events for the dataset. :param event_values: The event values :type event_values: list of, list of int :param index: The index of the dataset to set the event. If None, the current dataset index will be taken. :type index: int

set_listener(listener)[source]

Sets the main listener for the class that will be used for communications and send data. :param listener: The main listener :type listener: MainController

set_reference(channels_selected)[source]

Sets the reference of the dataset. :param channels_selected: The channels’ names. :type channels_selected: list of str

set_study_selected()[source]

Sets the selection of the study to True.

signal_to_noise_ratio(snr_methods, source_method, read, write, picks, trials_selected)[source]

Creates the parallel runnable for computation of the SNR of a dataset.

snr_computation_error()[source]

Notifies the main controller that the computation had an error.

snr_computation_finished()[source]

Retrieves the data from the runnable when the SNR is computed. Notifies the main controller that the computation is done.

source_estimation(source_estimation_method, save_data, load_data, epochs_method, trials_selected, tmin, tmax, n_jobs, export_path)[source]

Creates the parallel runnable for computing the source estimation of the data. :param source_estimation_method: The method used to compute the source estimation :type source_estimation_method: str :param save_data: Boolean telling if the data computed must be saved into files. :type save_data: bool :param load_data: Boolean telling if the data used for the computation can be read from computer files. :type load_data: bool :param epochs_method: On what data the source estimation will be computed. Can be three values : - “single trial” : Compute the source estimation on a single trial that is precised. - “evoked” : Compute the source estimation on the average of all the signals. - “averaged” : Compute the source estimation on every trial, and then compute the average of them. :type: str :param trials_selected: The indexes of the trials selected for the computation :type trials_selected: list of int :param tmin: Start time of the epoch or raw file :type tmin: float :param tmax: End time of the epoch or raw file :type tmax: float :param n_jobs: Number of processes used to compute the source estimation :type n_jobs: int :param export_path: Path where the source estimation data will be stored. :type export_path: str

source_estimation_computation_error()[source]

Notifies the main controller that the computation had an error.

source_estimation_computation_finished()[source]

Notifies the main controller that the computation is done.

source_space_connectivity(connectivity_method, spectrum_estimation_method, source_estimation_method, save_data, load_data, n_jobs, export_path, psi, fmin, fmax)[source]

Creates the parallel runnable for computing the connectivity inside the source space of the dataset. :param connectivity_method: Method used for computing the source space connectivity. :type connectivity_method: str :param spectrum_estimation_method: Method used for computing the spectrum estimation used inside the computation of the source space connectivity. :type spectrum_estimation_method: str :param source_estimation_method: Method used for computing the source estimation used inside the computation of the source space connectivity. :type source_estimation_method: str :param save_data: Boolean telling if the data computed must be saved into files. :type save_data: bool :param load_data: Boolean telling if the data used for the computation can be read from computer files. :type load_data: bool :param n_jobs: Number of processes used to computed the source estimation :type n_jobs: int :param export_path: Path where the source space connectivity data will be stored. :type export_path: str :param psi: Check if the computation of the Phase Slope Index must be done. The PSI give an indication to the directionality of the connectivity. :type psi: bool :param fmin: Minimum frequency from which the envelope correlation will be computed. :type fmin: float :param fmax: Maximum frequency from which the envelope correlation will be computed. :type fmax: float

source_space_connectivity_computation_error()[source]

Notifies the main controller that the computation had an error.

source_space_connectivity_computation_finished()[source]

Notifies the main controller that the computation is done.

statistics_connectivity(psi, fmin, fmax, connectivity_method, n_jobs, export_path, stats_first_variable, stats_second_variable)[source]

Creates the parallel runnable for computing the envelope correlation between the channels of the dataset. :param psi: Check if the computation of the Phase Slope Index must be done. The PSI give an indication to the directionality of the connectivity. :type psi: bool :param fmin: Minimum frequency from which the envelope correlation will be computed. :type fmin: float :param fmax: Maximum frequency from which the envelope correlation will be computed. :type fmax: float :param connectivity_method: Method used for computing the source space connectivity. :type connectivity_method: str :param n_jobs: Number of processes used to compute the source estimation :type n_jobs: int :param export_path: Path where the envelope correlation data will be stored. :type export_path: str :param stats_first_variable: The first independent variable on which the statistics must be computed (an event id) :type stats_first_variable: str :param stats_second_variable: The second independent variable on which the statistics must be computed (an event id) :type stats_second_variable: str

statistics_connectivity_computation_error()[source]

Notifies the main controller that an error has occurred during the computation

statistics_connectivity_computation_finished()[source]

Notifies the main controller that the computation of the envelope correlation is done.

statistics_ersp_itc(method_tfr, channel_selected, min_frequency, max_frequency, n_cycles, stats_first_variable, stats_second_variable)[source]

Creates the parallel runnable for computing a time-frequency analysis of the data. :param method_tfr: Method used for computing the time-frequency analysis. :type method_tfr: str :param channel_selected: Channel on which the time-frequency analysis will be computed. :type channel_selected: str :param min_frequency: Minimum frequency from which the time-frequency analysis will be computed. :type min_frequency: float :param max_frequency: Maximum frequency from which the time-frequency analysis will be computed. :type max_frequency: float :param n_cycles: Number of cycles used by the time-frequency analysis for his computation. :type n_cycles: int :param stats_first_variable: The first independent variable on which the statistics must be computed (an event id) :type stats_first_variable: str :param stats_second_variable: The second independent variable on which the statistics must be computed (an event id) :type stats_second_variable: str

statistics_ersp_itc_computation_error()[source]

Notifies the main controller that the computation had an error.

statistics_ersp_itc_computation_finished()[source]

Notifies the main controller that the computation is done.

statistics_psd(minimum_frequency, maximum_frequency, minimum_time, maximum_time, topo_time_points, channel_selected, stats_first_variable, stats_second_variable)[source]

Creates the parallel runnable for computing the power spectral density. :param minimum_frequency: Minimum frequency from which the power spectral density will be computed. :type minimum_frequency: float :param maximum_frequency: Maximum frequency from which the power spectral density will be computed. :type maximum_frequency: float :param minimum_time: Minimum time of the epochs from which the power spectral density will be computed. :type minimum_time: float :param maximum_time: Maximum time of the epochs from which the power spectral density will be computed. :type maximum_time: float :param topo_time_points: The time points for the topomaps. :type topo_time_points: list of float :param channel_selected: Channel selected for the ERP. :type channel_selected: str :param stats_first_variable: The first independent variable on which the statistics must be computed (an event id) :type stats_first_variable: str :param stats_second_variable: The second independent variable on which the statistics must be computed (an event id) :type stats_second_variable: str

statistics_psd_computation_error()[source]

Notifies the main controller that an error has occurred during the computation

statistics_psd_computation_finished()[source]

Notifies the main controller that the computation is done.

statistics_snr(snr_methods, source_method, read, write, picks, stats_first_variable, stats_second_variable)[source]

Creates the parallel runnable for computing the SNR and statistics on it. :param snr_methods: The methods used for computing the SNR :type snr_methods: list of str :param source_method: The method used for computing the source estimation :type source_method: str :param read: Boolean telling if the data used for the computation can be read from computer files. :type read: bool :param write: Boolean telling if the data computed must be saved into files. :type write: bool :param picks: The list of channels selected used for the computation :type picks: list of str :param stats_first_variable: The first independent variable on which the statistics must be computed (an event id) :type stats_first_variable: str :param stats_second_variable: The second independent variable on which the statistics must be computed (an event id) :type stats_second_variable: str

statistics_snr_computation_error()[source]

Notifies the main controller that the computation had an error.

statistics_snr_computation_finished()[source]

Retrieves the data from the runnable when the SNR and the statistics is computed. Notifies the main controller that the computation is done.

time_frequency(method_tfr, channel_selected, min_frequency, max_frequency, n_cycles)[source]

Creates the parallel runnable for computing a time-frequency analysis of the data. :param method_tfr: Method used for computing the time-frequency analysis. :type method_tfr: str :param channel_selected: Channel on which the time-frequency analysis will be computed. :type channel_selected: str :param min_frequency: Minimum frequency from which the time-frequency analysis will be computed. :type min_frequency: float :param max_frequency: Maximum frequency from which the time-frequency analysis will be computed. :type max_frequency: float :param n_cycles: Number of cycles used by the time-frequency analysis for his computation. :type n_cycles: int

time_frequency_computation_error()[source]

Notifies the main controller that the computation had an error.

time_frequency_computation_finished()[source]

Notifies the main controller that the computation is done.

try_finding_events()[source]

Try to find the events if a raw file as been loaded.

src.main_view module

Main view

class src.main_view.mainView[source]

Bases: PyQt5.QtWidgets.QMainWindow

clear_display()[source]

Clear the display when no dataset is loaded.

create_display()[source]

Create the display of the main window.

create_study_display()[source]

Create the display of the study_creation on the main window.

display_info(all_info)[source]

Display the information on the main screen. :param all_info: All the information to display. :type all_info: list of str/int/float/list

display_study_info(all_info)[source]

Display the information of the study_creation on the main screen. :param all_info: All the information to display. :type all_info: list of str/int/float/list

get_export_path()[source]

Get the path to the file when wanting to export the events. :return: The path to the file. :rtype: str

get_save_path()[source]

Get the path to the file when wanting to save the dataset. :return: The path to the file. :rtype: str

static plot_channel_locations(file_data)[source]

Plot the channels’ location. :param file_data: “Epochs” or “Raw” MNE file containing the information about the dataset. :type file_data: MNE_Epochs/MNE_Raw

static plot_data(file_data, file_type, events=None, event_id=None)[source]

plot the data of all channels. :param file_data: “Epochs” or “Raw” MNE file containing the information about the dataset. :type file_data: MNE_Epochs/MNE_Raw :param file_type: The type of the file, either “Epochs” or “Raw” :type file_type: str :param events: Event values :type events: list of, list of int :param event_id: Event ids :type event_id: dict

static plot_erp_image(file_data, channel_selected)[source]

Plot the ERP image. :param file_data: “Epochs” or “Raw” MNE file containing the information about the dataset. :type file_data: MNE_Epochs/MNE_Raw :param channel_selected: Channel selected :type channel_selected: str

static plot_erps(file_data, channels_selected)[source]

Plot the ERPs. :param file_data: “Epochs” or “Raw” MNE file containing the information about the dataset. :type file_data: MNE_Epochs/MNE_Raw :param channels_selected: Channels selected. :type channels_selected: list of str

static plot_topographies(file_data, time_points, mode)[source]

Plot the topographies. :param file_data: “Epochs” or “Raw” MNE file containing the information about the dataset. :type file_data: MNE_Epochs/MNE_Raw :param time_points: Time points at which the topographies will be plotted. :type time_points: list of float :param mode: Mode used for plotting the topographies. :type mode: str

static setup_mne_backends()[source]

Set the 2D and 3D backends that will be used by MNE for the plots.

update_dataset_name(dataset_name)[source]

Update the dataset name on the main window. :param dataset_name: The dataset name. :type dataset_name: str

update_dataset_size(dataset_size)[source]

Update the dataset size on the main window. :param dataset_size: The dataset size. :type dataset_size: float

update_epoch_end(epoch_end)[source]

Update the epochs end time on the main window. :param epoch_end: The epochs end time. :type epoch_end: float

update_epoch_start(epoch_start)[source]

Update the epochs start time on the main window. :param epoch_start: The epochs start time. :type epoch_start: float

update_file_type(file_type)[source]

Update the file type on the main window. :param file_type: File type, either “Epochs” or “Raw”. :type file_type: str

update_ica_decomposition(ica_status)[source]

Update the ICA decomposition status on the main window. :param ica_status: The ICA decomposition status. :type ica_status: str

update_number_of_epochs(number_of_epochs)[source]

Update the number of epochs on the main window. :param number_of_epochs: The number of epochs. :type number_of_epochs: int

update_number_of_events(number_of_events)[source]

Update the number of events on the main window. :param number_of_events: The number of events. :type number_of_events: int

update_number_of_frames(number_of_frames)[source]

Update the number of frames on the main window. :param number_of_frames: The number of frames. :type number_of_frames: int

update_path_to_file(path_to_file)[source]

Update the path to the file on the main window. :param path_to_file: Path to the file :type path_to_file: str

update_reference(references)[source]

Update the references on the main window. :param references: The references. :type references: str/list of str

update_sampling_frequency(frequency)[source]

Update the sampling frequency on the main window. :param frequency: The frequency :type frequency: float

Module contents