diff --git a/demo/progressive_gen_demo.py b/demo/progressive_gen_demo.py index 44835df..2319d3d 100644 --- a/demo/progressive_gen_demo.py +++ b/demo/progressive_gen_demo.py @@ -14,7 +14,7 @@ exp = design.Experiment("Progressive N-Back Task") control.initialize(exp) -exp.data_variable_names = ["block", "stimulus", "pressed_key", "rt"] +exp.data_variable_names = ["block", "stimulus", "pressed_key", "rt", "n", "difference_threshold", "performance"] fixation = stimuli.FixCross() fixation.preload() @@ -35,6 +35,7 @@ for block in exp.blocks: trials = block.get_factor("trials") block_index = block.get_factor("block") + # TODO present the N in an instruction # TODO recalculate N based on performance generators[block_index].reset(trials_per_block, targets, lures, n=n) for i in range(0, trials): @@ -47,7 +48,7 @@ # Wait for response, remove duration param for forced-choice. pressed_key, rt = exp.keyboard.wait(response_keys, duration=2000) - exp.data.add([block.get_factor("block"), trial.get_factor("stimulus"), pressed_key, rt]) + exp.data.add([block.get_factor("block"), trial.get_factor("stimulus"), pressed_key, rt, n, 0, 0]) exp.clock.wait(1000 - expyriment.stimuli.BlankScreen().present() - stim.unload()) expyriment.control.end("Goodbye!", goodbye_delay=1000)