Extended Data Fig. 6: Validation of the pipeline for signal extraction from dense PCL videos using PMD–NMF.
From: Voltage imaging and optogenetics reveal behaviour-dependent changes in hippocampal dynamics

a, Illustration of the segmentation pipeline: raw videos were first corrected for motion, followed by photobleaching correction, PMD denoising, manual removal of blood vessels and demixing using NMF. The pipeline produced waveforms that correspond to individual cell traces and to the background (see Methods for details). b, Testing the pipeline using simulated data composed of two cells partially overlapping in space, and with varying levels of correlation in their subthreshold voltages and with the background. Poisson-distributed shot noise was added to each pixel to mimic experimental noise. Left, image of the input video pixel-wise s.d. and the output cell footprints. Middle, input waveforms and the pipeline output waveforms. Top right, correlation matrix of input signals (C1, C2, cells 1 and 2; B, background). Bottom right, cross-correlation of output waveforms with input waveforms, data are mean ± s.d. for n = 5 simulations. c, Performance of the pipeline as a function of input parameters (n = 5 simulations per condition). Top, output-to-input correlation and output C1-to-C2 cross-correlation as a function of the pixel noise level. Noise is scaled to the spike amplitude, input C1-to-C2 cross-correlation is 0.5 and the input correlation with the background is also 0.5. Middle, output-to-input correlation and output C1-to-C2 cross-correlation as a function of the correlation between the input and the background, at two noise levels. Input C1-to-C2 correlation is 0.5. Bottom, output-to-input correlation and output C1-to-C2 cross-correlation as a function of the cross-correlation between input C1 and C2 at two noise levels. Input correlation with background is 0.5. (data are mean ± s.e.m.). d, Testing the pipeline with composite videos composed from real data. We imaged FOVs with single oriens neurons spontaneously spiking in awake, resting mice. Each cell was imaged in the focal plane, and then at 20-μm defocus. The two videos were first processed with the pipeline to extract the ground-truth input signals and then the videos were summed such that the focused and defocused cells were about 50% overlapping. We then ran the blended videos through the pipeline and compared outputs to the input traces using cross-correlation analysis. e, Mean cross-correlograms of five FOVs processed as described in d, showing that the segmentation pipeline accurately reproduced the correlational structure of the inputs even under these challenging conditions. Data are mean ± s.e.m. (line and shading). f, Validation of the image segmentation pipeline using patch-clamp recording as the ground-truth. Top left, FOV with dense expression of paQuasAr3-s in CA1 PCL in an acute brain slice. The FOV was imaged while the voltage in the blue outlined cell was recorded by manual patch clamp. Bottom left, two of the spatial footprints identified by the PMD–NMF pipeline. Middle, ground-truth voltage recording (black), flat average region of interest around the cell (blue) and two PMD–NMF units (magenta and red). The flat average region of interest trace showed fluctuations that were not present in the patch-clamp recording, presumably from an out-of-focus cell. These events were absent in the magenta PMD–NMF demixed trace. Right, magnification of the indicated trace inset. Arrow indicates the out-of-focus event. This experiment was performed once.