A trial in a behavioral task is composed of multiple task periods (also called as epochs), which are temporal intervals within which a set of task events or desired participant's actions are taken place. For example, an LED flash is provided in the cue period, and the participant should press a button as soon as possible in the subsequent response period. Some task periods have time limitation, while others can last forever until predetermined conditions are fulfilled.
To manage the transition of numbers of task periods, CgnPeriod class offers a handy cutoff to you. It simply remembers the current task period designated by set
method. By using CgnPeriod class, conditional branching in your main code will become more readable. If you designate time length of the period on calling set
method, CgnPeriod class also maintain that information so that you can monitor the expiration of the predetermined time limit using expire
method.
- Examples:
- Period.ino.