Prusky Lab
News & Impact

You are here

Shady: a Software Engine for Real-Time Visual Stimulus Manipulation.

PUBLICATION: 
Journal Article
Authors: 
Hill NJ, Mooney SWJ, Ryklin E, Prusky GT.
Year Published: 
2019
Publisher: 
J Neurosci Methods. 2019 Apr 1. pii: S0165-0270(19)30104-9. doi: 10.1016/j.jneumeth.2019.03.020. [Epub ahead of print]
Identifiers: 
PMID: 30946876 | DOI: 10.1016/j.jneumeth.2019.03.020
Abstract on PubMed

Abstract

BACKGROUND: 

Precise definition, rendering and manipulation of visual stimuli are essential in neuroscience. Rather than implementing these tasks from scratch, scientists benefit greatly from using reusable software routines from freely available toolboxes. Existing toolboxes work well when the operating system and hardware are painstakingly optimized, but may be less suited to applications that require multi-tasking (for example, closed-loop systems that involve real-time acquisition and processing of signals).

NEW METHOD: 

We introduce a new cross-platform visual stimulus toolbox called Shady (https://pypi.org/project/Shady)-so called because of its heavy reliance on a shader program to perform parallel pixel processing on a computer's graphics processor. It was designed with an emphasis on performance robustness in multi-tasking applications under unforgiving conditions. For optimal timing performance, the CPU drawing management commands are carried out by a compiled binary engine. For configuring stimuli and controlling their changes over time, Shady provides a programmer's interface in Python, a powerful, accessible and widely-used high-level programming language.

RESULTS: 

Our timing benchmark results illustrate that Shady's hybrid compiled/interpreted architecture requires less time to complete drawing operations, exhibits smaller variability in frame-to-frame timing, and hence drops fewer frames, than pure-Python solutions under matched conditions of resource contention. This performance gain comes despite an expansion of functionality (e.g. "noisy-bit" dithering as standard on all pixels and all frames, to enhance effective dynamic range) relative to previous offerings.

CONCLUSIONS: 

Shady simultaneously advances the functionality and performance available to scientists for rendering visual stimuli and manipulating them in real time.

Associated

Research Methods