src.utils.model package¶
Submodules¶
src.utils.model.study_model module¶
Study Model
-
class
src.utils.model.study_model.
studyModel
(study_name, task_name, dataset_names, dataset_indexes, subjects, sessions, runs, conditions, groups)[source]¶ Bases:
object
-
static
adapt_events
(all_file_data)[source]¶ Adapts the events on all the epochs so that they are all common and the epochs can thus be concatenated. :param all_file_data: The epochs on which the events must be adapted. :type all_file_data: list of MNE Epochs :return: The new epochs with the events adapted for concatenation :rtype: list of MNE Epochs
-
check_file_type_all_epochs
(all_file_type)[source]¶ Check if all the file type in the study are epochs. :param all_file_type: All the file type of each dataset loaded. :type all_file_type: list of str :return: True if all datasets are epoched, False otherwise. :rtype: bool
-
get_channel_locations
()[source]¶ Gets the channel location status that is present in the study. :return: The status of the channel location :rtype: str
-
get_channel_names
()[source]¶ Gets the channel names. :return: The channel names of the datasets in the study. :rtype: list of str
-
get_conditions
()[source]¶ Gets the conditions :return: The conditions assigned to each dataset in the study :rtype: list of str
-
get_dataset_indexes
()[source]¶ Gets the dataset indexes :return: The indexes of the datasets selected to be in the study :rtype: list of int
-
get_epochs_consistency
()[source]¶ Gets the epochs’ consistency, if one of the dataset has different epochs times, the consistency will be false. :return: The epochs’ consistency. :rtype: bool
-
get_groups
()[source]¶ Gets the groups :return: The groups assigned to each dataset in the study :rtype: list of 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 study. :return: The number of channels :rtype: int
-
get_number_of_conditions
()[source]¶ Gets the number of different conditions in the study :return: The number of conditions :rtype: int
-
get_number_of_groups
()[source]¶ Gets the number of different groups in the study :return: The number of groups :rtype: int
-
get_number_of_sessions
()[source]¶ Gets the number of different sessions in the study :return: The number of sessions :rtype: int
-
get_number_of_subjects
()[source]¶ Gets the number of different subjects in the study :return: The number of subjects :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_runs
()[source]¶ Gets the runs :return: The runs assigned to each dataset in the study :rtype: list of str
-
get_selected_file_data
()[source]¶ Gets the selected file data in the study :return: The selected file data. :rtype: list of MNE Epochs/Raw
-
get_selected_file_data_with_subjects
(subjects_selected)[source]¶ Gets the selected file data in the study in function of the subjects selected. :return: The selected file data. :rtype: list of MNE Epochs/Raw
-
get_sessions
()[source]¶ Gets the sessions :return: The sessions assigned to each dataset in the study :rtype: list of str
-
get_size
()[source]¶ Gets the size in megabits of the study. :return: The size of the study. :rtype: float
-
get_subjects
()[source]¶ Gets the subjects :return: The subjects assigned to each dataset in the study :rtype: list of str
-
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_unique_subjects
()[source]¶ Gets only one copy of each subject. :return: The subjects assigned to each dataset in the study :rtype: list of str
-
plot_ersp_itc
(channels_selected, subjects_selected, method_tfr, min_frequency, max_frequency, n_cycles)[source]¶ Plot the ERSP and ITC for the dataset of the study with the channels and subjects selected. :param channels_selected: Channels selected :type channels_selected: str/list of str :param subjects_selected: Subjects selected :type subjects_selected: str/list of str :param method_tfr: Method used for computing the time-frequency analysis. :type method_tfr: 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_psd
(channels_selected, subjects_selected, minimum_frequency, maximum_frequency, minimum_time, maximum_time, topo_time_points)[source]¶ Plot the PSD for the dataset of the study with the channels and subjects selected. :param channels_selected: Channels selected :type channels_selected: str/list of str :param subjects_selected: Subjects selected :type subjects_selected: str/list of str :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.
-
set_conditions
(conditions)[source]¶ Sets the conditions for each dataset. :param conditions: The conditions assigned to each dataset in the study :type conditions: list of str
-
set_groups
(groups)[source]¶ Sets the groups for each dataset. :param groups: The groups assigned to each dataset in the study :type groups: list of str
-
set_listener
(listener)[source]¶ Set the main listener so that the controller is able to communicate with the main controller. :param listener: main listener :type listener: mainModel
-
set_runs
(runs)[source]¶ Sets the runs for each dataset. :param runs: The runs assigned to each dataset in the study :type runs: list of str
-
set_sessions
(sessions)[source]¶ Sets the sessions for each dataset. :param sessions: The sessions assigned to each dataset in the study :type sessions: list of str
-
set_study_listener
(listener)[source]¶ Set the study listener so that the model is able to communicate with the study controller. :param listener: study plot listener :type listener: studyPlotsListener
-
set_study_name
(study_name)[source]¶ Sets the name of the study. :param study_name: The name of the study :type study_name: str
-
set_subjects
(subjects)[source]¶ Sets the subjects for each dataset. :param subjects: The subjects assigned to each dataset in the study :type subjects: list of str
-
set_task_name
(task_name)[source]¶ Sets the task name. :param task_name: The name of the task linked to the study :type task_name: str
-
static