main.run_paradigm
stroop_task.main.run_paradigm(=60,
n_trials='english',
language=None,
logger_level='color',
focus=True,
write_to_serial=False,
random_wait=False,
show_fps )
Run the two-word Stroop task paradigm.
This function sets up and runs the two-word Stroop task paradigm using the Pyglet library. It initializes the logging configuration, creates the context for the Stroop task, sets up the window, and manages the task state. The function also adds the drawing callbacks and starts the task after a short delay.
Parameters
Name | Type | Description | Default |
---|---|---|---|
n_trials | int | The number of trials to run in a block - needs to be an integer divisible by 6 for balancing. Default is 60. | 60 |
language | str | The language setting for the Stroop task. Default is “english”. | 'english' |
logger_level | str | None | The logging level to set for the logger. If None, the level from the configuration file is used. Default is None. | None |
focus | str | The focus of the task, either “text” or “color”. Default is “color”. | 'color' |
write_to_serial | bool | Whether to write markers to a serial port. Default is True. | True |
random_wait | bool | Whether to use a random wait between trials. Default is False. If false, the user is required to push the arrow-down button for at least 500ms to start the next trial. If true, a random inter-trial-interval will be used. See configs/task.yaml and the wait_time_min_s and wait_time_max_s values therein. |
False |
show_fps | bool | Whether to show the frames per second (FPS) on the screen. Default is False. | False |
Returns
Name | Type | Description |
---|---|---|
None |