Image Manipulation code
These matlab scripts were created by Olga Dyakova in 2015. Feel free to use them to manipulate your own images, but please cite Dyakova et al, Nature Comm, 2015, when doing so.
To get the slope constant (alpha) of an image, use get_alpha.m
To change the slope constant (alpha) of an image, use change_slope.m
To bandpass filter an image, use bandpass_imfilt.m
To lowpass filter an image, use lowpass_imfilt.m
To calculate the effective RMS contrast of an image, use getrms.m
To create a random image use random_image.m
To get the slope constant (alpha) of an image, use get_alpha.m
To change the slope constant (alpha) of an image, use change_slope.m
To bandpass filter an image, use bandpass_imfilt.m
To lowpass filter an image, use lowpass_imfilt.m
To calculate the effective RMS contrast of an image, use getrms.m
To create a random image use random_image.m
Visual stimuli
We use Flyfly for displaying visual stimuli, which uses the psychophysics toolbox and Matlab run in a MacOSX or Ubuntu environment. Our latest set-up uses Ubuntu, Matlab 2015b, Psychophysics toolbox 3.0.13-Flavor: beta. The stimuli are displayed on an ROG monitor overclocked to run at 165 Hz, and controlled on a second monitor. For a detailed instruction of how to set up Ubuntu, matlab, dual displays, etc, see the manual originally developed by Demi Gao.
Jonas Henriksson developed Flyfly in 2010 as part of his master thesis. The software was further updated by Tomas Måhlberg in 2011. Since 2018, Richard Leibbrandt has given FlyFly a lot of TLC. A zip with the latest versions of the software can be downloaded here (3.1.3 here: and 3.2). Original manual for flyfly, and for version 3.2.
Jonas Henriksson developed Flyfly in 2010 as part of his master thesis. The software was further updated by Tomas Måhlberg in 2011. Since 2018, Richard Leibbrandt has given FlyFly a lot of TLC. A zip with the latest versions of the software can be downloaded here (3.1.3 here: and 3.2). Original manual for flyfly, and for version 3.2.
Data Acquisition software
Linus Nilsson developed SampSamp (1.3) as part of his Master of Science Program in Engineering Physics, during 2011 – 2012. The software utilizes Matlab and its data acquisition toolbox. We have only tried it on PCs running Windows and with NiDAQ cards. Manual here.
An alternative version 1.4 with slight modifications for longer recordings can be found here.
An alternative version 1.4 with slight modifications for longer recordings can be found here.