demcompare.helpers_init ======================= .. py:module:: demcompare.helpers_init .. autoapi-nested-parse:: This is where high level parameters are checked and default options are set Functions --------- .. autoapisummary:: demcompare.helpers_init.make_relative_path_absolute demcompare.helpers_init.read_config_file demcompare.helpers_init.save_config_file demcompare.helpers_init.compute_initialization demcompare.helpers_init.check_input_parameters demcompare.helpers_init.check_dem_processing_methods demcompare.helpers_init.check_curvature_slope demcompare.helpers_init.get_output_files_paths Module Contents --------------- .. py:function:: make_relative_path_absolute(path, directory) If path is a valid relative path with respect to directory, returns it as an absolute path :param path: The relative path :type path: string :param directory: The directory path should be relative to :type directory: string :return: os.path.join(directory,path) if path is a valid relative path form directory, else path :rtype: string .. py:function:: read_config_file(config_file: str) -> demcompare.internal_typing.ConfigType Read a demcompare input json config file. Relative paths will be made absolute. :param config_file: Path to json file :type config_file: str :return: The json dictionary read from file with absolute paths :rtype: ConfigType .. py:function:: save_config_file(config_file: str, config: demcompare.internal_typing.ConfigType) Save a json configuration file :param config_file: path to a json file :type config_file: string :param config: configuration json dictionary :type config: ConfigType .. py:function:: compute_initialization(config_json: str) -> demcompare.internal_typing.ConfigType Compute demcompare initialization process : Configuration copy, checking, and initial output content. :param config_json: Config json file name :type config_json: str :return: demcompare config initialized with default values :rtype: ConfigType .. py:function:: check_input_parameters(cfg: demcompare.internal_typing.ConfigType) Checks parameters :param cfg: configuration dictionary :type cfg: ConfigType .. py:function:: check_dem_processing_methods(cfg: demcompare.internal_typing.ConfigType) Checks that the DEM processing methods in the config are correct. :param cfg: configuration dictionary :type cfg: ConfigType .. py:function:: check_curvature_slope(cfg: demcompare.internal_typing.ConfigType) Checks that there is no DEM processing method '..-curvature' with 'Slope0' as 'classification_layers' :param cfg: configuration dictionary :type cfg: ConfigType .. py:function:: get_output_files_paths(output_dir: str, dir_name: str, file_name: str) -> Tuple[str, str, str, str, str, str, str, str] Return the paths of the output global files: - dem.tif - dem.png - dem_cdf.tif and dem_cdf.csv - dem_pdf.tif and dem_pdf.csv :param output_dir: output_dir :type output_dir: str :param dir_name: name of the subdirectory :type dir_name: str :param file_name: name of the files :type file_name: str :return: Output paths :rtype: Tuple[str, str, str, str, str, str, str, str]