wolfhece.insyde_be.INBE_gui
Author: University of Liege, HECE, Damien Sansen Date: 2025
Copyright (c) 2025 University of Liege. All rights reserved.
This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited.
Module Contents
- wolfhece.insyde_be.INBE_gui.riverbed_trace_dilated(fn_read_simu, fn_output, threshold, type_extraction, id_begin=None, id_end=None, id_step=None)[source]
Recognizes the riverbed trace based on a simulation, where water depth above a given threshold is considered part of the riverbed. Inputs:
fn_read_simu: the simulation file to read.
fn_output: the location to save the riverbed trace as a .tiff file.
threshold: the water depth threshold above which the areas are considered riverbed.
- wolfhece.insyde_be.INBE_gui.empty_folder(folder)[source]
Empties the content of a directory if it exists.
- wolfhece.insyde_be.INBE_gui.get_transform_and_crs(tif_file)[source]
For TIFF file manipulation, reads the CRS and the geotransform, and returns them.
- wolfhece.insyde_be.INBE_gui.get_header_info(fn)[source]
Reads the headers from the file at path ‘fn’.
- wolfhece.insyde_be.INBE_gui.get_header_comparison(list_fn)[source]
Reads the headers from the files in list_fn and compares them. The result ‘comp’ is True if the headers are identical, and False otherwise.
- wolfhece.insyde_be.INBE_gui.display_info_header(self_dx, self_nbxy, self_O, fn)[source]
Displays the header at the path ‘fn’, and update the values displayed in the window.
- wolfhece.insyde_be.INBE_gui.update_info_header(self_dx, self_nbxy, self_O, fn)[source]
Upate the displayed header values by reading the simulations headers if exist.
- wolfhece.insyde_be.INBE_gui.search_for_modif_bath_and_copy(main_gpu, from_path, path_vuln)[source]
When loading gpu simulations for last step extraction, search for modified bath_ topography file, according to the structure coded in the scenarios manager. If they exist, their extent is copied to CHANGE_VULNE, called vuln_ and MNTmodifs_, to enable the user to modify it later. In addition, returns True if such files exist and False if they do not.
- wolfhece.insyde_be.INBE_gui.create_INPUT_OUTPUT_forScenario(maindir, study_area, scenario, simu_gpu=None, danger=None)[source]
Creates folder for a new study area or/and scenario. The last argument simu_gpu is used when loading simulation (indicates path to the simulation folder), if not used, indicate None to ignore it.
- class wolfhece.insyde_be.INBE_gui.INBEGui(parent=None, width=1024, height=500)[source]
Bases:
wx.Frame
The main frame for the damage computation with INSYDE-BE (=INBE)
- onRiverbed(event)[source]
Two options for the ‘Update Riverbed’ button: either the new riverbed trace file already exists and the user selects it, or it does not exist, and the user points to a no-overflow simulation, allowing the code to create the trace.
- OnHydrodynInput(e)[source]
A test to check if the FILLED water depths files exist. -If YES : the code can go on -If NO : either need to be computed, either the code will use the baseline ones
- OnLoadingSimu(e)[source]
Link between INBE and simulations -Load a hydraulic scenarios from the scenario manager -Create scenario and study area if needed.
- OnDEM(e)[source]
Import and create the inputs for the interpolation routine (name including ‘MNT_…’ and ‘MNT_…_with_mask’. See function MTN_And_mask_creation_all
- check_and_convert_rasters(manager, prefix, type_file, numpy_type, nodata_value, message_supp=None)[source]
- OnCheckMNTmodifs(e)[source]
Checks if scenarios MNTmodifs_ exist in CHANGE_VULNE and test the type (float32)