macro_eeg_model.evaluation.simulation_data_extractor#
Classes#
The SimulationDataExtractor class is responsible for extracting and processing simulation data. |
Module Contents#
- class macro_eeg_model.evaluation.simulation_data_extractor.SimulationDataExtractor[source]#
The SimulationDataExtractor class is responsible for extracting and processing simulation data. It organizes the data by nodes and simulations, allowing for easy access to both raw and processed data.
- nodes#
An array of node names used in the simulations.
- Type:
numpy.ndarray
- simulation_names#
A list of simulation names.
- Type:
list
- sample_rates#
A dictionary mapping simulation names to their corresponding sample rates.
- Type:
dict
- simulations_data_per_node#
A dictionary organizing the processed simulation data by node.
- Type:
dict
- simulations_power_per_node#
A dictionary organizing the processed power spectra by node.
- Type:
dict
- simulations_epoched_power_per_node#
A dictionary organizing the processed epoched power spectra by node.
- Type:
dict
- __init__()[source]#
Initializes the SimulationDataExtractor by loading and processing the simulation data using methods from this class.
- _get_simulations_data_per_node(processed_simulations_data)[source]#
Organizes the processed simulation data by node and then simulation name.
- Parameters:
processed_simulations_data (dict) – The dictionary containing processed simulation data organized by simulation name and then node.
- Returns:
A dictionary organizing the simulation data by node and then simulation name.
- Return type:
dict
- _get_simulations_epoched_power_per_node(processed_simulations_epoched_power)[source]#
Organizes the processed epoched power spectra by node and then simulation name.
- Parameters:
processed_simulations_epoched_power (dict) – The dictionary containing processed epoched power spectra organized by simulation name and then node.
- Returns:
A dictionary organizing the epoched power spectra by node and then simulation name.
- Return type:
dict
- _get_processed_simulations_epoched_power(simulations_info, epoch_len=1000)[source]#
Processes and organizes the epoched power spectra data by simulation name and then node.
- Parameters:
simulations_info (dict) – A dictionary containing simulation information objects.
epoch_len (int, optional) – The length of each epoch in milliseconds (default is 1000).
- Returns:
A dictionary organizing the processed epoched power spectra data by simulation name and then node.
- Return type:
dict
- _get_simulations_power_per_node(processed_simulations_power)[source]#
Organizes the processed power spectra by node and then simulation name.
- Parameters:
processed_simulations_power (dict) – The dictionary containing processed power spectra organized by simulation name and then node.
- Returns:
A dictionary organizing the power spectra by node and then simulation name.
- Return type:
dict
- _get_processed_simulations_power(simulations_info)[source]#
Processes and organizes the power spectra data by simulation name and then node.
- Parameters:
simulations_info (dict) – A dictionary containing simulation information objects.
- Returns:
A dictionary organizing the processed power spectra data by simulation name and then node.
- Return type:
dict
- _get_processed_simulations_data(simulations_info)[source]#
Processes and organizes the raw simulation data by simulation name and then node.
- Parameters:
simulations_info (dict) – A dictionary containing simulation information objects.
- Returns:
A dictionary organizing the processed simulation data by simulation name and then node.
- Return type:
dict
- _get_simulations_info()[source]#
Loads simulation information from saved files in the directories within the output path (see
src.utils.paths.Paths) usingsrc.simulation.simulation_info.SimulationInfo.load_simulation_info(). and checks for consistency in node names.- Returns:
A tuple containing:
simulations_info (dict): A dictionary of SimulationInfo objects keyed by simulation name.
sample_rates (dict): A dictionary of sample rates keyed by simulation name.
- Return type:
tuple
- Raises:
AssertionError – If the nodes in any simulation do not match the expected node names.