diff --git a/src/graph_creators/graph_belts.py b/src/graph_creators/graph_belts.py index 9ba1cfe..d64a2b9 100644 --- a/src/graph_creators/graph_belts.py +++ b/src/graph_creators/graph_belts.py @@ -140,11 +140,12 @@ def mhi_lut(mhi): (15, 30, 'Likely a mechanical issue'), (0, 15, 'Mechanical issue detected'), ] + mhi = np.clip(mhi, 1, 100) for lower, upper, message in ranges: if lower < mhi <= upper: return message - return 'Error computing MHI value' + return 'Unknown mechanical health' # Should never happen ######################################################################