MSPInitializer

import with:

from mspypeline import MSPInitializer
class mspypeline.MSPInitializer(path, file_path_yml=None, loglevel=10)
An initializer class which is responsible for creating the directory to save the default YAML configuration file as well as reading and saving the specified settings.
The initializer also operates as a means of passing stored configurations to the plotter classes.
__init__(path, file_path_yml=None, loglevel=10)
Parameters
  • path (str) – location where the directory/txt folder to the data can be found.

  • file_path_yml (Optional[str]) – path to the yaml config file

  • loglevel – level of the logger

configs = None

configurations for the run. also saved configurations for the reader under the respective reader name

property file_path_yaml

Setting the yaml file path will set the configurations of the class to the ones specified in the file.

Note

The value can be set to either:

  • “default”

  • “file”

  • a path to a yml file

Raises
  • ValueError – if no valid value was provided

  • FileNotFoundError – if the file specified by the file_path_yml was not found

init_config()
Creates the directory to save the configuration file if not present, updates and saves the configuration.
The function is usually applied to ensure that configs are provided to the initializer in order to avoid problems initializing the file reader with read_data().
read_data()
Initiates the file reader by providing the directory and the configs to the reader.
The configs for the reader are taken from the configs from the name of the reader as key. E.g. mqreader.
In turn a DataDict is generated to provide the mapping to the input data (reader_data) for the further analysis with the mspypeline plotters.