in3Utils.cfgHandling

Utilities for working with cfg info

Functions

addInfoToSimName

Add parameterName and value to simNames of simulation dataframe

applyCfgOverride

override configuration parameter values with the values provided in cfgWithOverrideParameters[modName_override] if addModValues True update the cfgWithOverrideParameters with the values for all parameters that are not provided in the override parameters

errorDuplicateListEntry

check if duplicate entries appear in a list and raise Assertion error using message

fetchAndOrderSimFiles

Filter simulations results using a list of parameters and a flag if in ascending or descending order

fetchValidationString

create a validation string to be checked if simDFrow matches filtering criteria (given by val)

filterCom1DFAThicknessValues

thickness settings different if read from shpfile - requires more complex filtering if read from shp - thickness values are provided per feature!! for example relTh = '' but relTh0 = 1 is appended for feature with id 0, relTh1 for feature with id 1, etc.

filterSims

Filter simulations using a list of parameters and a pandas dataFrame of simulation configurations if ~ is used as a prefix for a parameter - it is filtered according to values that do NOT match the value provided with the ~Parameter

insertIntoSimName

Add keys and values to name, in between parts of name split by index

orderSimFiles

Filter simulations results using a list of parameters and a flag if in ascending or descending order

orderSimulations

Order simulations datadframe using a list of parameters and a flag if in ascending or descending order

removeSimsNotMatching

remove simulations from simDF that do not match filtering critera

rewriteLocalCfgs

fetch all override sections in cfgFull and write a local_NAMEOVERRIDE.ini configuration file for the available sections - naming is collection_module_override if no localCfgPath is provided, default saved to avalancheDir/Inputs/configurationOverrides where package refers to e.g.