From 19cfddb45a4ac86f6adcdaa73a9d11ed0be85cf8 Mon Sep 17 00:00:00 2001 From: Wojciech Wojnowski <wojciech.wojnowski@pg.edu.pl> Date: Thu, 11 Nov 2021 09:34:08 +0000 Subject: [PATCH] Update main.py --- main.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 8de0e92..05aba7d 100644 --- a/main.py +++ b/main.py @@ -600,11 +600,12 @@ def calc_crit_2(event=None): criteria[1].textvar.set(1.0) else: criteria[1].textvar.set( - abs(-0.147 * log(float(criteria[1].valuevar.get())) + 0.3299)) + abs(-0.145 * log(float(criteria[1].valuevar.get())) + 0.3333)) except ValueError: messagebox.showerror(title='Value error', message='The amount has to be a float or an integer, e.g. 0.14 or 21.') create_plot() + print('criterion 2: ', criteria[1].textvar.get()) entry2.bind('<Return>', calc_crit_2) @@ -658,11 +659,12 @@ def calc_crit_4(event=None): criteria[3].textvar.set(1.0) else: criteria[3].textvar.set( - abs(-0.174 * log(float(criteria[3].valuevar.get())) + 0.6125)) + abs(-0.161 * log(float(criteria[3].valuevar.get())) + 0.6295)) except ValueError: messagebox.showerror(title='Value error', message='The amount has to be a float or an integer, e.g. 0.14 or 21.') create_plot() + print('Criterion 4: ', criteria[3].textvar.get()) entry4.bind('<Return>', calc_crit_4) @@ -690,7 +692,7 @@ def calc_crit_5(event=None): criteria[4].textvar.set(1.0) else: criteria[4].textvar.set( - abs(-0.142 * log(float(criteria[4].valuevar.get())) + 0.65)) + abs(-0.145 * log(float(criteria[4].valuevar.get())) + 0.6667)) except ValueError: messagebox.showerror(title='Value error', message='The amount has to be a float or an integer, e.g. 0.14 or 21.') @@ -722,7 +724,7 @@ def calc_crit_6(event=None): criteria[5].textvar.set(0.0) else: criteria[5].textvar.set( - abs(0.2361 * log(float(criteria[5].valuevar.get())) - 0.0068)) + abs(0.2354 * log(float(criteria[5].valuevar.get())))) except ValueError: messagebox.showerror(title='Value error', message='The amount has to be a float or an integer, e.g. 0.14 or 21.') @@ -819,7 +821,7 @@ def calc_crit_8(event=None): criteria[7].textvar.set(1.0) else: criteria[7].textvar.set( - abs(-0.252 * log(float(criteria[7].valuevar.get())) + 1.5477)) + abs(-0.256 * log(float(criteria[7].valuevar.get())) + 1.5886)) except ValueError: messagebox.showerror(title='Value error', message='The amount has to be a float or an integer, e.g. 0.14 or 21.') -- GitLab