From 90c0cebad2babecc5d3e4d2a3f464829b51724e0 Mon Sep 17 00:00:00 2001 From: Niclas Dobbertin Date: Wed, 1 Nov 2023 11:19:19 +0100 Subject: added blocked condition pauses --- experiment/frensch_task.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'experiment/frensch_task.py') diff --git a/experiment/frensch_task.py b/experiment/frensch_task.py index fb68093..1949d51 100644 --- a/experiment/frensch_task.py +++ b/experiment/frensch_task.py @@ -117,6 +117,12 @@ def run_blocked_trials(water_samples, procedure_keys): results = {} for proc_idx, proc in enumerate(procedure_keys): for sample_idx, sample in enumerate(water_samples): + + if sample_idx % 6 == 0: + pause_after_trial.draw() + WIN.flip() + event.waitKeys(keyList=["space"]) + cur_key = f"train_{sample_idx}" if not cur_key in results.keys(): results[cur_key] = {} @@ -139,9 +145,7 @@ def run_blocked_trials(water_samples, procedure_keys): answ_y = -100 y_offset = 80 - print(procedure_keys[:proc_idx]) for prev in procedure_keys[:proc_idx]: - print(prev) if not prev: continue p = DisplayProcedure(procedures[prev][1], procedures[prev][0]) @@ -159,7 +163,6 @@ def run_blocked_trials(water_samples, procedure_keys): ) stims.append(stim_answer_equals) - print(sample_idx) stim_answer_box = visual.TextBox2( WIN, results[f"train_{sample_idx}"][prev]["answer"], @@ -224,6 +227,10 @@ def run_blocked_trials(water_samples, procedure_keys): answer = (answer.replace("\n", ""), answer_time) results[cur_key][proc] = {"answer": answer[0], "time": answer[1]} + pause_new_proc.draw() + WIN.flip() + event.waitKeys(keyList=["space"]) + return results @@ -319,6 +326,20 @@ pause = visual.TextBox2( alignment="center", ) +pause_new_proc = visual.TextBox2( + WIN, + """Drücken Sie die Leertaste um mit dem nächsten Kennwert fortzufahren""", + letterHeight=50, + alignment="center", +) + +pause_after_trial = visual.TextBox2( + WIN, + """Drücken Sie die Leertaste um fortzufahren""", + letterHeight=50, + alignment="center", +) + intro = visual.TextBox2( WIN, intro_text, letterHeight=40, alignment="center", size=(100000, 100000) ) -- cgit v1.2.3