diff options
author | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2023-11-01 11:19:19 +0100 |
---|---|---|
committer | Niclas Dobbertin <niclas.dobbertin@mailbox.org> | 2023-11-01 11:19:19 +0100 |
commit | 90c0cebad2babecc5d3e4d2a3f464829b51724e0 (patch) | |
tree | a026aeff91ea27e91a1df1a6b32a4bd84132298d | |
parent | 04fc4afdbdaec95241779b54aa3ba1f7fa3e5398 (diff) |
added blocked condition pauses
-rw-r--r-- | experiment/frensch_task.py | 27 |
1 files changed, 24 insertions, 3 deletions
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) ) |