summaryrefslogtreecommitdiff
path: root/master_thesis/frensch_procedures.py
diff options
context:
space:
mode:
authorNiclas Dobbertin <niclas.dobbertin@mailbox.org>2023-09-21 08:20:56 +0200
committerNiclas Dobbertin <niclas.dobbertin@mailbox.org>2023-09-21 08:20:56 +0200
commit66f293cc061d5e97390c64a07e5c9d40df5e8b12 (patch)
tree6a8ecf6dbee56ae679cecd4acac0a8b093e50b64 /master_thesis/frensch_procedures.py
parent6fbcf01799e62e88d609fab8eb4057569c23fd79 (diff)
improvements
Diffstat (limited to 'master_thesis/frensch_procedures.py')
-rw-r--r--master_thesis/frensch_procedures.py33
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