mdse.visualizeDB.read_dataDB
This module handles reading simulation data for visualization.
It supports reading data from different sources, such as JSON files or a MongoDB database, based on the provided configuration.
Functions
|
Gets number of defects |
|
Checks if there is a vacancy. |
|
Reads simulation data from a specified source (.json or mongoDB). |
- mdse.visualizeDB.read_dataDB.get_def_size(def_type)
Gets number of defects
- mdse.visualizeDB.read_dataDB.get_vacancy(def_type)
Checks if there is a vacancy. Returns nr of vac
- mdse.visualizeDB.read_dataDB.read_data(config_data)
Reads simulation data from a specified source (.json or mongoDB).
This function dispatches to the correct data reading method based on the ‘data_source’ key in the configuration dictionary.
- Parameters:
config_data (dict) – Configuration specifying the data source, location, and other necessary parameters.
- Returns:
A list of dictionaries, where each dictionary contains the data for a single simulation.
- Return type:
list[dict]
- Raises:
RuntimeError – If the configuration is invalid, the specified file is not found, or the data cannot be parsed.
NotImplementedError – If the ‘mongo’ data source is selected.