summaryrefslogtreecommitdiff
path: root/master_thesis/frensch_task.py
diff options
context:
space:
mode:
Diffstat (limited to 'master_thesis/frensch_task.py')
-rw-r--r--master_thesis/frensch_task.py33
1 files changed, 20 insertions, 13 deletions
diff --git a/master_thesis/frensch_task.py b/master_thesis/frensch_task.py
index e74117d..091f351 100644
--- a/master_thesis/frensch_task.py
+++ b/master_thesis/frensch_task.py
@@ -84,7 +84,7 @@ def generate_procedure_display(procedure: DisplayProcedure, position):
WIN,
pos=position,
text=procedure.procedure,
- # size=[1000, 1000],
+ size=[1000000, 1000],
letterHeight=50,
alignment="center",
)
@@ -104,10 +104,10 @@ def run_trial(water_sample, procedure_keys: list, condition):
if condition == "random":
random.shuffle(procedure_keys)
- solid = DisplayVariable("SOLID", [water_sample.solid])
- algae = DisplayVariable("ALGAE", [water_sample.algae])
- lime = DisplayVariable("LIME", water_sample.lime)
- toxin = DisplayVariable("TOXIN", water_sample.toxin)
+ solid = DisplayVariable("Mineralien", [water_sample.solid])
+ algae = DisplayVariable("Algen", [water_sample.algae])
+ lime = DisplayVariable("Sandstein", water_sample.lime)
+ toxin = DisplayVariable("Gifte", water_sample.toxin)
x_positions = [-800, -400, 400, 800]
stims = generate_variable_display([solid, algae, lime, toxin], x_positions)
@@ -115,9 +115,9 @@ def run_trial(water_sample, procedure_keys: list, condition):
procedures = water_sample.procedure_dict()
answers = []
- proc_x = -800
+ proc_x = -600
proc_y = -100
- answ_x = 0
+ answ_x = 200
answ_y = -100
y_offset = 80
for proc in procedure_keys:
@@ -126,6 +126,16 @@ def run_trial(water_sample, procedure_keys: list, condition):
stims.append(p)
proc_y -= y_offset
+ stim_answer_equals = visual.TextBox2(
+ WIN,
+ "=",
+ letterHeight=50,
+ pos=(answ_x-100, answ_y),
+ size=[150, 70],
+ alignment="center",
+ )
+ stims.append(stim_answer_equals)
+
stim_answer_box = visual.TextBox2(
WIN,
"",
@@ -159,7 +169,7 @@ def run_trial(water_sample, procedure_keys: list, condition):
answer_time = core.monotonicClock.getTime() - start_time
answers.append((answer.replace("\n", ""), answer_time))
- event.waitKeys(keyList=["space"])
+ # event.waitKeys(keyList=["space"])
return answers, procedure_keys
@@ -181,11 +191,6 @@ random.shuffle(train_procedures)
transfer_procedure = train_procedures[-1]
train_procedures = train_procedures[:-1]
train_procedures.append(PROCEDURE_KEYS[-1])
-print("test/train")
-print(train_procedures)
-test_procedures = train_procedures
-test_procedures[2] = transfer_procedure
-print(test_procedures)
all_samples = generate_all_watersamples(TRAIN_TRIALS + TEST_TRIALS)
pprint(all_samples)
@@ -193,6 +198,7 @@ pprint(all_samples)
results = {}
for i in range(TRAIN_TRIALS):
+ print(train_procedures)
answer, procedure_keys = run_trial(
all_samples[i], train_procedures, ORDER_CONDITIONS[0]
)
@@ -210,6 +216,7 @@ for i in range(TRAIN_TRIALS):
train_procedures[2] = transfer_procedure
for i in range(TEST_TRIALS):
+ print(train_procedures)
answer, procedure_keys = run_trial(
all_samples[TRAIN_TRIALS + i], train_procedures, ORDER_CONDITIONS[0]
)