macro_eeg_model.simulation.global_simulation

macro_eeg_model.simulation.global_simulation#

Classes#

GlobalSimulation

A class responsible for orchestrating the entire simulation process.

Module Contents#

class macro_eeg_model.simulation.global_simulation.GlobalSimulation(config)[source]#

A class responsible for orchestrating the entire simulation process. It integrates the development of a stationary model, the simulation of EEG data, data processing, and data analysis.

The class uses: - src.simulation.stationary_model_developer.StationaryModelDeveloper to create a stationary model from the provided configuration. - src.simulation.simulator.Simulator to generate synthetic EEG data based on the model. - src.simulation.data_processor.DataProcessor to filter and segment the simulated data. - src.simulation.eeg_analyzer.EEGAnalyzer to calculate and plot the power spectrum of the EEG data. - src.simulation.simulation_info.SimulationInfo to save the simulation results.

__init__(config)[source]#

Initializes the GlobalSimulation class with the provided configuration.

Parameters:

config (ModelConfig) – The configuration object containing parameters for the simulation (instance of the src.config.model_config.ModelConfig class).

run(save_data=False, make_plots=False, verbose=False, simulation_name=None)[source]#

Runs the global simulation process, including model development, data simulation, processing, analysis, and optional saving/plotting.

Parameters:
  • save_data (bool, optional) – If True, saves the simulation results (default is False).

  • make_plots (bool, optional) – If True, generates and saves plots of the connectivity and power spectrum (default is False).

  • verbose (bool, optional) – If True, displays progress bars and detailed information during the simulation (default is False).

  • simulation_name (str, optional) – The name of the simulation, used for saving the results (default is None).

Returns:

A tuple containing:

  • simulation_data (numpy.ndarray): The simulated EEG data.

  • frequencies (numpy.ndarray): The array of frequencies corresponding to the power spectrum.

  • power (numpy.ndarray): The power spectrum of the simulated EEG data.

Return type:

tuple