nback#
- pypillometry.sim.tasks.nback(level=2, n=120, soa='2500 ms', p_target=0.3333333333333333, letters='BCDFGHJKLMNPQRSTVWXZ', rt='lognormal(650 ms, 150 ms)', p_respond=0.97, p_correct=(0.9, 0.95))[source]#
n-back task: a letter every soa; respond to every letter with “match” (same letter as level letters before) or “nomatch”.
- Parameters:
level (int) – n of the n-back (default 2)
n (int) – number of trials
soa (float, str or distribution) – time between the letters (shown for 500 ms)
p_target (float) – probability of a target (match) trial
letters (str or sequence) – the letters
p_respond (float) – probability of a response
p_correct (tuple of float) – probability of the correct key in target and non-target trials
- Return type:
- Returns:
events
letter(with the metadataletter) andpress(with the metadatakey,"match"or"nomatch"); conditionstargetandnontarget
Examples
The trials of the task:
>>> import pypillometry as pp >>> fig = pp.sim.tasks.nback().plot()