From 7dfddb6214e73c49864edddadea9a7d37a2f0ab0 Mon Sep 17 00:00:00 2001
From: Niclas Dobbertin <niclas.dobbertin@mailbox.org>
Date: Sun, 1 Oct 2023 17:05:22 +0200
Subject: fix saving procedure order

---
 master_thesis/frensch_task.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/master_thesis/frensch_task.py b/master_thesis/frensch_task.py
index 7617e9d..b680ccd 100644
--- a/master_thesis/frensch_task.py
+++ b/master_thesis/frensch_task.py
@@ -185,7 +185,7 @@ def run_trial(water_sample, procedure_keys: list, condition):
 
     # event.waitKeys(keyList=["space"])
 
-    return answers, procedure_keys
+    return tuple(answers), tuple(procedure_keys)
 
 
 pause = visual.TextBox2(
@@ -256,6 +256,7 @@ for i in range(TEST_TRIALS):
     answer, procedure_keys = run_trial(
         all_samples[TRAIN_TRIALS + i], train_procedures, ORDER_CONDITIONS[0]
     )
+    print(procedure_keys)
     answer_dict = {}
     answer_dict["procedure_order"] = procedure_keys
     answer_dict["water_sample"] = all_samples[TRAIN_TRIALS + i].water_sample_dict()
-- 
cgit v1.2.3


From 2d445574131a42bd7a4f1bfc2e9f5106a344add3 Mon Sep 17 00:00:00 2001
From: Niclas Dobbertin <niclas.dobbertin@mailbox.org>
Date: Sun, 1 Oct 2023 17:05:36 +0200
Subject: fix and set random condition

---
 master_thesis/frensch_task.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/master_thesis/frensch_task.py b/master_thesis/frensch_task.py
index b680ccd..4bd2839 100644
--- a/master_thesis/frensch_task.py
+++ b/master_thesis/frensch_task.py
@@ -116,7 +116,9 @@ def run_trial(water_sample, procedure_keys: list, condition):
     water_sample.print_all()
 
     if condition == "random":
+        overall = procedure_keys.pop()
         random.shuffle(procedure_keys)
+        procedure_keys.append(overall)
 
     solid = DisplayVariable("Mineralien", [water_sample.solid])
     algae = DisplayVariable("Algen", [water_sample.algae])
@@ -223,7 +225,7 @@ results = {}
 for i in range(TRAIN_TRIALS):
     print(train_procedures)
     answer, procedure_keys = run_trial(
-        all_samples[i], train_procedures, ORDER_CONDITIONS[0]
+        all_samples[i], train_procedures, ORDER_CONDITIONS[1]
     )
     answer_dict = {}
     answer_dict["procedure_order"] = procedure_keys
-- 
cgit v1.2.3