A hardware system for real-time decoding of in vivo calcium imaging data
Zhe Chen,
Garrett J Blair,
Changliang Guo,
Jim Zhou,
Juan-Luis Romero-Sosa,
Alicia Izquierdo,
Peyman Golshani,
Jason Cong,
Daniel Aharoni,
Hugh T Blair
Affiliations
Zhe Chen
Department of Electrical and Computer Engineering, University of California, Los Angeles, Los Angeles, United States; Department of Psychology, University of California, Los Angeles, Los Angeles, United States
Department of Psychology, University of California, Los Angeles, Los Angeles, United States
Changliang Guo
David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, United States; Department of Neurology, David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, United States
Jim Zhou
Department of Electrical and Computer Engineering, University of California, Los Angeles, Los Angeles, United States
Juan-Luis Romero-Sosa
Department of Psychology, University of California, Los Angeles, Los Angeles, United States
Department of Psychology, University of California, Los Angeles, Los Angeles, United States; Integrative Center for Learning and Memory, University of California, Los Angeles, Los Angeles, United States
Peyman Golshani
David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, United States; Department of Neurology, David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, United States; Integrative Center for Learning and Memory, University of California, Los Angeles, Los Angeles, United States
Jason Cong
Department of Electrical and Computer Engineering, University of California, Los Angeles, Los Angeles, United States
David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, United States; Department of Neurology, David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, United States; Integrative Center for Learning and Memory, University of California, Los Angeles, Los Angeles, United States
Department of Psychology, University of California, Los Angeles, Los Angeles, United States; Integrative Center for Learning and Memory, University of California, Los Angeles, Los Angeles, United States
Epifluorescence miniature microscopes (‘miniscopes’) are widely used for in vivo calcium imaging of neural population activity. Imaging data are typically collected during a behavioral task and stored for later offline analysis, but emerging techniques for online imaging can support novel closed-loop experiments in which neural population activity is decoded in real time to trigger neurostimulation or sensory feedback. To achieve short feedback latencies, online imaging systems must be optimally designed to maximize computational speed and efficiency while minimizing errors in population decoding. Here we introduce DeCalciOn, an open-source device for real-time imaging and population decoding of in vivo calcium signals that is hardware compatible with all miniscopes that use the UCLA Data Acquisition (DAQ) interface. DeCalciOn performs online motion stabilization, neural enhancement, calcium trace extraction, and decoding of up to 1024 traces per frame at latencies of <50 ms after fluorescence photons arrive at the miniscope image sensor. We show that DeCalciOn can accurately decode the position of rats (n = 12) running on a linear track from calcium fluorescence in the hippocampal CA1 layer, and can categorically classify behaviors performed by rats (n = 2) during an instrumental task from calcium fluorescence in orbitofrontal cortex. DeCalciOn achieves high decoding accuracy at short latencies using innovations such as field-programmable gate array hardware for real-time image processing and contour-free methods to efficiently extract calcium traces from sensor images. In summary, our system offers an affordable plug-and-play solution for real-time calcium imaging experiments in behaving animals.