pandora2d.multiscale.check_configuration ======================================== .. py:module:: pandora2d.multiscale.check_configuration .. autoapi-nested-parse:: This module contains functions allowing to check the configuration given to MVP pipeline. Attributes ---------- .. autoapisummary:: pandora2d.multiscale.check_configuration.multiscale_configuration_schema pandora2d.multiscale.check_configuration.pandora2d_configuration_schema pandora2d.multiscale.check_configuration.default_configuration_multiscale Functions --------- .. autoapisummary:: pandora2d.multiscale.check_configuration.tiff_area pandora2d.multiscale.check_configuration.get_tif_files_list pandora2d.multiscale.check_configuration.get_tif_shape_list pandora2d.multiscale.check_configuration.is_repository_with_tif_file pandora2d.multiscale.check_configuration.is_json_file pandora2d.multiscale.check_configuration.check_pyramid_repositories pandora2d.multiscale.check_configuration.check_mask_pyramid_repositories pandora2d.multiscale.check_configuration.get_multiscale_config pandora2d.multiscale.check_configuration.check_multiscale_section pandora2d.multiscale.check_configuration.get_pandora2d_config pandora2d.multiscale.check_configuration.check_pandora2d_section pandora2d.multiscale.check_configuration.update_pyramid_configuration pandora2d.multiscale.check_configuration.check_conf Module Contents --------------- .. py:function:: tiff_area(file_path: Union[pathlib.Path, str]) -> int Return tiff area for a given tif file_path :param file_path: path to tif file :return: tif area width*height .. py:function:: get_tif_files_list(path: pathlib.Path) -> List[pathlib.Path] Return list of tif files in pyramid repository sorted by file area :param path: path to pyramid repository :return: list of tif files sorted by size (width*height) .. py:function:: get_tif_shape_list(tif_files_list: List[pathlib.Path]) -> List[Tuple] Return list of tif files shape (height, width) :param tif_files_list: list of path to tif files :return: list of shape (height, width) for each tif file in tif_files_list .. py:function:: is_repository_with_tif_file(path: Union[os.PathLike, str]) -> bool Check if the given path leads to a repository containing at least one readable tif file. :param path: path to a repository :return: whether the path refers to a valid repository or not .. py:function:: is_json_file(path: Union[str, pathlib.Path]) -> bool Check if the given path refers to a JSON file. :param path: path to a JSON file :return: whether the path refers to a JSON file or not .. py:function:: check_pyramid_repositories(first_pyramid_path: Union[str, pathlib.Path], second_pyramid_path: Union[str, pathlib.Path]) Check if first and second pyramid repositories contain the same number of tif files. Check if tif files have correct suffix. This method is used to check that the left and right image pyramids contain the same number of images, and that, if masks are specified, there are as many masks as there are images in the pyramids. :param first_pyramid_path: path to first pyramid repository :param second_pyramid_path: path to second pyramid repository .. py:function:: check_mask_pyramid_repositories(user_cfg: Dict) -> None Check if mask pyramid repository contains the same number of tif files as image pyramid repository. Check if tif files have correct suffix. :param user_cfg: user configuration .. py:function:: get_multiscale_config(user_cfg: Dict[str, dict]) -> Dict[str, dict] Get the multiscale configuration :param user_cfg: user configuration :return cfg: partial configuration .. py:function:: check_multiscale_section(user_cfg) -> Dict[str, dict] Check multiscale section of configuration :param user_cfg: user configuration :return: cfg: checked multiscale configuration .. py:function:: get_pandora2d_config(user_cfg: Dict[str, dict]) -> Dict[str, dict] Get the pandora2d configuration :param user_cfg: user configuration :return cfg: partial configuration .. py:function:: check_pandora2d_section(user_cfg) -> None Check pandora2d section of configuration :param user_cfg: user configuration :return: cfg: checked pandora2d configuration .. py:function:: update_pyramid_configuration(cfg_multiscale: Dict) -> None Update pyramid configurations with list of tif files sorted by ascending size instead of path to pyramid repository. :param cfg_multiscale: multiscale configuration .. py:function:: check_conf(user_cfg: Dict) -> Dict[str, dict] Check multiscale configuration :param user_cfg: user configuration :return: cfg: checked multiscale configuration .. py:data:: multiscale_configuration_schema .. py:data:: pandora2d_configuration_schema .. py:data:: default_configuration_multiscale