From 291e5f8629ad58caf09142b264135f302f27ab1f Mon Sep 17 00:00:00 2001 From: "Dobbertin, Niclas" Date: Mon, 6 Nov 2023 17:15:18 +0100 Subject: fix windows bug --- experiment/frensch_task.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'experiment') diff --git a/experiment/frensch_task.py b/experiment/frensch_task.py index ad84231..f6e6136 100644 --- a/experiment/frensch_task.py +++ b/experiment/frensch_task.py @@ -44,13 +44,21 @@ def experiment_shutdown(): core.quit() +ORDER_CONDITIONS = ["fixed", "random", "blocked"] + +condition_dlg = gui.Dlg(title="Experiment Condition") +condition_dlg.addText("Condition") +condition_dlg.addField("condition") +CONDITION = condition_dlg.show()[0] + +assert CONDITION in ORDER_CONDITIONS + WIN = visual.Window((1920, 1080), fullscr=True, units="pix") MONITOR_FPS = 60 TRAIN_TRIALS = 75 TEST_TRIALS = 50 # TRAIN_TRIALS = 3 # TEST_TRIALS = 3 -ORDER_CONDITIONS = ["fixed", "random", "blocked"] PROCEDURE_KEYS = ["1", "2", "3", "4", "5", "6", "overall"] # Cancel experiment anytime with Esc @@ -312,12 +320,6 @@ def run_trial(water_sample, procedure_keys: list, condition): return tuple(answers), tuple(procedure_keys) -condition_dlg = gui.Dlg(title="Experiment Condition") -condition_dlg.addText("Condition") -condition_dlg.addField("condition") -CONDITION = condition_dlg.show()[0] - -assert CONDITION in ORDER_CONDITIONS pause = visual.TextBox2( WIN, -- cgit v1.2.3