:py:mod:`mlair.configuration` ============================= .. py:module:: mlair.configuration .. autoapi-nested-parse:: Collection of configuration functions, paths and classes. Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 defaults/index.rst era5_settings/index.rst ifs_settings/index.rst join_settings/index.rst path_config/index.rst snapshot_names/index.rst toar_data_v2_settings/index.rst Package Contents ---------------- Functions ~~~~~~~~~ .. autoapisummary:: mlair.configuration.prepare_host mlair.configuration.set_experiment_name mlair.configuration.set_bootstrap_path mlair.configuration.check_path_and_create mlair.configuration.get_host mlair.configuration.set_experiment_path Attributes ~~~~~~~~~~ .. autoapisummary:: mlair.configuration.ROOT_PATH .. py:data:: ROOT_PATH .. py:function:: prepare_host(create_new=True, data_path=None) -> str Set up host path. INFO: This functions is designed to handle known hosts. For proper working, please add your hostname hardcoded here. Otherwise parse your custom data_path in kwargs. If data_path is provided, hardcoded paths for known hosts will be ignored! :param create_new: Create new path if enabled :param data_path: Parse your custom path (and therefore ignore preset paths fitting to known hosts) :return: full path to data .. py:function:: set_experiment_name(name: str = None, sampling: Union[str, tuple] = None) -> str Set name of experiment and its path. * Experiment name is set to `TestExperiment` if not provided. If a name is given, this string is expanded by suffix `_network`. Experiment name is always expanded by `_` as ending suffix if sampling is given. :param name: custom experiment name :param sampling: sampling rate as string to add to experiment name :return: experiment name .. py:function:: set_bootstrap_path(bootstrap_path: str, data_path: str) -> str Set path for bootstrap input data. Either use given bootstrap_path or create additional folder in same directory like data path. :param bootstrap_path: custom path to store bootstrap data :param data_path: path of data for default bootstrap path :return: full bootstrap path .. py:function:: check_path_and_create(path: str, remove_existing: bool = False) -> None Check a given path and create if not existing. :param path: path to check and create :param remove_existing: if set to true an existing folder is removed and replaced by a new one (default False). .. py:function:: get_host() .. py:function:: set_experiment_path(name: str, path: str = None) -> str Set name of experiment and its path. * Experiment path is set to `/` if provided or `ROOT_PATH/` otherwise :param name: custom experiment name :param path: custom experiment path :return: full experiment path