From 4a6c32e5ea8300aaa418e7640de5b1b6785bfae9 Mon Sep 17 00:00:00 2001 From: dpinney Date: Fri, 8 Dec 2023 21:04:01 -0500 Subject: [PATCH] fix function def --- omf/models/resilientDist.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/omf/models/resilientDist.py b/omf/models/resilientDist.py index 312f52575..cd77c424a 100644 --- a/omf/models/resilientDist.py +++ b/omf/models/resilientDist.py @@ -120,11 +120,10 @@ def changeCellSize(self, cellSize): ''' Scale the cell size in image plot. ''' self.hazardObj["cellsize"] = cellSize - def mapValue(self, value, fromMin, fromMax, toMin=.7, toMax=1): - newValue = float(value - fromMin) / float(fromMax-fromMin) - return toMin + (newValue * (toMax-toMin)) - def mapRanges(self, values, fromMin, fromMax): + def mapValue(self, value, fromMin, fromMax, toMin=.7, toMax=1): + newValue = float(value - fromMin) / float(fromMax-fromMin) + return toMin + (newValue * (toMax-toMin)) newValues = [] for value in values: newValues.append(mapValue(value, fromMin, fromMax))