task_manager.StroopTaskStateManager
stroop_task.task_manager.StroopTaskStateManager(ctx, random_wait=False)A state manager for the Stroop task providing callbacks for state transitions from: fixation -> stimulus -> random.wait -> fixation …
Additionally, there is an instructions and end state.
Attributes
| Name | Type | Description |
|---|---|---|
| ctx | StroopContext | The context under which to operate. |
| transition_map | dict | A dictionary mapping state names to their corresponding callback methods. |
| next_state_transition | None | Placeholder for the next state transition. |
| states | list | A list of states in the order they will appear. |
| current_state | str | The current state of the task. |
| down_pressed | bool | A flag indicating whether the down arrow key is pressed. |
Methods
| Name | Description |
|---|---|
| end_block | End the block and log the results |
| next_state | Transition to the next state. dt is only for compliance with pyglet |
| random_wait | Using the clock scheduler as sub ms accuracy is not needed anyways |
| show_stimulus | Show the next stimulus in the self.ctx.block_stimuli list |
| start_block | Start a block of trials |
end_block
stroop_task.task_manager.StroopTaskStateManager.end_block()End the block and log the results
next_state
stroop_task.task_manager.StroopTaskStateManager.next_state(dt=0.0)Transition to the next state. dt is only for compliance with pyglet callback signature
random_wait
stroop_task.task_manager.StroopTaskStateManager.random_wait()Using the clock scheduler as sub ms accuracy is not needed anyways
show_stimulus
stroop_task.task_manager.StroopTaskStateManager.show_stimulus()Show the next stimulus in the self.ctx.block_stimuli list
start_block
stroop_task.task_manager.StroopTaskStateManager.start_block()Start a block of trials