summaryrefslogtreecommitdiff
path: root/master_thesis/frensch_task.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_task.py
parent6fbcf01799e62e88d609fab8eb4057569c23fd79 (diff)
improvements
Diffstat (limited to 'master_thesis/frensch_task.py')
-rw-r--r--master_thesis/frensch_task.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/master_thesis/frensch_task.py b/master_thesis/frensch_task.py
index 091f351..a3eae00 100644
--- a/master_thesis/frensch_task.py
+++ b/master_thesis/frensch_task.py
@@ -31,10 +31,10 @@ def experiment_shutdown():
WIN = visual.Window((2560, 1440), fullscr=True, units="pix")
MONITOR_FPS = 60
-# TRAIN_TRIALS = 1
-# TEST_TRIALS = 1
TRAIN_TRIALS = 75
TEST_TRIALS = 50
+TRAIN_TRIALS = 1
+TEST_TRIALS = 1
ORDER_CONDITIONS = ["fixed", "random", "blocked"]
PROCEDURE_KEYS = ["1", "2", "3", "4", "5", "6", "overall"]
@@ -121,7 +121,7 @@ def run_trial(water_sample, procedure_keys: list, condition):
answ_y = -100
y_offset = 80
for proc in procedure_keys:
- p = DisplayProcedure(procedures[proc][1](), procedures[proc][0]())
+ p = DisplayProcedure(procedures[proc][1], procedures[proc][0])
p = generate_procedure_display(p, (proc_x, proc_y))
stims.append(p)
proc_y -= y_offset
@@ -130,12 +130,12 @@ def run_trial(water_sample, procedure_keys: list, condition):
WIN,
"=",
letterHeight=50,
- pos=(answ_x-100, answ_y),
+ pos=(answ_x - 100, answ_y),
size=[150, 70],
alignment="center",
)
stims.append(stim_answer_equals)
-
+
stim_answer_box = visual.TextBox2(
WIN,
"",
@@ -204,6 +204,7 @@ for i in range(TRAIN_TRIALS):
)
answer_dict = {}
answer_dict["procedure_order"] = procedure_keys
+ answer_dict["water_sample"] = all_samples[i].water_sample_dict()
for proc, key in zip(answer, procedure_keys):
answer_dict[key] = {"answer": proc[0], "time": proc[1]}
@@ -214,6 +215,18 @@ for i in range(TRAIN_TRIALS):
event.waitKeys(keyList=["space"])
+phase = visual.TextBox2(
+ WIN,
+ """Sie haben den ersten Teil geschafft! Der zweite Teil ist etwas kürzer als der erste
+
+Drücken Sie die Leertaste um anzufangen.""",
+ letterHeight=50,
+ alignment="center",
+)
+phase.draw()
+WIN.flip()
+event.waitKeys(keyList=["space"])
+
train_procedures[2] = transfer_procedure
for i in range(TEST_TRIALS):
print(train_procedures)
@@ -222,6 +235,7 @@ for i in range(TEST_TRIALS):
)
answer_dict = {}
answer_dict["procedure_order"] = procedure_keys
+ answer_dict["water_sample"] = all_samples[TRAIN_TRIALS + i].water_sample_dict()
for proc, key in zip(answer, procedure_keys):
answer_dict[key] = {"answer": proc[0], "time": proc[1]}