Running a Task
Loading a Conditions/Userloop File
To start a task, either a conditions file or a userloop file should be loaded. A conditions file is a text file that describes what stimuli need to be presented with which timing script. A userloop file does the same but it is a MATLAB function, not a text file.
Both files can be loaded by clicking the [Load a conditions file] button. The file-open dialog shows *.m files only, by default, so you need to change the extension type to choose a userloop function. You can write the userloop filename in a text file and select that text file instead, to make this step simpler.
Upon loading a conditions/userloop file, some menu options are populated and activated, such as the "Blocks" pane and the "Blocks to run" button. These options are important to control the task flow.
If you click on a different block number in the "Blocks" pane, "Total # of conditions in this block", "# of trials to run in this block" and "Count only correct trials change" change accordingly and you can customize how many trials to run in each block.
"Blocks to run" and "First block to run" allow you to run only a subset of the defined blocks and choose which blocks to run very first.
"Total # of trials to run" and "Total # of blocks to run" let you decide when the task will stop. The task will be paused whichever between them comes first.
Additionally you should configure the size and resolution of the subject screen (see Calibrating Eye/Joystick Signals) and the DAQ device (see the Input / Output section of Main Menu & the AI Ground Configuration section of NI Multifunction I/O Device), to run the experiment properly.
This pause menu appears when the RUN button is hit or when the task is paused. In this menu, the following options are available. You can use hotkeys or mouse-click to select an option.
- [Space] key: Start/resume the task
- [Q] key: Quit the task
- [B] key: Select a new block
- [X] key: Alter behavioral-error handling
- [E] key: Recalibrate eye signals
- [D] key: Eye auto drift correction
- [J] key: Recalibrate joystick signals
- [V] key: Edit timing file variables
- [S] key: Simulation mode On/Off
- Replica of the subject screen: This panel displays extra information that is available for the experimenter only, such as the real-time input state, the location and size of fixation windows, reward delivery, etc., in addition to the stimuli presented to the subject. You can display user-defined dynamic texts during trials here (see the dashboard runtime function).
- Time line of events
- Trial counts and results: Trial results are number-coded as in the trialerror The zoom level is adjustable while the task is paused.
- User text/warning panel: Texts sent by the user_text and user_warning functions are displayed here. They are updated at the end of each trial, whereas the texts sent by dashboard are shown up immediately.
- User plot: This figure can be used to show the result of online behavior analysis. Users can register their own functions in the main menu. If no function is registered, a default reaction time graph will be drawn here.
During trials, hotkeys like the following are available.
- [ESC] key: Pauses the task
- [C] key: Brings the current eye position to the center of the screen.
- [U] key: Cancels the previous ‘C’ key. You can undo multiple times.
- [R] key: Delivers a manual reward. The initial pulse duration is 100 ms.
- [-] key: Decreases the reward pulse length by 10 ms.
- [+] key: Increases the reward pulse length by 10 ms.
Behavioral Summary & mlplayer
When the task is finished, a figure that summarizes behavioral performance is popped up (left figure). You can launch a trial replay tool, MonkeyLogic player (right figure), from this behavior summary and export each trial as a video clip. The summary figure and the player can be re-opened afterwards with the behaviorsummary and mlplayer functions.