diff options
Diffstat (limited to 'master_thesis/frensch_procedures.py')
-rw-r--r-- | master_thesis/frensch_procedures.py | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/master_thesis/frensch_procedures.py b/master_thesis/frensch_procedures.py index 38e8cf3..c2ace41 100644 --- a/master_thesis/frensch_procedures.py +++ b/master_thesis/frensch_procedures.py @@ -19,16 +19,33 @@ class WaterSample: def procedure_dict(self): procedures = { - "1": (self.index1, self.index1_str), - "2": (self.index2, self.index2_str), - "3": (self.index3, self.index3_str), - "4": (self.index4, self.index4_str), - "5": (self.index5, self.index5_str), - "6": (self.index6, self.index6_str), - "overall": (self.overall, self.overall_str), + "1": (self.index1(), self.index1_str()), + "2": (self.index2(), self.index2_str()), + "3": (self.index3(), self.index3_str()), + "4": (self.index4(), self.index4_str()), + "5": (self.index5(), self.index5_str()), + "6": (self.index6(), self.index6_str()), + "overall": (self.overall(), self.overall_str()), } + return procedures + def water_sample_dict(self): + sample = { + "1": (self.index1(), self.index1_str()), + "2": (self.index2(), self.index2_str()), + "3": (self.index3(), self.index3_str()), + "4": (self.index4(), self.index4_str()), + "5": (self.index5(), self.index5_str()), + "6": (self.index6(), self.index6_str()), + "overall": (self.overall(), self.overall_str()), + "solid": self.solid, + "algae": self.algae, + "lime": self.lime, + "toxin": self.toxin, + } + return sample + def select_procedures(self): procedures = [ (self.index1, self.index1_str), @@ -112,7 +129,7 @@ def constrained_WaterSample(): resample = False # check for negative results for proc in water_sample.procedure_dict().keys(): - if water_sample.procedure_dict()[proc][0]() < 0: + if water_sample.procedure_dict()[proc][0] < 0: resample = True # check for greater/lesser equality # procedure 5 |