diff options
-rw-r--r-- | master_thesis/frensch_procedures.py | 14 | ||||
-rw-r--r-- | master_thesis/frensch_task.py | 33 |
2 files changed, 27 insertions, 20 deletions
diff --git a/master_thesis/frensch_procedures.py b/master_thesis/frensch_procedures.py index 42c6f14..38e8cf3 100644 --- a/master_thesis/frensch_procedures.py +++ b/master_thesis/frensch_procedures.py @@ -48,37 +48,37 @@ class WaterSample: return (self.lime[3] - self.lime[1]) * self.solid def index1_str(self): - return "(Lime_4 - Lime_2) * Solid" + return "(Sandstein_4 - Sandstein_2) * Mineralien" def index2(self): return (2 * self.algae) + min(self.lime) def index2_str(self): - return "(2 * Algae) + Lime_min" + return "(2 * Algen) + Sandstein_min" def index3(self): return max(self.toxin) + min(self.toxin) def index3_str(self): - return "Toxin_max + Toxin_min" + return "Gifte_max + Gifte_min" def index4(self): return (self.solid * 2) - self.toxin[3] def index4_str(self): - return "(Solid * 2) - Toxin_4" + return "(Mineralien * 2) - Gifte_4" def index5(self): return max(self.lime[2], (self.toxin[2] - self.toxin[1])) def index5_str(self): - return "Greater of [(Toxin_3 - Toxin_2), Lime_3]" + return "Der höhere zwischen (Gifte_3 - Gifte_2) und Sandstein_3" def index6(self): return min(self.algae, (self.lime[0] + self.toxin[0])) def index6_str(self): - return "Lesser of [Algae, (Lime_1 + Toxin_1)]" + return "Der kleinere zwischen Algen und (Sandstein_1 + Gifte_1)" def overall(self): return 100 - max( @@ -86,7 +86,7 @@ class WaterSample: ) def overall_str(self): - return "100 - Index_max" + return "100 - dem Höchstem aller Ergebnisse" def print_all(self): print(f"Solid: {self.solid}") diff --git a/master_thesis/frensch_task.py b/master_thesis/frensch_task.py index e74117d..091f351 100644 --- a/master_thesis/frensch_task.py +++ b/master_thesis/frensch_task.py @@ -84,7 +84,7 @@ def generate_procedure_display(procedure: DisplayProcedure, position): WIN, pos=position, text=procedure.procedure, - # size=[1000, 1000], + size=[1000000, 1000], letterHeight=50, alignment="center", ) @@ -104,10 +104,10 @@ def run_trial(water_sample, procedure_keys: list, condition): if condition == "random": random.shuffle(procedure_keys) - solid = DisplayVariable("SOLID", [water_sample.solid]) - algae = DisplayVariable("ALGAE", [water_sample.algae]) - lime = DisplayVariable("LIME", water_sample.lime) - toxin = DisplayVariable("TOXIN", water_sample.toxin) + solid = DisplayVariable("Mineralien", [water_sample.solid]) + algae = DisplayVariable("Algen", [water_sample.algae]) + lime = DisplayVariable("Sandstein", water_sample.lime) + toxin = DisplayVariable("Gifte", water_sample.toxin) x_positions = [-800, -400, 400, 800] stims = generate_variable_display([solid, algae, lime, toxin], x_positions) @@ -115,9 +115,9 @@ def run_trial(water_sample, procedure_keys: list, condition): procedures = water_sample.procedure_dict() answers = [] - proc_x = -800 + proc_x = -600 proc_y = -100 - answ_x = 0 + answ_x = 200 answ_y = -100 y_offset = 80 for proc in procedure_keys: @@ -126,6 +126,16 @@ def run_trial(water_sample, procedure_keys: list, condition): stims.append(p) proc_y -= y_offset + stim_answer_equals = visual.TextBox2( + WIN, + "=", + letterHeight=50, + pos=(answ_x-100, answ_y), + size=[150, 70], + alignment="center", + ) + stims.append(stim_answer_equals) + stim_answer_box = visual.TextBox2( WIN, "", @@ -159,7 +169,7 @@ def run_trial(water_sample, procedure_keys: list, condition): answer_time = core.monotonicClock.getTime() - start_time answers.append((answer.replace("\n", ""), answer_time)) - event.waitKeys(keyList=["space"]) + # event.waitKeys(keyList=["space"]) return answers, procedure_keys @@ -181,11 +191,6 @@ random.shuffle(train_procedures) transfer_procedure = train_procedures[-1] train_procedures = train_procedures[:-1] train_procedures.append(PROCEDURE_KEYS[-1]) -print("test/train") -print(train_procedures) -test_procedures = train_procedures -test_procedures[2] = transfer_procedure -print(test_procedures) all_samples = generate_all_watersamples(TRAIN_TRIALS + TEST_TRIALS) pprint(all_samples) @@ -193,6 +198,7 @@ pprint(all_samples) results = {} for i in range(TRAIN_TRIALS): + print(train_procedures) answer, procedure_keys = run_trial( all_samples[i], train_procedures, ORDER_CONDITIONS[0] ) @@ -210,6 +216,7 @@ for i in range(TRAIN_TRIALS): train_procedures[2] = transfer_procedure for i in range(TEST_TRIALS): + print(train_procedures) answer, procedure_keys = run_trial( all_samples[TRAIN_TRIALS + i], train_procedures, ORDER_CONDITIONS[0] ) |