The Attentional Blink (AB) phenomenon was first described by Raymond, Shapiro and Arnell in 1992.

In short, this is what the task is about:

  • People are told to find a specific stimulus, the target stimulus (e.g., the letter L).

  • The target stimulus is not always shown.

  • Multiple stimuli are shown very briefly.

The AB phenomenon is the following: People have a difficulty observing the target when it follows a non-target and the time between the first and second stimulus is between 0 and 300 ms (Experiment 2., Duncan et al., 1994).

About this implementation

This implementation is close to experiment 2 of Duncan, Ward & Shapiro (1994) in Nature.

This implementation has a long table. Read below why.

There are two ways in PsyToolkit of managing conditions.

  1. You have a line for each possible stimulus/response association in the table, like in this, or in library version of the visual search task. This is easier to program, but if you have many different combinations of stimuli and responses or times, you need an efficient piece of code to create the table (although you can type it in all manually). In this task, the file ab-table.r creates that using the statistical programming language R (which has its own PsyToolkit lesson).

  2. You can create trial conditions ad hoc using some coding. This can create more efficient code, but it really depends on the type of paradigm. If you do this, it will be hard to have exactly the same number of trials in all conditions.

No matter what, programming cognitive psychological experiments require some coding. Of course, you can just use a library example.

Run the demo

In this example, you will use the keys b and n to indicate if you have seen the target stimulus (an L shape) or not. You will get feedback if you did it correctly or not and if the L shape was there or not. It is actually quite a difficult task.

Data output file

In PsyToolkit, the data output file is simply a textfile. The save line of the PsyToolkit experiment script determines what is being saved in the data output file. Typically, for each experimental trial, you would have exactly one line in your text file, and each number/word on that line gives you the information you need for your data analysis, such as the condition, response speed, and whether an error was made.

Meaning of the columns in the output datafile. You need this information for your data analysis.

Colum Meaning


Time between stimulus 1 and 2. Negative numbers mean that the target came first (if a t all). The negative numbers follow the convention of Duncan et al., 1994.


Stimulus 1


Stimulus 2


x pos of stimulus 1


y pos of stimulus 2


target present (1) or not (2)


response time (ms)


status (1=correct, 2=wrong, 3=slow)


If you have a PsyToolkit account, you can upload the zipfile directly to your PsyToolkit account. Watch a video on how to do that. If you want to upload the zipfile into your PsyToolkit account, make sure the file is not automatically uncompressed (some browsers, especially Mac Safari, by default uncompress zip files). Read here how to easily deal with this.

Further reading

  • Duncan, J., Ward, R., & Shapiro, K. (1994). Direct measurement of attentional dwell time in human vision. Nature, 396, 313-315.

  • Raymond, J.E., Shapiro, K.L., Arnell, K.M. (1992). Temporary suppression of visual processing in an RSVP task: an attentional blink? Journal of Experimental Psychology: Human perception and performance, 18, 849–860.