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.BATHYMETRY_FOR_SIMULATION = '__bathymetry_after_scripts.tif'[source]
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.create_shapefile_from_prop_tif(fn_tif, shapefile_path)[source]
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.vanish_info_header(self_dx, self_nbxy, self_O)[source]
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_DEM, 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

Inheritance diagram of wolfhece.insyde_be.INBE_gui.INBEGui

The main frame for the damage computation with INSYDE-BE (=INBE)

_manager = None[source]
_mapviewer = None[source]
_func[source]
df_results_Ti = None[source]
property mapviewer[source]
layout(self_fct)[source]

Update the layers for the main buttons

on_button_click(event)[source]
on_button_click2(event2)[source]
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.

layout_listbox(self_fct)[source]

Changes the layout for the listbox : light grey.

InitUI()[source]
OnSims(e: wx.ListEvent)[source]

Load sim into the mapviewer

OnSimsDBLClick(e: wx.ListEvent)[source]

Load sim into the mapviewer

OnCheckFiles(e)[source]

Check the files

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

OnCheckPond(e)[source]
OnCheckPICC(e)[source]
OnMainDir(e)[source]

Selects the main directory to be read.

OnStudyArea(e)[source]

Change the study area

OnScenario(e)[source]

Change the scenario

OnLoadingSimu(e)[source]

Link between INBE and simulations -Load a hydraulic scenarios from the scenario manager -Create scenario and study area if needed.

OnDanger(e)[source]

Specific button to extract last step or to compute the wd danger map

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_DEM and test the type (float32)

OnInterpolation(e)[source]

Interpolates the last extracted time steps present in LAST_STEP_EXTRACTED using the fast marching interpolation routine, by creating a batch file while performing multiple checks on the required input files.

OnToggleRemove(e)[source]

Toggle button : When activated, reads the first column from self._manager.IN_REMOVED_TAB (Excel file) and stores its non-empty values as a list in self.removed_code. When deactivated, resets self.removed_code to None. This attribute is used when creating CSV files (inputs)

OnToggleAdmin(e)[source]
residential_orAdminmode()[source]
OnInput(e)[source]
OnDefault_TEMP(e)[source]

Impute default values to inputs and run INBE on each Ti

Oncombined_OUTPUT(e)[source]

Compute the combined damage as EAD or with aversion.

OnReadEADAversion(e)[source]

Read and compares the existing combinaision of damage (EAD and Aversion if exist)

OnReadEADCat(e)[source]

Reads the EAD results (aversion M0) and plots histograms for each building with damage categories, in ascending order of d_total.

OnSetComp(e)[source]

Analyze two or more scenarios with a baseline

OnAnalysis(e)[source]

Analyze two or more scenarios with a baseline