Abstract
Thus far, optical recording of neuronal activity in freely behaving animals has been limited to a thin axial range. We present a head-mounted miniaturized light-field microscope (MiniLFM) capable of capturing neuronal network activity within a volume of 700 × 600 × 360 μ m3 at 16 Hz in the hippocampus of freely moving mice. We demonstrate that neurons separated by as little as ~15 μm and at depths up to 360 μ m can be discriminated.
Reporting Summary.
Further information on experimental design is available in the Nature Research Reporting Summary linked to this article.
To understand the neuronal basis of complex and ethologically relevant behavior, scientists need fast, depth-penetrating volumetric imaging techniques that are compatible with free behavior and social interaction. Currently, volumetric calcium (Ca2+) imaging techniques capable of extracting information from the mammalian or avian brain require head fixation1–11. A number of portable, head-mounted miniature microscopes enable researchers to obtain recordings from freely moving animals12–18; however, none of these is capable of volumetric imaging. Recently, single-photon, widefield miniature microscopes (Miniscopes)14–18 based on gradient index (GRIN) rod lenses have enabled researchers to carry out long-term recording of hippocampal place cells16, as well as studies of the encoding of locomotion-relevant information in the dorsal striatum18 and the role of shared neural ensembles in the association of distinct contextual memories17. Given the three-dimensional architecture of neural circuits in the brain, a capability for volumetric recording would extend the acuity and scope of analyses of neural population dynamics underlying ethologically relevant and complex behaviors.
We overcame the aforementioned limitations by combining head-mounted Miniscope technology17 with light field microscopy (LFM)-based19–22 detection and a computational strategy based on constrained matrix factorization (seeded iterative demixing (SID))3. LFM allows one to capture volumetric information in a single exposure of a 2D image sensor, and SID extends the reach of LFM into the scattering mammalian brain3. Initial applications of LFM to Ca2+ imaging were limited to whole-brain imaging of small and semi-transparent organisms20. More recently, we demonstrated the extension of LFM to scattering mammalian brains by developing SID3. SID first extracts precise neuron-location information from remaining unscattered light in the raw data. It then uses this information to seed a constrained, non-negative spatiotemporal matrix factorization solver that is designed to demix scatter-induced cross-talk from the neuronal Ca2+ activity signals. Here we used SID to resolve neuronal activity in a 3D volume captured by a head-mounted Miniscope. Our MiniLFM allowed us to perform Ca2+ imaging within a volume of ~700 × 600 × 360 μ m3 at a 16-Hz volume rate, capturing the dynamics of ~810 neurons per imaging session at near-single-cell resolution in hippocampus of freely moving mice.
The hardware design of our MiniLFM differs from typical LFM implementations in two aspects. First, our MiniLFM design (Fig. 1a) leverages the open-source Miniscope platform17, a lightweight device compatible with implanted GRIN endoscopes that can be used to reach deep brain structures. Second, we replaced the typical configuration in which the focal plane of the microlens array (MLA) is relayed onto the camera sensor with a setup that allowed us to mount the MLA in front of the sensor (Fig. 1a, Supplementary Fig. 1 and Supplementary Note 1). Thus we incorporated only one additional optical element, the MLA, which kept the weight of our MiniLFM minimal while ensuring good overlap between the numerically simulated point-spread function (PSF) of the system (Fig. 1b, top) and the physical PSF (Fig. 1b, bottom) as needed to recover the volumetric data2,22 (Fig. 1c).
Fig. 1 |. Head-mounted miniature light field microscope (MiniLFM).
a, Explosion (left) and section (right) diagrams of MiniLFM. Some parts have been rendered transparently for visual clarity. CMOS, complementary metal-oxide semiconductor. b, Examples of simulated (top row) and experimental (bottom row) MiniLFM PSFs acquired with 4-μ m diameter beads, with the emitter on the optical axis and for three axial distances relative to the front focal plane of the GRIN objective lens. Scale bar applies to all images in the panel. Px, pixel. c, Example of a MiniLFM raw sensor image of GCaMP6f-labeled mouse hippocampus through an implanted GRIN objective. d, Reconstructed MiniLFM image of a USAF resolution target. Inset: profile across the region indicated by the yellow dotted line, showing the intensity profile at the finest resolved spatial frequency. e, Top, reconstructed MiniLFM image of a 1-μ m-diameter fluorescent bead. Bottom, the profile along the green dotted line in the image above. Black arrows indicate the full-width at half-maximum. f, Photo of an adult mouse with a head-mounted MiniLFM. b,d,e, Data shown are representative of two static characterization experiments on standard resolution targets. c,f, Data shown are representative of 12 recordings from 5 mice.
Our microscope achieves a lateral resolution of 80 line pairs per millimeter, corresponding to a spot size of ~6 μ m, and ~30-μ m axial resolution (Fig. 1d,e). However, in the presence of scattering, the optical resolution is not generally what determines the limits for neuron discrimination. The actual spatial discriminability is further affected by factors such as the amount of spatial overlap of the neurons’ scattered spatial footprints on the sensor, in combination with the similarity of their activity in time. We call the minimum distance between centroids at which two neurons can be robustly demixed the discrimination threshold, which we find to be ~15 μ m in our system.
The head-mounted module is portable and can be carried by an adult mouse, which allows the mouse under study to move freely in an arena (Fig. 1f and Supplementary Videos 1 and 2). We characterized the potential effect of device weight on animal agility by recording and quantifying an animal’s behavior on a linear track under three conditions: wearing a standard Miniscope, wearing a MiniLFM, and without a head-mounted device (Methods and Supplementary Fig. 2). Despite an expected trend of slight reductions in agility from animals without a device to animals wearing the Miniscope, and from animals wearing a Miniscope to animals wearing a MiniLFM, we found no significant differences (one-way ANOVA, P < 0.05 for all comparisons) in distance traveled, number of stops or average speed between MiniLFM and Miniscope groups (Supplementary Fig. 2).
We verified the performance of our MiniLFM by recording the spontaneous volumetric activity of hippocampal CA1 neurons in freely moving mice. Whereas the raw MiniLFM frames appeared blurred and did not allow the identification of individual neurons (Fig. 1c), the SID algorithm extracted neuronal positions and corresponding activity time series in the CA1 pyramidal and stratum radiatum layers down to a depth of 360 μ m (Fig. 2a–c and Supplementary Table 1). Moreover, volumetric recording with our method revealed the shape of the pyramidal layer clearly through a 3D rendering of our recording volume (Supplementary Video 3). In comparison to a widefield (non-LFM) Miniscope recording (Supplementary Video 4), the enhanced axial range and neuron-discrimination performance of the MiniLFM with SID was apparent. In a non-SID (i.e., conventional) deconvolution-based frame-by-frame reconstruction of the same raw data, only the most superficial and bright neurons were visible (Supplementary Video 5). An excerpt of the MiniLFM raw data is available as Supplementary Video 6. Figure 2d shows the distribution of the identified neurons as a function of tissue depth. Neurons spaced as little as ~8 μ m apart are present in the dataset, although values for nearest-neighbor neuron distance were most frequently in the range of 12–16 μ m (Fig. 2e).
Fig. 2 |. MiniLFM volumetric Ca2+ imaging to 360-μm depth in hippocampus of a freely moving mouse, and performance verification.
a, Neuron positions obtained by SID analysis of a 26-min recording at a 16-Hz frame rate in mouse hippocampus (top and side views). The empty region along the diagonal in the upper left plot corresponds to a blood vessel. b, Heat map of motion-corrected and de-noised temporal signals corresponding to the 807 neuron positions shown in a. The white rectangle indicates the region magnified in c. a.u., arbitrary units. c, Stacked neuronal activity traces for the region indicated by the white rectangle in b. d, Histogram of the neuron positions shown in a versus depth. e, Histogram of nearest-neighbor distances between the neurons shown in a. Inset: box plots of mutual information (mut. info.) for all pairs of neuronal activity traces shown in b versus neuron distance. Red bars, median; box shoulders, 25th and 75th quantiles; whiskers, extrema; n = 783 neurons. f, Comparison of example neuron positions and activity traces as obtained from segmentation of a planar 2PM recording (red circles and traces) and from SID analysis (green circles and traces) of a simultaneous MiniLFM recording of the same region, as described in the main text. The left-hand image is the reconstructed MiniLFM image that arose as one of the first intermediate results after application of the SID algorithm and was subsequently segmented to obtain the SID regions of interest, indicated by green circles. The background image in the middle is an s.d. projection of 2PM data along time. The scale bar applies to both images in the panel. Numbers 1–9 correspond to the traces on the right. Red traces are displaced vertically for clarity. g, Histogram of cross-correlation between ground-truth neuronal activity traces and MiniLFM–SID traces. The blue circles are the data points used to construct the histogram, and are overlaid by a box plot indicating the quantiles of their distribution (red line, median; box shoulders, 25th and 75th percentiles; whiskers, extrema; transparent blue circles, outliers; n = 67 neurons). h, Excess mutual information between pairs of SID traces and matching pairs of ground-truth traces (calculated by subtraction of the mutual information value for each pair of ground-truth traces from that of the corresponding pair of SID traces), showing the lack of a significant increase for low pair distances, which indicates the absence of cross-talk in SID (also see Supplementary Fig. 4). Box plot elements defined as in g; red crosses indicate outliers; 441 pairs formed from n = 30 neurons. Data are representative of 7 recordings from 4 mice (a–e) or 5 recordings from 2 mice (f–h). dF, normalized fluorescence change.
We identified temporal signals corresponding to the 807 active neurons in our 26-min example recording (Fig. 2b,c). We found that the typical shapes of Ca2+ transients as observed by other methods were reproduced faithfully, even for neurons at depths of ~360 μ m.
To validate this qualitative observation and to benchmark the ability of the MiniLFM in combination with SID to detect and demix the activity of nearby neurons within scattering mammalian brain, we modified our MiniLFM, which allowed us to obtain simultaneous functional ground-truth information on the activity of the same neurons: by coupling our MiniLFM with a tabletop two-photon scanning microscope (2PM), we were able to excite hippocampal CA1 neurons and detect neuronal activities simultaneously through the detection arm of the 2PM and the unmodified MiniLFM sensor module. We used a state-of-the-art signal-extraction algorithm followed by human inspection to establish the ground-truth neuron positions and activity traces from the 2PM data. We subsequently compared SID-extracted positions and activities to the ground truth (Supplementary Note 2 and Supplementary Fig. 3).
We observed good agreement between MiniLFM–SID data and the ground truth. We found that active neurons were detected accurately (precision score: 0.97 ± 0.02 (mean ± s.e.)) and reliably (sensitivity score: 0.79 ± 0.04) by SID, with an overall detection performance as quantified by F-score of 0.87 ± 0.03 (pooled across all recordings). More detailed examination of the data revealed that indeed both locations and neuronal signals overlapped well between MiniLFM–SID and ground-truth recordings (Fig. 2f). To obtain an upper bound (conservative estimate) for the performance of SID under our imaging conditions, we characterized the fidelity of the SID-extracted activity traces in two ways.
First, we calculated the cross-correlation between the individual SID-extracted traces and their ground-truth counterparts, and found a median value of 0.88, indicating high general overlap (Fig. 2g). Second, we derived a metric that quantifies any cross-talk that would originate from suboptimal demixing of neuronal activity for distinct neuronal pairs and investigated the resulting values as a function of neuronal pair distance. For large interneuron distances, where the effects of cross-talk are negligible, the resulting excess mutual information value reaches a plateau around a noise-limited baseline. For small neuronal-pair distances, however, our metric is expected to pick up any cross-talk-induced false similarities between traces that would result in a nonphysiological increase in the excess mutual information value. However, we did not detect any such increase in our recordings for smaller neuronal-pair distances (Fig. 2h). Thus, our approach can faithfully discriminate and achieve cross-talk-free demixing of neurons at separations of ~15 μ m or more (Supplementary Fig. 4).
To examine the potential influence of neuropil activity on neuronal signal quality, we recorded from animals that expressed a nucleus-localized version of GCaMP6f. We found similarly well-separated sources, low or no apparent signal cross-talk and good signal-to-noise ratios (Supplementary Fig. 5). These observations, together with our ground-truth verifications (Fig. 2f–h), suggest that neuropil contamination was not a critical issue under our experimental conditions. Under conditions with high densities of active neurons, a high percentage of imaging volume occupied by processes, or more severe scattering, nucleus-localized Ca indicators can be expected to help extend the reach of MiniLFM–SID imaging to greater depths.
The Miniscope body and skull-attached baseplate are designed to minimize the motion of the optical system with respect to the brain volume being imaged, as we verified with inertial sensor measurements (Supplementary Fig. 6). In addition, we developed and verified an algorithm that automatically detects and corrects residual motion effects in the raw imaging data, without requiring additional motion sensors (Supplementary Note 3 and Supplementary Figs. 7 and 8).
The maximum imaging depth for the MiniLFM is currently limited by fluorescence originating outside of the axial range, as well as by the optical aberrations that GRIN lenses exhibit off the optical axis. More accurate modeling of GRIN aberrations in PSF simulations or the use of aberration-corrected compound GRIN objectives would allow for improvement of the field of view and resolution of MiniLFMs. Moreover, although we chose to demonstrate our method in hippocampus, which has been the focus of a number of recent biological studies involving free movement and head-mounted microscopes16,17, our method is also applicable to other brain regions: deeper areas could be reached by implantation of longer and thin GRIN relay objectives, whereas for more superficial regions such as the cortex, one could use standard optical elements with lower optical aberration and longer working distances, which do not require implantation.
Overall, our MiniLFM design—which combines LFM, SID and Miniscope technology—enables fast volumetric imaging with low photobleaching and phototoxicity in scattering tissue of freely moving animals. Our MiniLFM design establishes a simple and extensible platform that could be customized and adapted for animals other than mice. Together with the computational efficiency and neuron-discrimination capability of the SID algorithm, our approach offers a platform for population-level studies of neural information processing in freely behaving animals and opens the door to analysis of the neuronal basis of social interaction.
Methods
Miniature head-mounted light-field microscope.
Our MiniLFM design is based on the open source Miniscope project18: blue light from an LED is collimated by a ball lens, passed through an excitation filter (Chroma; ET470/40×) and reflected off a dichroic mirror (Chroma; T495lpxr). A GRIN lens (Edmund; 64–520; 0.5-NA (numerical aperture), 0.23 pitch, 1.8-mm diameter, 3.93-mm length, working distance of ~200 μ m at 530 nm) is implanted surgically such that its focal plane coincides with the axial center of the sample region of interest (surgical procedures are described below). Excitation light passes through the GRIN lens, which also collects fluorescence light. Fluorescence then passes through the dichroic mirror, an emission filter (Chroma; ET525/50 m), and an achromatic doublet tube lens (Edmund; 45–207; f = 15 mm) that forms an 8.93-fold-magnified image of the GRIN front focal plane. An MLA (RPC Photonics; MLA-S-100-f8; f = 780 μ m; microlens pitch, 100 μ m; square pattern, no gaps, diced to 13 × 13 mm; 2-mm substrate thickness) is placed in this image plane, and the image sensor (On Semiconductor; MT9M001C12STM; 1.3 megapixels; 5.2-μ m pixel size; rolling shutter) is placed in the focal plane of the MLA. To accommodate the MLA, we elongated the part holding the image sensor by 2.7 mm compared with the Miniscope design. The MLA and sensor are aligned using a custom alignment rig (Supplementary Note 1 and Supplementary Fig. 1) and glued together with UV-curing glue. To guarantee a known magnification, the distance of the GRIN and tube lenses is fixed such that the two lenses are placed at the sum of their focal lengths. Readout electronics, firmware and software do not differ from those published by the Miniscope project (http://miniscope.org/). The full frame readout time of the sensor chip is 50 ms, which is short compared with the GCaMP6f rise time (200 ms); the effects of the rolling shutter readout pattern on neuron timing extraction therefore are negligible.
We note that the overall MiniLFM weight could be reduced through the use of a custom MLA with a thinner glass substrate (0.2 mm, available from same manufacturer), which we could not obtain in time for use before the submission of this paper. This would reduce the overall weight by ~15%, resulting in a system with an overall weight of < 4 g, and the implementation of the same improvements in the newest generation of Miniscope would result in an overall weight of ~2.7 g.
To improve the stability of the MiniLFM on the baseplate, we reinforced one facet of the MiniLFM body base with a thin 1 × 1.5 mm aluminum plate to allow for more rigid fixation to the baseplate with a setscrew. Stability could be improved further by the use of removable adhesives (such as silicone elastomers, the weight of which is negligible) to connect the body to the baseplate.
Signal extraction and data analysis.
Raw data were processed via a pipeline based on the recently established SID algorithm3. Briefly, after rank-1 matrix factorization for background subtraction, a motion metric based on the value range of the difference frames is calculated. The time series of raw frames is split at all time points where the motion metric exceeds a threshold, and the resulting low-motion segments are processed separately with the SID algorithm. For each of the segments, the s.d. image is calculated, reconstructed by constrained deconvolution with a simulated PSF of the system and segmented using a local maximum search. The resulting neuron candidate locations are used to seed a dictionary of spatial footprint templates that are iteratively updated by a constrained spatiotemporal matrix factorization algorithm that alternately updates the temporal (spatial) components while keeping the spatial (temporal) components fixed. This results in a set of neuron footprints (i.e., the set of images of each neuron on the LFM sensor) and temporal signals. The neuron footprints are reconstructed individually by deconvolution with the aforementioned simulated LFM PSF of the optical system. These reconstructed, volumetric images of each neuron are checked for spatial compactness and compatibility with an expected neuron size. Subsequently, the neuron footprints and temporal signals from all the low-motion segments are pooled (merging neurons with strongly overlapping footprints). The temporal signals at this stage may still exhibit short glitches due to weaker motion events. These glitches exhibit sudden increases or decreases in neuron brightness that last approximately 1–10 frames and are synchronized across most signals. We detect these motion glitches using the motion metric mentioned above (with optional manual additions) and interpolate the signals across the glitches by learning a model of genetically encoded calcium indicator (GECI) response dynamics23 on each neuron and using it to interpolate across the motion-affected frames. The same GECI response model also yields the estimated underlying firing rate that we show in Supplementary Fig. 7c. Because the model does not take into account a calibration of relative fluorescence change to underlying action potentials, the resulting calcium concentration and firing rate estimates are given in arbitrary units.
Simultaneous two-photon microscopy and MiniLFM recordings.
For verification of MiniLFM–SID results by comparison with simultaneously acquired two-photon microscopy data, awake mice (expressing GCaMP6f in hippocampus CA1, with an implanted GRIN lens, and with a metal headbar and MiniLFM baseplate attached to the skull; animal procedures are described in more detail below) were head-fixed but free to walk on a circular treadmill assembly2 that allowed for precise positioning and alignment of the mouse head. A modified MiniLFM device was interfaced with a commercial upright 2PM (Scientifica Slicescope with Coherent Chameleon Ultra II laser tuned to 920 nm, Olympus PlanApo N 1.25×/0.04-NA objective). The MiniLFM body was cut at the location of the fluorescence emission path, and a beamsplitter (Thorlabs BST10R) that transmitted two-photon excitation light and reflected 70% of the GCaMP emission was incorporated at that location, mounted at a 45° angle from the optical axis (Supplementary Fig. 3). The reflected GCaMP emission was passed through two infrared blocking filters (Thorlabs GFS900-A and Semrock Brightline 720SP) to remove two-photon excitation light and directed onto an unmodified MiniLFM detection module consisting of an MLA aligned and glued to a CMOS (complementary metal-oxide semiconductor) sensor, as described above. Transmitted GCaMP emission was directed into the 2PM objective and detected on a photomultiplier tube in the Slicescope non-descanned detection arm. The MiniLFM frame rate was set to 2 Hz, and the 2PM acquisition trigger was synchronized to the MiniLFM frame clock. The 2PM was set to acquire and average nine frames for each MiniLFM frame to maximize fluorescence excitation.
We acquired a total of five recordings from two mice, with each recording lasting 180 s. The MiniLFM data were processed with the SID algorithm as described above. For the 2PM data we used the CaImAn algorithm23 to detect active neurons and extract their signals. CaImAn output was inspected manually and corrected for false positive and false negative detections to establish a human-verified ground truth. The SID-detected neurons were then compared to the ground truth and classified as true/false positives/negatives, and correlations between paired SID and ground-truth temporal signals were calculated. In addition, excess mutual information was calculated as the difference between the mutual information value for each possible pair of ground truth neuronal activity traces and that for the corresponding pair of SID activity traces.
Quantification of animal agility.
Mice were trained (for five consecutive days) to run back and forth on an elevated linear track (37 cm above ground, 198 cm long, wall height of 2 cm) for water rewards offered in ‘base’ areas at either end of the track. After training was completed, mouse behavior was recorded by an overhead camera (HD webcam C615; Logitech) for each of the three conditions (no device mounted, with Miniscope, and with MiniLFM). One trial lasted 10 min, and three trials were carried out per day for each of the three mice (one trial for each condition, in permuted order) with intertrial resting periods of 1 h. Trials were repeated for three consecutive days, resulting in a total of 27 trials. We analyzed videos by manually evaluating the number of times each animal traversed the track and counting the number of stops. We calculated speed by measuring the distance traveled along the track with a screen ruler and dividing this value by the time required for the transversal (not including stops). The results are shown in Supplementary Fig. 2 (analyzed by one-way ANOVA as detailed in the figure legend) and discussed in the main text.
Experimental model and subject details.
All animal procedures were in compliance with the National Institutes of Health Guide for Care and Use of Laboratory Animals and were approved by the Institutional Animal Care and Use Committee (IACUC) at The Rockefeller University (protocol number 15848-H).
Mice were obtained from The Jackson Laboratory (C57BL/6J) and typically group-housed with a 12/12-h light/dark cycle in standard cages, with food and water ad libitum.
Animal surgery and in vivo Ca2+ imaging of freely moving mice.
Adult (P90+) male and female C57BL/6J wild-type mice (n = 5) were anesthetized with isoflurane (1–1.5%; flow rate, 0.5–0.7 L/min) and placed in a stereotactic frame (RWD Life Science Co., Ltd., China). 250 nl of AAV1.Syn.GCaMP6f. WPRE.SV40 (titer, ~1012 viral particles/ml; AV-1-PV2822 Penn Vector Core) was injected in the posterior hippocampus at the following coordinates: 2.1 mm posterior to bregma, 2 mm lateral and –1.65 mm dorsoventral from the top of the skull. For the data shown in Supplementary Fig. 5, nucleus-localized AAV9. Syn.H2B.GCaMP6f.WPRE.Pzac2.1 was injected at the same titer. Injections were made with a microinjection controller (World Precision Instruments) using glass pipettes previously pulled and beveled, filled with mineral oil. One week after injection, the GRIN lens was surgically implanted. After the scalp had been removed and the skull had been cleared of connective tissues, a custom-made lightweight metal headbar was fixed onto the skull with cyanoacrylate adhesive (Krazy Glue) and covered with black dental cement (Ortho-Jet; Lang Dental, USA). The outline of the craniotomy was made with the injection site used as a reference. From the injection site, the midpoint of the craniotomy was set 0.5 mm closer to bregma. After the skull was removed, the cortex was aspirated with abundant cold saline solution until the corpus callosum became visible, and the horizontal striations were carefully removed until vertical striations became visible. When the entire area was clean and the bleeding had stopped, the GRIN lens was slowly inserted to a depth of 1.35 mm from the top of the skull and glued in place with Vetbond (3M). When dry, the rest of the skull was covered with black dental cement. To prevent postsurgical infections and postsurgical pain, mice were fed pellets with an antibiotic supplement (trimethoprim and sulfamethoxazole; Purina Mod 5053; LabDiet, MO) for 2 weeks and were given 1 mg/ml injections of meloxicam intraperitoneally (Putney, UK) for 3–5 d. Two weeks after the last surgery, the mice were anesthetized and placed in the stereotactic frame again so we could affix the baseplate of the miniature microscope. The baseplate was attached to the MiniLFM, and the alignment of the baseplate orientation was adjusted manually until the illuminated field of view was centered on the image sensor and the bright circles formed from diffuse illumination by the MLA on the sensor appeared symmetrical with regard to the center of the field of view. The baseplate was then glued in place with dental cement and Krazy Glue. The MiniLFM was removed as soon as the dental cement hardened, and the animal was returned to its home cage. At this point the animal was considered ready for imaging.
Imaging was done in experimental sessions lasting no longer than 1 h. The MiniLFM was snapped onto the affixed baseplate, where it was held in place by small magnets embedded in the baseplate and in the bottom face of the MiniLFM, and additionally locked by a setscrew. The mice were placed into an open-field arena or a linear track where they were allowed to walk freely during the recording session (Supplementary Video 1).
Supplementary Material
Acknowledgements
We thank M. Colombini (IMP Vienna) and J.M. Petrillo (Rockefeller University) for manufacturing of mechanical components and advice on mechanical design issues. We are grateful to M. Chen and A. Pernía-Andrade for advice on surgeries and viral injections. T.N. acknowledges support from the Leon Levy Foundation (Leon Levy Fellowship in Neuroscience). This work was supported in part by the Human Frontiers Science Program Project RGP0041/2012 (to A.V.), the Institute of Molecular Pathology (to M.I.M. and A.V.), the Kavli Foundation (to A.V.), the Smith Family Foundation (to D.D.C.), the Harvard Mind Brain Behavior Interfaculty Initiative (to D.D.C.), the Intelligence Advanced Research Projects Activity (IARPA; Department of Interior/Interior Business Center (DoI/IBC) contract number D16PC00002 to A.V. and D.D.C.) and the National Science Foundation (grant no. DBI-1707408 to A.V. and P.G.).
Footnotes
Methods
Methods, including statements of data availability and any associated accession codes and references, are available at https://doi.org/10.1038/s41592-018-0008-0.
Code availability. The custom-written Java and R code implementing focal-spot analysis for LFM alignment, as well as Matlab code implementing the signal-extraction and motion-detection pipeline, is available online as Supplementary Software published with this paper under the license terms included with the Supplementary Software package. To execute the code, the SID package published as Supplementary Software with ref.3 and available at https://github.com/vazirilab is required.
Data availability. The data that support the findings of this study are available from the corresponding author upon reasonable request.
Competing interests
The authors declare no competing interests.
Supplementary information is available for this paper at https://doi.org/10.1038/s41592-018-0008-0.
Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Yang W & Yuste R Nat. Methods 14, 349–359 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Prevedel R et al. Nat. Methods 13, 1021–1028 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Nöbauer T et al. Nat. Methods 14, 811–818 (2017). [DOI] [PubMed] [Google Scholar]
- 4.Duemani Reddy G, Kelleher K, Fink R & Saggau P Nat. Neurosci 11, 713–720 (2008). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Katona G et al. Nat. Methods 9, 201–208 (2012). [DOI] [PubMed] [Google Scholar]
- 6.Botcherby EJ et al. Proc. Natl Acad. Sci. USA 109, 2919–2924 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Ahrens MB, Orger MB, Robson DN, Li JM & Keller PJ Nat. Methods 10, 413–420 (2013). [DOI] [PubMed] [Google Scholar]
- 8.Bouchard MB et al. Nat. Photonics 9, 113–119 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Yang W et al. Neuron 89, 269–284 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Lu R et al. Nat. Neurosci 20, 620–628 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Song A et al. Nat. Methods 14, 420–426 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Helmchen F, Fee MS, Tank DW & Denk W Neuron 31, 903–912 (2001). [DOI] [PubMed] [Google Scholar]
- 13.Zong W et al. Nat. Methods 14, 713–719 (2017). [DOI] [PubMed] [Google Scholar]
- 14.Flusberg BA et al. Nat. Methods 5, 935–938 (2008). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Ghosh KK et al. Nat. Methods 8, 871–878 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Ziv Y et al. Nat. Neurosci 16, 264–266 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Cai DJ et al. Nature 534, 115–118 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Barbera G et al. Neuron 92, 202–213 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Levoy M, Ng R, Adams A, Footer M & Horowitz M ACM Trans. Graph 25, 924 (2006). [Google Scholar]
- 20.Prevedel R et al. Nat. Methods 11, 727–730 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Pégard NC et al. Optica 3, 517–524 (2016). [Google Scholar]
- 22.Broxton M et al. Opt. Express 21, 25418–25439 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Pnevmatikakis EA et al. Neuron 89, 285–299 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.


