From 1b66bca852961e699899ed2c5654d41570a38962 Mon Sep 17 00:00:00 2001 From: thornoe Date: Sat, 16 Mar 2024 00:45:00 +0100 Subject: [PATCH] precautionary thresholds --- gis/script_module.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gis/script_module.py b/gis/script_module.py index b3d67c7..2425afb 100644 --- a/gis/script_module.py +++ b/gis/script_module.py @@ -858,11 +858,11 @@ def ecological_status(self, j, dfIndicator, dfVP, suffix="obs", index=None): for t in dfEco.columns: # Precautionary conversion of imputed status to categorical scale conditions = [ - dfEco[t] < 0.5, # Bad - (dfEco[t] >= 0.5) & (dfEco[t] < 1.5), # Poor - (dfEco[t] >= 1.5) & (dfEco[t] < 2.5), # Moderate - (dfEco[t] >= 2.5) & (dfEco[t] < 3.5), # Good - dfEco[t] >= 3.5, # High + dfEco[t] < 1, # Bad + (dfEco[t] >= 1) & (dfEco[t] < 2), # Poor + (dfEco[t] >= 2) & (dfEco[t] < 3), # Moderate + (dfEco[t] >= 3) & (dfEco[t] < 4), # Good + dfEco[t] >= 4, # High ] # Ecological status as a categorical index from Bad to High quality dfEco[t] = np.select(conditions, [0, 1, 2, 3, 4], default=np.nan)