Calcium imaging provides an indirect observation of the underlying neural dynamics and enables the functional analysis of neuronal populations. However, the recorded fluorescence traces are temporally smeared, thus making the reconstruction of exact spiking activity challenging. Most of the established methods to tackle this issue are limited in dealing with issues such as the variability in the kinetics of fluorescence transients, fast processing of long-term data, high firing rates, and measurement noise. We propose a novel, heuristic reconstruction method to overcome these limitations. By using both synthetic and experimental data, we demonstrate the four main features of this method: 1) it accurately reconstructs both isolated spikes and within-burst spikes, and the spike count per fluorescence transient, from a given noisy fluorescence trace; 2) it performs the reconstruction of a trace extracted from 1,000,000 frames in less than 2 s; 3) it adapts to transients with different rise and decay kinetics or amplitudes, both within and across single neurons; and 4) it has only one key parameter, which we will show can be set in a nearly automatic way to an approximately optimal value. Furthermore, we demonstrate the ability of the method to effectively correct for fast and rather complex, slowly varying drifts as frequently observed in in vivo data. NEW & NOTEWORTHY Reconstruction of spiking activities from calcium imaging data remains challenging. Most of the established reconstruction methods not only have limitations in adapting to systematic variations in the data and fast processing of large amounts of data, but their results also depend on the user's experience. To overcome these limitations, we present a novel, heuristic model-free-type method that enables an ultra-fast, accurate, near-automatic reconstruction from data recorded under a wide range of experimental conditions.
Keywords: action potential; burst; calcium imaging; model free; reconstruction.