diff --git a/avaframe/com4FlowPy/com4FlowPy.py b/avaframe/com4FlowPy/com4FlowPy.py index a983ca705..6c1b9c0e6 100755 --- a/avaframe/com4FlowPy/com4FlowPy.py +++ b/avaframe/com4FlowPy/com4FlowPy.py @@ -484,7 +484,7 @@ def checkConvertReleaseShp2Tif(modelPaths): #demHeader = io.read_header(modelPaths["demPath"]) _errMsg = "using release area in '.shp' format currently only supported in combination with '.asc' DEMs" log.error(_errMsg) - raise ValueError(_errMsg) + raise ValueError(_errMsg) else: _errMsg = f"file format '{ext}' for DEM is not supported, please provide '.tif' or '.asc'" log.error(_errMsg) diff --git a/avaframe/runStandardTestsCom4FlowPy.py b/avaframe/runStandardTestsCom4FlowPy.py index c5a6c58d6..6f16660a3 100644 --- a/avaframe/runStandardTestsCom4FlowPy.py +++ b/avaframe/runStandardTestsCom4FlowPy.py @@ -30,8 +30,8 @@ def compareRasters(path, pathRef): rasterRef = readRasters(pathRef) diff = rasterRef - raster equal = np.array_equal(rasterRef, raster) - closeArray = np.isclose(raster, rasterRef , rtol=1e-04, equal_nan=True) - closePercent = np.count_nonzero(closeArray[np.logical_or(raster>0, rasterRef>0)]) / rasterRef[np.logical_or(raster>0, rasterRef>0)].size + closeArray = np.isclose(raster, rasterRef, rtol=1e-04, equal_nan=True) + closePercent = np.count_nonzero(closeArray[np.logical_or(raster > 0, rasterRef > 0)]) / rasterRef[np.logical_or(raster > 0, rasterRef > 0)].size return diff, equal, closePercent @@ -124,7 +124,6 @@ def compareRasters(path, pathRef): message = f'{testName}: for {variable}: rasters are equal \n' else: message = f'{testName}: for {variable}: rasters are *NOT* equal, but {np.round(close,4) * 100}% of the affected area is close (relative tolerance: 10^-4) \n' - log.info(message) with open(reportFile, 'a') as pfile: - pfile.write(message ) + pfile.write(message) \ No newline at end of file