<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Kilohertz frame-rate two-photon tomography</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>08/01/2019</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10217089</idno>
					<idno type="doi">10.1038/s41592-019-0493-9</idno>
					<title level='j'>Nature Methods</title>
<idno>1548-7091</idno>
<biblScope unit="volume">16</biblScope>
<biblScope unit="issue">8</biblScope>					

					<author>Abbas Kazemipour</author><author>Ondrej Novak</author><author>Daniel Flickinger</author><author>Jonathan S. Marvin</author><author>Ahmed S. Abdelfattah</author><author>Jonathan King</author><author>Philip M. Borden</author><author>Jeong Jun Kim</author><author>Sarah H. Al-Abdullatif</author><author>Parker E. Deal</author><author>Evan W. Miller</author><author>Eric R. Schreiter</author><author>Shaul Druckmann</author><author>Karel Svoboda</author><author>Loren L. Looger</author><author>Kaspar Podgorski</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[he study of brain activity relies on tools with high spatial resolution over large volumes at high rates 1 . Fluorescent sensors enable recordings from large numbers of individual cells or synapses over scales ranging from micrometers to millimeters 2-5 . However, the intact brain is opaque, and high-resolution imaging deeper than ~50 µm requires techniques that are insensitive to light absorption and scattering. Two-photon imaging uses nonlinear absorption to confine fluorescence excitation to the high-intensity focus of a laser even in the presence of scattering. Since fluorescence is generated only at the focus, scattered emission light can be collected without forming an optical image. Instead, images are computationally assembled by scanning the focus in space. However, this serial approach creates a tradeoff between achievable frame rates and pixels per frame. Common fluorophores have fluorescence lifetimes of approximately 3 ns, requiring approximately 10 ns between consecutive measurements to avoid crosstalk 6 . The maximum achievable frame rate for a 1-megapixel raster-scanned fluorescence image is therefore approximately 100 Hz, but neuronal communication via action potentials and neurotransmitter release occurs on millisecond timescales 3,7,8 . Kilohertz megapixel in vivo imaging would enable monitoring of these signals at speeds commensurate with signaling in the brain.The pixel rate limit can be circumvented by efficient sampling 1,4,9 . When recording activity, raster images can be reduced to a lowerdimensional space after acquisition 10 , for example, by analyzing only regions of interest (ROI). Random-access microscopy 11,12 samples this lower-dimensional space more directly by only scanning targeted pixel sets, with an access time cost to move between targets. When targets are sparse, time saved by not sampling intervening areas substantially exceeds access times. Another efficient sampling approach is to mix multiple pixels into each measurement. Multifocal multiphoton microscopy scans an array of foci through the sample, generating an image that is the sum of those produced by each focus 13 . Axially elongated foci such as Bessel beams [14][15][16][17] 
ResultsScanned line angular projection microscopy (SLAP). We developed a microscope that combines benefits of random-access imaging and projection microscopy by performing tomographic]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>generate projections of a volume at the rate of two-dimensional images, and can be tilted to obtain depth information stereoscopically <ref type="bibr">15,</ref><ref type="bibr">17</ref> . We refer to these and related approaches <ref type="bibr">4,</ref><ref type="bibr">18</ref> as 'projection microscopy' because they deliberately project multiple resolution elements into each measurement. Projection microscopy samples space densely, providing benefits over random-access microscopy in specimens that move unpredictably (for example, awake animals or moving particles) or when targets are difficult to select rapidly (for example, dendritic spines). However, recovering sources from projected measurements requires computational unmixing <ref type="bibr">9,</ref><ref type="bibr">13</ref> .</p><p>Computational unmixing is used across imaging modalities to remove blurring <ref type="bibr">19,</ref><ref type="bibr">20</ref> , combine images having distinct measurement functions <ref type="bibr">[21]</ref><ref type="bibr">[22]</ref><ref type="bibr">[23]</ref> or separate overlapping signals <ref type="bibr">10</ref> , and is essential to emerging computational imaging techniques such as light field microscopy <ref type="bibr">[24]</ref><ref type="bibr">[25]</ref><ref type="bibr">[26]</ref> . Unmixing is usually posed as an optimization problem, using regularization to impose previous knowledge on the structure of recovered sources, such as independence <ref type="bibr">27</ref> or sparsity <ref type="bibr">10</ref> . If sources and measurements are appropriately structured, many sources can be recovered from relatively few mixed measurements <ref type="bibr">28</ref> in a framework called compressive sensing <ref type="bibr">9,</ref><ref type="bibr">[29]</ref><ref type="bibr">[30]</ref><ref type="bibr">[31]</ref> , potentially improving measurement efficiency in optical physiology <ref type="bibr">9</ref> . Highly coherent measurements (that is, that always mix sources together the same way) make recovery ambiguous, while incoherent measurements can guarantee accurate recovery <ref type="bibr">28</ref> . Tomographic measurements, which record linear projections of a sample along multiple angles, have low coherence because lines of different angles overlap at only one point. In medical imaging, compressive sensing using several tomographic angles has increased imaging speed and reduced radiation dose <ref type="bibr">31</ref> .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Articles</head><p>Nature Methods measurements from targeted sample regions. This microscope scans line foci across a two-dimensional sample plane at four different angles (Fig. <ref type="figure">1</ref>). Line foci achieve the same lateral resolution as points (Supplementary Fig. <ref type="figure">1</ref>), efficiently sample a compact area when scanned, produce two-photon excitation more efficiently than non-contiguous foci of the same volume and perform lowcoherence measurements. The resulting measurements are angular projections analogous to computed tomography <ref type="bibr">31</ref> .</p><p>This approach, which we call scanned line angular projection (SLAP) imaging, samples the entire field of view (FOV) with four line scans. Frame time is proportional to the FOV diameter in pixels d, compared to d 2 for a raster scan, resulting in greatly increased frame rates. For example, SLAP images a 250 &#215; 250 &#181;m <ref type="bibr">2</ref> FOV with 200 nm line spacing (analogous to pixel spacing) at a frame rate of 1,016 Hz.</p><p>To reduce sample heating and the number of pixels mixed into each measurement, we included a spatial light modulator (SLM) in an amplitude-modulation geometry. This configuration selects a user-defined pattern within the FOV for imaging and discards remaining excitation light, making SLAP a random-access technique (Supplementary Video 1). This avoids illumination of unlabeled regions, reducing excitation power in sparse samples (Supplementary Fig. <ref type="figure">2</ref>) and allows users to artificially introduce sparsity into densely labeled samples. Unlike other random-access methods, SLAP's frame rate is independent of the number of pixels imaged, up to the entire FOV.</p><p>Particle localization and tracking. Localization and tracking of isolated fluorescent particles are used to monitor organelle dynamics, detect molecular interactions, measure forces and perform super-resolution imaging <ref type="bibr">32</ref> . We demonstrated direct SLAP imaging of sparse samples by localizing and tracking particles. Each particle produces a bump of signal on each scan axis corresponding to its position, and each frame consists of the superposition of signals for all particles in view (Fig. <ref type="figure">2a,</ref><ref type="figure">b</ref>). Using the microscope's empirical measurement function, maximum likelihood reconstruction using Richardson-Lucy deconvolution <ref type="bibr">19,</ref><ref type="bibr">20</ref> produces accurate high-resolution images and error-free localization of sparse particles (Fig. <ref type="figure">2c,</ref><ref type="figure">d</ref>). At higher particle densities, maximum likelihood reconstruction produces spurious peaks in recovered images, which can be reduced by regularizing for sparsity (Fig. <ref type="figure">2e</ref>).</p><p>We performed three-dimensional SLAP recordings of thousands of 500 nm fluorescent beads flowing in a 250 &#181;m (diameter) &#215; 250 &#181;m (depth) volume (87 planes; 1,016 Hz frame rate, 5,080 measurements per plane, 10 Hz volume rate and 200 nm measurement spacing), corresponding to 1.4 billion voxels per second (Fig. <ref type="figure">2f</ref> and Supplementary Videos 2 and 3). Particles were readily tracked in the resulting volume videos with existing commercial software (Fig. <ref type="figure">2g</ref>).</p><p>Computational recovery of neural activity. SLAP achieves high frame rates by performing only a few thousand measurements per frame. Recovering images therefore requires a spatial prior, that is, a constrained sample representation with fewer unknowns than measurements. For neuronal activity imaging, we adopted a sample representation in which spatial components (dendritic segments) vary in brightness over time <ref type="bibr">10</ref> . The components are obtained from a raster-scanned reference volume, which we segment using a trained pixel classifier and a skeletonization-based algorithm that groups voxels into &#8804;1,000 contiguous segments per plane (Fig. <ref type="figure">3a</ref> and Supplementary Fig. <ref type="figure">3</ref>). Source recovery consists of determining the intensities X of each segment at each frame according to the following model:</p><p>are the measurements, each y t I is a frame, P is the microscope's measurement (projection) matrix, S encodes The SLAP microscope directs a laser beam through four distinct excitation paths in sequence during each frame. Rapid switching between paths is achieved by an electro-optic modulator and polarizing beam splitter. Galvo mirrors (E,F) switch each beam again, producing four paths. Each path contains optics that redistribute the beam intensity into a uniform line of a different angle. Paths are recombined and scanned using two two-dimensional galvo pairs (galvos A + B and C + D), and combined again at a nonpolarizing beam splitter. The fully recombined beam is relayed and forms an image on a reflective SLM, which selects pixels in the sample to be illuminated, discarding excess light. SLM-modulated light returns through the relay and is imaged into the sample. A separate beam is used for raster scans. b, Raster scanning an (N-by-N)-pixel image requires N 2 measurements. SLAP scans line foci to produce four tomographic views of the sample plane, requiring 4 &#215; N measurements.</p><p>the segmented reference image, each x t I is the vector of segment intensities on frame t, b is a rank-1 baseline and &#952; implements the indicator dynamics. T denotes the total number of frames recorded.</p><p>This model imposes a strong prior on the space of recovered signals. It enforces that the only changes in the sample are fluctuations in brightness of the segments, with positive spikes and exponential decay dynamics. Motion registration is performed on Y and S before solving. The term that must be estimated is the spikes, W &#188; w 1 ; w 2 ; &#188; ; w T &#189; &#57482; I . We estimate W by maximizing the likelihood of Y using a multiplicative update algorithm related to Richardson-Lucy deconvolution <ref type="bibr">33</ref> . Regularization is unnecessary because S has low rank by design. The solution is nearly always welldetermined by the measurements, but adversarial arrangements of segments are possible.</p><p>We simulated SLAP imaging and source recovery while varying parameters such as sample brightness and number of sources, assessed sensitivity to systematic modeling errors and explored performance with different numbers of tomographic angles (Supplementary Fig. <ref type="figure">4</ref>). Simulated recovery was highly accurate at signal-to-noise ratios that match our experiments, and robust to errors in model kinetics, segment boundaries or unexpected sources, but sensitive to motion registration errors. Correlations in source activity were recovered with low bias (Pearson r = 0.66; bias -0.0003 &#177; 0.0002, 95% confidence interval; Supplementary Fig. <ref type="figure">4g</ref>).</p><p>Validation in cultured neurons. We performed SLAP imaging in rat hippocampal cultures, which facilitate precise optical and electrical stimulation in space and time. First, we co-cultured cells expressing the cytosolic fluorophore tdTomato with cells expressing the glutamate sensor SF-Venus-iGluSnFR <ref type="bibr">34</ref> (yGluSnFR, Fig. <ref type="figure">3b</ref>). We imaged these cultures using one detector channel in which both fluorophores are bright, while electrically stimulating neurons to trigger yGluSnFR transients. TdTomato does not respond to stimulation, and any transients assigned to tdTomato-expressing cells must be spurious. This experiment tests the solver's ability to accurately assign fluorescence in space, which we quantified with reference to a ground truth two-channel raster image. Mean fluorescence transients assigned to yGluSnFR-expressing pixels were more than 52 times greater than transients for tdTomato pixels (tdTomato: mean 0.0078, maximum 0.0125, yGluSnFR: mean 0.4192, maximum 0.6525; Fig. <ref type="figure">3c</ref>), and no tdTomato pixels showed transients larger than 3% of the mean yGluSnFR amplitude, indicating that both frequency and amplitude of misassigned signals is low even in densely intertwined cultures.</p><p>Second, we imaged yGluSnFR-expressing neurons while sequentially uncaging glutamate for 10 ms at each of two locations, to assess timing precision of recovered signals (Fig. <ref type="figure">3d-g</ref> and Supplementary Video 4). Even though uncaging produced slow temporally overlapping transients, SLAP recordings reliably reported the 10 ms delay between these events (mean delay 9.7 &#177; 1.1 ms s.d., N = 5 recordings, see Fig. <ref type="figure">3f</ref>). Raw recordings clearly showed this delay and the lateral diffusion of glutamate signals <ref type="bibr">34</ref> (Fig. <ref type="figure">3g</ref>).</p><p>Third, we imaged electrically evoked action potentials in neurons labeled with the voltage-sensitive dye RhoVR.pip.sulf 35 (Supplementary Fig. <ref type="figure">5</ref>). We compared 1,016 Hz SLAP to widefield imaging of the same FOV. Suprathreshold field stimulation (90 V cm -1 ) elicited spikes reliably detected by both methods, while weaker stimulation (50 V cm -1 ) stochastically elicited spike patterns that differed across simultaneously recorded neurons, demonstrating SLAP's ability to record spikes from individual neurons at millisecond frame rates.</p><p>In vivo glutamate imaging. We next recorded activity in dendrites and spines of pyramidal neurons in mouse visual cortex. Pyramidal neuron dendrites are densely decorated with spines receiving excitatory glutamatergic input <ref type="bibr">5,</ref><ref type="bibr">36,</ref><ref type="bibr">37</ref> . Spines are often separated from each other and parent dendrites by less than 1 &#181;m (ref. <ref type="bibr">36</ref> ), making spine imaging particularly sensitive to resolution and sample movement. SLAP's high resolution (432 nm lateral, 1.62 &#181;m axial, see Supplementary Fig. <ref type="figure">1</ref>) and high frame rate allow precise (mean error &lt;100 nm) post hoc motion registration ideal for spine imaging (Supplementary Fig. <ref type="figure">6</ref>). Calcium transients within spines report N-methyl-d-aspartate (NMDA) receptor activation at synapses <ref type="bibr">37</ref> . However, NMDA receptors are activated by concurrent synaptic transmission and postsynaptic depolarization, not necessarily by synaptic transmission alone <ref type="bibr">38</ref> . Spine calcium transients are also triggered by other events, such as backpropagating action potentials. Nonlinearities in calcium currents and fluorescent sensors <ref type="bibr">39</ref> , and their slow timecourse, further complicate measurement of synaptic inputs using calcium sensors. iGluSnFR enables detection of glutamate transients at individual spines in cortex <ref type="bibr">34</ref> , potentially providing a complementary method to record synaptic activity and compare presynaptic to postsynaptic signals.</p><p>To investigate the relationship between spine glutamate and calcium transients, we imaged dendrites of pyramidal neurons co-expressing yGluSnFR.A184S and the calcium indicator jRGE-CO1a <ref type="bibr">40</ref> , while presenting lightly anesthetized (0.75-1% v/v isoflurane) mice with visual motion stimuli in eight directions (Fig. <ref type="figure">4a</ref>). Vertebrate visual systems show orientation tuning, with similar response amplitudes for a particular motion direction and its opposite <ref type="bibr">41</ref> . Raster imaging indicated overlapping but different response patterns for the two indicators (Fig. <ref type="figure">4b,</ref><ref type="figure">c</ref>). With trials containing dendrite-wide calcium transients removed, calcium responses were localized to a subset of spines, which showed large orientation selectivity indices (OSIs). At pixels with strongly tuned calcium responses, glutamate and calcium tuning curves were highly correlated, indicating that yGluSnFR can detect synaptic glutamate that drives calcium transients (Supplementary Fig. <ref type="figure">7</ref>). However, strongly tuned glutamate responses also occurred at spines with no calcium responses, and on dendritic shafts where no spine was visible (Fig. <ref type="figure">4c,</ref><ref type="figure">d</ref> and Supplementary Fig. <ref type="figure">7</ref>). The spatial scale of glutamate responses was larger than that of calcium (1/e 2 decay: 3.6 &#181;m yGluS-nFR.A184S; 1.3 &#181;m jRGECO1a, Fig. <ref type="figure">4e</ref>), indicating that yGluSnFR. A184S is sensitive to glutamate that escapes synaptic clefts, similar to its green parent sensor iGluSnFR.A184S <ref type="bibr">42</ref> . The affinity of iGluSnFR.A184S (0.6 &#181;M 34 ) is similar to that of the NMDA receptor (1.7 &#181;M 43 ). We therefore reasoned it could be used to investigate patterns of glutamate release relevant to NMDA receptor activation, but distinct from postsynaptic calcium transients.</p><p>We interleaved SLAP (1,016 Hz) and raster (3.41 Hz) recordings of FOV containing hundreds of spines of isolated yGluSnFR. A184S-labeled layer 2/3 pyramidal neurons in visual cortex while presenting drifting grating stimuli (Supplementary Videos 5 and 6). The two methods showed similarly tuned yGluSnFR responses (Fig. <ref type="figure">5a,</ref><ref type="figure">b</ref>). SLAP was more accurate than raster scanning at predicting the tuning of dendritic segments as measured with larger numbers of raster trials (Fig. <ref type="figure">5c</ref>; SLAP r = 0.35 &#177; 0.02, raster r = 0.28 &#177; 0.03; mean &#177; s.e.m., P = 0.015). Individual iGluSnFR. A184S transients rise in less than 5 ms and decay with time constant less than 100 ms <ref type="bibr">34,</ref><ref type="bibr">42</ref> . At orientation-tuned spines, SLAP recordings exhibited numerous high-speed transients (Fig. <ref type="figure">5d</ref>), with power spectral density greater than chance at all frequencies below 137 Hz (Supplementary Fig. <ref type="figure">8</ref>). To control for possible artifacts in imaging or source recovery, we generated a 'dead sensor' variant of yGluS-nFR (yGluSnFR-Null) that lacks a periplasmic glutamate-binding protein domain. yGluSnFR-Null showed equivalent brightness and localization to yGluSnFR, but did not show stimulus responses or significant high-frequency power (N = 4 sessions; Supplementary Fig. <ref type="figure">8</ref> and Supplementary Video 7).</p><p>Spatiotemporal patterns of brain activity encode sensory information, memories, decisions and behaviors <ref type="bibr">[44]</ref><ref type="bibr">[45]</ref><ref type="bibr">[46]</ref> . Neuronal activity exhibits transient synchronization at frequencies ranging from 0.01 to 500 Hz, giving rise to macroscale phenomena associated with distinct cognitive states <ref type="bibr">47</ref> . In cortex, synchronous activity reflects attention <ref type="bibr">44,</ref><ref type="bibr">48</ref> , task performance <ref type="bibr">48,</ref><ref type="bibr">49</ref> and gating of communication between brain regions <ref type="bibr">45,</ref><ref type="bibr">50</ref> . Synchronized input is prominent during specific phases of sleep and anesthesia <ref type="bibr">51</ref> , and is present in awake animals <ref type="bibr">45,</ref><ref type="bibr">52</ref> . Such patterns have been explored at the regional scale <ref type="bibr">53</ref> , but activity patterns sampled by dendrites of individual neurons have not been recorded with high spatiotemporal resolution.</p><p>Simultaneous multi-site recordings are essential for studying spatiotemporal activity patterns <ref type="bibr">53</ref> . SLAP recordings revealed spatiotemporally patterned dendritic glutamate transients lasting tens to hundreds of milliseconds, occurring both in the presence and absence of motion stimuli (Fig. <ref type="figure">6a</ref>). These transients were visible in raw yGluSnFR recordings before source recovery, but absent in yGluSnFR-Null (Fig. <ref type="figure">6b</ref>). In the absence of motion stimuli, cross-correlations in yGluSnFR activity peaked at delays less than 10 ms regardless of distance. During drifting grating stimuli, crosscorrelations peaked at delays proportional to the distance between segments (linear fit 0.28 &#177; 0.02 &#181;m ms -1 95% CI; P &lt; 1 &#215; 10 -11 , N = 10 sessions), indicating that activity patterns travel across cortical space as stimuli travel across the retina (Fig. <ref type="figure">6c</ref>). This cortical magnification (12.7 &#177; 0.7 &#181;m per degree of visual field) was consistent with previous measurements over larger spatial scales <ref type="bibr">54</ref> . Crosscorrelations in yGluSnFR-Null recordings peaked weakly at a delay of 0 ms regardless of distance or stimuli.</p><p>To quantify synchrony, we selected dendritic segments with stimulus-evoked responses and counted the proportion that were significantly active in each frame. The distribution of these counts can be compared to the null distribution obtained by shuffling traces for each segment among trials of the same stimulus type (Fig. <ref type="figure">6d</ref>). Synchronization results in a higher probability of many segments all being active or all being inactive at the same time. yGluSnFR activity was synchronized across segments both in the presence and absence of motion stimuli in each session recorded (N = 10 sessions; Kolmogorov-Smirnov test, P &lt; 0.001). We compared the frequency spectrum of population fluctuations to the corresponding spectrum for the per-stimulus shuffled null. Activity was significantly more synchronized than yGluSnFR-Null controls at all frequencies below 117 Hz (during motion stimuli), or 73 Hz (blank screen) (two-sided t-tests, P &lt; 0.05; Fig. <ref type="figure">6e</ref>). Highly synchronous events (P &lt; 0.01 under the null) were slightly more frequent in the presence versus absence of motion stimuli (8.8% versus 7.6% of frames; N = 10 sessions; twosided paired t-test, P = 0.03; Fig. <ref type="figure">6f</ref>).</p><p>We investigated the spatial structure of synchronous activity by using principal component analysis (PCA) and non-negative matrix factorization (NMF) to identify spatial modes (that is, weighted groups of segments) that account for a large fraction of variance in our recordings. We used PCA to factorize recordings for each stimulus direction separately, after subtracting variance attributable to trial time, segment or stimulus identities. The strongest resulting spatial modes were similar across all stimuli, and were not correlated to brain movement (Supplementary Fig. <ref type="figure">9</ref>), indicating that a few motifs account for most fluctuations in glutamate release across stimulus contexts. The largest PCA mode accounted for more variance in glutamate transients than did visual stimuli (adjusted R 2 , 10.3% versus 7.3%; P = 0.049, twosided paired t-test, N = 10 sessions). Using NMF, we found that the strongest modes in each recording consisted of spatially contiguous patches spanning 20-50 &#181;m of dendrite (Fig. <ref type="figure">6g,</ref><ref type="figure">h</ref>). We quantified this spatial organization by calculating the correlation in mode weights between pairs of segments as a function of their distance. Across recordings, the strongest modes were spatially structured on a scale of approximately 50 &#181;m, while weaker modes showed less spatial structure (Fig. <ref type="figure">6i</ref>). We investigated these correlations by raster scanning strips of cortex densely expressing yGluSnFR under the same experimental conditions. The spatial profile of correlations in these recordings matched that of single-neuron SLAP recordings (Supplementary Fig. <ref type="figure">10</ref>), suggesting that spatial modes represent regions of active neuropil. These regions may arise from local branching of single axons, or multiple synchronously active axons. Some spatial modes were strongly orientationtuned while others were not; across sessions, the largest mode was significantly tuned (Supplementary Fig. <ref type="figure">11</ref>; P = 2.5 &#215; 10 -4 , Fisher's combined test, N = 10 sessions). Together, these results indicate that cortical glutamate activity during anesthesia is organized into synchronously active spatial domains spanning tens of micrometers, and that individual pyramidal neurons sample several such domains with their dendritic arbors.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Discussion</head><p>Two-photon laser scanning microscopy enables imaging of submicrometer structures within scattering tissue, but its maximum pixel rate is limited by the sequential recording of pixels. Sophisticated raster scanning techniques <ref type="bibr">55</ref> now perform frame scanning at the limit imposed by fluorescence lifetime. To exceed this limit, random-access imaging and projection microscopy can exploit previous knowledge of structured samples. SLAP combines these two approaches to enable diffraction-limited kilohertz frame-rate recordings of FOV spanning hundreds of micrometers. Compared to acousto-optic deflector random-access imaging, SLAP allows post hoc motion compensation and higher frame rates for large numbers of targets, but acousto-optic deflector-based imaging enables higher frame rates for small numbers of targets. Compared to multifocal and Bessel beam microscopy, SLAP benefits from lower coherence, higher frame rates and random-access excitation, but requires axial scanning to record volumes, whereas the other projection methods can simultaneously record from multiple axial coordinates. Compared to compressive sensing methods using sparsity priors, SLAP activity imaging avoids explicit regularization parameters, which can strongly affect reconstructed images and be difficult to set. Instead, SLAP uses indicator dynamics and a segmented sample volume as clearly interpretable domain-specific regularizers.</p><p>As with any projection microscopy method, adversarial arrangements of sources can create ambiguities. In particular, densely packed sources or dim sources neighbored by very bright sources may be recovered less precisely. SLM masking allows dense or bright regions to be blocked or dimmed, ameliorating these issues. The maximum number of sources for accurate recovery by SLAP is approximately 1,000 per plane. This condition is readily achieved in sparsely labeled samples or with SLM masking in densely labeled samples. SLAP can also record high-resolution signals in densely labeled samples without SLM masking if activity is sparse. For example, we used SLAP to detect and localize activity 300 &#181;m deep within cortex densely labeled with the acetylcholine sensor SF-Venus.iAChSnFR.V9 (P. Borden and L. Looger, personal communication), triggered by electrical stimulation of the cholinergic nucleus basalis (Supplementary Fig. <ref type="figure">12</ref>). Punctate (&lt;2 &#181;m extent) and rapid (&lt;30 ms) stimulation-induced transients could be identified and backprojected to their origin in pixel space. Such brief and localized signals would be extremely difficult to detect with other methods without previous knowledge of their location, highlighting the combination of spatial resolution, sampling volume and speed achieved by SLAP. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Articles</head><p>Nature Methods</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Methods</head><p>Optics. The microscope (Fig. <ref type="figure">1</ref>) directs a single laser source (Yb:YAG, 1,030 nm, 190 fs, tunable repetition rate 1-10 MHz; BlueCut, Menlo Systems) through four distinct excitation paths during each frame. An electro-optic modulator rotates the beam polarization, enabling rapid switching between two paths at a polarizing beam splitter. A galvanometer mirror on each path again switches the beam between two paths. This configuration allows the beam to be sequentially directed onto the four paths with switching time limited by the electro-optic modulator (&lt;2 &#181;s per switch). Only one path is illuminated at a time. Each path contains a line generator assembly, consisting of an aperture followed by a series of custom cylindrical lenses, which redistributes the Gaussian input beam into a uniform line of tunable aspect ratio. The two pairs of paths are recombined at two-dimensional galvo pairs. The resulting paths each pass through a scan lens and are combined using a nonpolarizing beam splitter. This results in a loss of 50% of the beam but allows the transmitted beam to have a single polarization required for amplitude modulation by the SLM. The beam is transmitted by a polarizing beam splitter and is relayed by scan lenses to form an intermediate image on the surface of a reflective liquid crystal SLM. Reflected light returns through the relay and the SLM-modulated pattern is directed to the sample at a polarizing beam splitter. The spatially modulated image is relayed by a tube lens and objective to the sample. Fluorescence emission is collected through the objective and reflected by a dichroic mirror to a non-imaging, non-descanned detection arm, as in conventional two-photon microscopes. We detect light with customized silicon photomultiplier modules (Hamamatsu). These detectors have high gain, high linearity and exceptionally low multiplicative noise (Supplementary Methods and Supplementary Fig. <ref type="figure">13</ref>), making them ideal for parallelized imaging, where large numbers of detected photons arrive simultaneously. Widefield epifluorescence illumination and camera detection (not shown) are coupled into the objective via a shortpass dichroic. For raster imaging, a different beam is introduced into the optical path by a flip mirror. The beam is scanned by one of the two-dimensional galvo pairs as in conventional two-photon microscopes.</p><p>The number of paths was chosen to best suit tradeoffs between optomechanical complexity and acquisition speed (favoring fewer paths), versus benefits to source recovery (favoring more paths). For example, three measurement axes are necessary and sufficient to localize particles at low density, but additional axes are needed to resolve ambiguities at higher densities. For a fixed photon budget, increasing the number of tomographic angles improved source recovery in activity imaging simulations in a sample-density dependent manner (Supplementary Fig. <ref type="figure">4h</ref>).</p><p>The line generator units (LG1-4) are used to impart a one-dimensional angular range onto the incoming two-dimensional Gaussian beam, such that when that beam is focused by a subsequent laser scanning microscope it makes a line focus with substantially uniform intensity distribution along the line, and diffractionlimited width in the focused dimension. The line generator uses three custommade cylindrical lenses (ARW Optical). The first lens (convex-concave) imparts a large, negative spherical aberration (in one dimension) to the beam, which transforms the initial spatial intensity distribution into a uniform angular intensity distribution. The two subsequent cylindrical lenses (concave-plano, plano-convex) refocus the light in one dimension onto the two-dimensional galvanometer mirrors. Thereafter, the microscope transforms the uniform one-dimensional angular intensity distribution at the pupil into a uniform one-dimensional spatial intensity distribution at the line focus at the sample. The relative lateral and axial translations of the first two cylindrical lenses allow an adjustment of the transform between the initial spatial intensity profile and subsequent angular intensity profile. Because spherical aberration alone cannot linearize an initial peaked power distribution over the entire initial distribution, a one-dimensional mask is used at the beginning of the line generator to remove the tails from the intensity distribution of the incoming beam. Because a sharp-edged mask at this location would create a one-dimensional symmetric diffraction pattern, a mask with toothed edge profile was used. Alternatively, the first two cylindrical lenses could be replaced by a suitable acylinder lens. Such a system would have fewer degrees of freedom to actively adjust the final line intensity distribution, but would allow an intensity transform function that can utilize the full tails of the initial spatial intensity distribution.</p><p>Detectors. The parallel excitation used in SLAP can result in large numbers of emitted photons (from 0 up to ~400 in our experiments) arriving simultaneously in response to a single laser pulse. This necessitates a detector with large dynamic range, and higher photon rates favor detectors with low multiplicative noise. SLAP uses silicon photomultiplier detectors (MPPCs; Hamamatsu, C13366-3050GA-SPL and C14455-3050SPL) for both raster scanning and fast line scan acquisitions. These detectors have extremely low multiplicative noise, sufficient gain to easily detect single photons, and are highly linear in their response within the range of photon rates we encounter, making the integrated photocurrent a precise measure of the number of incident photons (Supplementary Fig. <ref type="figure">13</ref>). The measured quantum efficiency of our detection path (for light originating from the objective pupil) is 32% at 525 nm and 20% at 625 nm. Detector voltage is digitized at 250 MHz, synchronized to laser emission via a phase-locked loop. Photon counts are estimating by integrating photocurrent within a time window following each laser pulse and normalizing to the integrated current for a single photon.</p><p>Optimizations for excitation efficiency. Economy of illumination power is critical for biological imaging <ref type="bibr">56</ref> , and conventional two-photon imaging is limited by brain heating under common configurations <ref type="bibr">57</ref> . We were concerned that sample heating from light absorption could limit the practicality of two-photon projection microscopy methods such as SLAP, because higher degrees of parallelization require a linear proportional increase in power to maintain two-photon excitation efficiency. Higher degrees of parallelization also make source recovery more challenging by increasing background excitation and mixing between sources. In general, parallel two-photon imaging methods benefit by using the lowest degree of parallelization compatible with an experiment's required frame rate <ref type="bibr">2,</ref><ref type="bibr">57</ref> .</p><p>SLAP uses a customized Yb:YAG amplifier delivering high pulse energies (&gt;9 W at 5 MHz) at 1,030 nm. The laser's pulse compressor was tuned to achieve the minimum pulsewidth at the sample, ~190 fs at 5 MHz. To maximize excitation efficiency, each measurement consists of a single laser pulse. We performed simulations to optimize the laser repetition rate given estimated nonlinear and measured thermal <ref type="bibr">57</ref> damage thresholds of the sample. The optimal rate (data available on request) is approximately 5 MHz for single-plane imaging and 1 MHz for volume imaging in simulations we performed. The optimum pulse rate differs between single-plane and three-dimensional imaging because the spatial extent of heating is broad (several mm), while nonlinear photodamage is local. When scanning in three dimensions, this local component is diluted over a larger volume while heating remains roughly constant, thus favoring higher pulse energies.</p><p>For a given focal area within the sample plane, coherent line foci produce more efficient two-photon excitation than arrays of isolated points. This effect is partly because the edges of isolated points produce weak excitation. Line foci have a lower perimeter-to-area ratio than isolated points, making excitation more efficient.</p><p>The microscope contains a SLM (ODPDM512-1030, Meadowlark Optics) that is used as an amplitude modulator to reject unnecessary excitation light. Cortical dendrites fill only a small fraction of their enclosing volume (&lt;3% of voxels in our segmentations of single labeled neurons), allowing the majority of excitation light to be discarded. We retain a buffer of several micrometers surrounding all points of interest to guard against brain movement. The fraction of the SLM that is active depends on the amplitude of motion and the sample structure but is approximately 10% in most of our dendritic imaging experiments, substantially decreasing average excitation power. For sufficiently sparse samples, the SLM and other optimizations outlined above allow SLAP to use less laser power than full-field raster scanning (Supplementary Fig. <ref type="figure">2</ref>). Powers used in experiments involving SLM masking were well below thermal damage thresholds for continuous imaging <ref type="bibr">57</ref> (Supplementary Table <ref type="table">1</ref>). One experiment did not use SLM masking (Supplementary Fig. <ref type="figure">12</ref>) and was conducted with a low duty cycle to avoid damage <ref type="bibr">57</ref> . We observed no signs of photodamage or phototoxicity in any of our experiments, and neuronal tuning and morphology were unaffected when reimaged 6 d after initial SLAP imaging (Supplementary Fig. <ref type="figure">14</ref>).</p><p>The combination of SLM masking and scanning used to vary the excitation pattern in SLAP produces much higher pattern rates (5 MHz) than can be achieved with SLMs alone (&lt;1 kHz), and more control over those patterns than scanning alone. This approach could be used similarly with other projection microscopy approaches, and is easiest to implement if all excitation foci can be made to lie in the plane of the SLM. Scan patterns. In the simplest scanning scheme, each frame consists of a single scan of each line orientation across the FOV. The maximum frame rate is determined by the cycle rate of the galvanometers, ~1,300 Hz for a 250 &#181;m FOV, limited by heat dissipation in the galvo servo controllers. We routinely image at 1,016 Hz, to synchronize frames with the refresh rate of our SLM, which would otherwise produce a mild artifact. We also use tiled scanning patterns for efficiently scanning larger FOV at only slightly reduced frame rates (for example, a 500 &#181;m FOV at 800 Hz for tiling factor 2). The frame rates achieved here could in principle be improved without substantial changes in the design, and are limited by a combination of scanner cycle rates and laser power. For an ideal scanner, the maximum frame rate at any resolution would be achieved at a laser repetition rate of ~100 MHz (a 20 times improvement over this work), above which the fluorescence lifetime would substantially mix consecutive measurements.</p><p>Raster imaging is performed using linear galvos (Fig. <ref type="figure">1</ref>, galvos C + D), shared with the line scanning path, by inputting a Gaussian beam that bypasses the line generator units. Galvo command waveforms were optimized for all scans using ScanImage's waveform optimization feature to maximize frame rate while maintaining a linear scan path. Linear galvos enable the alternating fast-axis scans used to produce unwarped reference images. An additional resonant scanner could, in principle, be added to the raster scan system.</p><p>Axial scanning is performed using a piezo objective stage (PIFOC P-725K085, Physik Instrumente). Three-dimensional SLAP imaging in Fig. <ref type="figure">2f</ref>,g was performed at a volume rate of 10 Hz using a continuous (rather than stepped) unidirectional scan. When performing source recovery for three-dimensional imaging data, we correct the microscope's projection function for the continuous linear movement of NAtuRE MEtHODS | www.nature.com/naturemethods the objective. SLAP is also compatible with a remote focusing system placed after the SLM in the optical path.</p><p>To maximize the cycle rate of the galvanometers and piezo objective mount during SLAP imaging, we optimized the control signals used to command the manufacturer-supplied servo controllers for these devices. We optimized command waveforms iteratively by measuring the error in the response waveform on each iteration and using second-derivative regularized deconvolution to update the command signal in a direction that reduces that error, while maintaining smoothness. These calibrations take less than 30 s and are performed once per set of imaging parameters. With this approach, we were able to drive our actuators over 50% faster within our position error tolerance (&lt;0.1% r.m.s. error) than with methods that account only for actuator lag.</p><p>Particle tracking experiments. Fluorescent beads (red fluorescent FluoSpheres, 0.5 &#181;m; Molecular Probes, diluted 1:10,000 in water) were sealed in a 2 mm diameter &#215; 2 mm deep well capped by a coverslip. A 250 &#215; 250 &#215; 250 &#181;m volume centered 150 &#181;m below the coverslip was imaged by sequentially scanning twodimensional planes while axially translating the objective in a unidirectional sawtooth scan, at 10 Hz volume rate, 1,016 Hz frame rate. We reconstructed volumes at a pixel spacing equal to the measurement spacing (200 nm), which matches the Nyquist criterion (187 nm) for the system's point spread function (440 nm full width at half maximum). This lateral pixel spacing corresponds to a voxel rate of 1.49 billion voxels per second. Reconstructions were performed using 30 iterations of three-dimensional Richardson-Lucy deconvolution, with a projection matrix that accounts for the movement of the piezo objective stage. Tracking was performed with a linear assignment problem tracking method in the commercial software ARIVIS v.2.12.4.</p><p>Hippocampal culture experiments. Rat hippocampal primary cultures were imaged 19-20 d after plating. For uncaging experiments, 3% of cells were nucleofected with a plasmid encoding CAG-SF.Venus-GluSnFR.A184V at time of plating. For experiments with tdTomato-labeled cells, a separate 3% of cells were nucleofected with a plasmid encoding CAG-tdTomato. In both cases, SLAP imaging was performed with a single channel using a 540/80 nm filter. For uncaging experiments, 10 &#181;M NBQX and 150 &#181;M Rubi-Glutamate (Tocris) were added to the imaging buffer (145 mM NaCl, 2.5 mM KCl, 10 mM glucose, 10 mM HEPES, pH 7.4, 2 mM CaCl 2 and 1 mM MgCl 2 ). Two-photon excitation power for culture experiments ranged from 39 to 42 mW at the sample. One-photon glutamate uncaging was performed with 420 nm fiber-coupled light-emitting diodes (LEDs) (Thorlabs M420F2). The tips of the fibers were imaged onto the sample plane through the same objective used for activity imaging. The two LEDs were activated at a current of 600 mA for 10 ms each in sequence.</p><p>For voltage imaging experiments (Supplementary Fig. <ref type="figure">5</ref>), hippocampal cultures were plated on glass-bottom dishes (Mattek) and bath labeled 7-9 d later with RhoVR.pip.sulf (SHA02-059, see Supplementary Fig. <ref type="figure">15</ref> and Supplementary Information), a rhodamine-based photoinduced electron transfer voltage indicator derivative of RhoVR <ref type="bibr">35</ref> . RhoVR.pip.sulf was added to media at a final concentration of 0.5 &#181;M (from 1,000&#215; stock in DMSO) for 20 min at 37 &#176;C, then replaced with imaging buffer for recording. Platinum wire stimulation electrodes (1 cm spacing) were placed into the bath. Action potentials were triggered by an SD-9 stimulator (Grass Instruments) with 1 ms, 90 V pulses. To generate asynchronous stochastic activity (Supplementary Fig. <ref type="figure">5b</ref>) the voltage was reduced to 50 V, and the following buffer was used: 145 mM NaCl, 2.5 mM KCl, 10 mM glucose, 10 mM HEPES, pH 7.4, 2 mM CaCl 2 and 1 mM MgCl 2 . We performed SLAP and onephoton widefield imaging over the same FOV. One-photon widefield imaging (excitation filter: AT540/25&#215;, dichroic: 565DCXR, emission filter: ET570LP, Chroma Technology; LED light source: MCWHL5, Thorlabs) was performed with an ORCA Flash 4.0 camera (Hamamatsu). For voltage imaging analysis, ROI were drawn manually. For one-photon recordings, traces were obtained by averaging intensity within the region of interest, and F 0 was defined as the average of each trace in the 100 ms before stimulus onset. For two-photon recordings, the two-dimensional ROI were projected into the measurement space (using the microscope measurement matrix P) to produce expected measurements. F 0 was defined by the lower convex hull of the measurements low-pass filtered in time, and subtracted from the measurements. The F 0 -subtracted data were unmixed using the ROI expected measurements using frame-independent non-negative least squares (MATLAB lsqnonneg). Excitation powers (SLAP: 31-33 mW, widefield: 0.5-0.7 mW, 250 &#181;M diameter illuminated area) were chosen to maximize signalto-noise ratios while minimizing photobrightening of the voltage indicator, which occurs at higher excitation powers. Wavesurfer software was used to synchronize imaging system components and stimulation. Surgical procedures. All animal procedures were in accordance with protocols approved by the HHMI Janelia Research Campus Institutional Animal Care and Use Committee (IACUC 17-155). We performed experiments with 19 C57Bl/6NCrl mice (females, 8-10 weeks at the time of the surgery). Each mouse was anesthetized using isoflurane in oxygen (3-4% for induction, 1.5-2% for maintenance), placed on a 37 &#176;C heated pad, administered Buprenorphine HCl (0.1 mg kg -1 ) and ketoprofen (5 mg kg -1 ), and its head gently affixed by a toothbar. A flap of skin and underlying tissue covering the parietal bones and the interparietal bone was removed. The sutures of the frontal and parietal bones were covered with a thin layer of cyanoacrylate glue. A titanium headbar was glued over the left visual cortex. We carefully drilled a ~4.5 mm craniotomy (centered ~3.5 mm lateral, ~0.5 mm rostral of lambda) using a high-speed microdrill (Osada, EXL-M40) and gently removed the central piece of bone. The dura mater was left intact. Glass capillaries (Drummond Scientific, 3-000-203-G/X) were pulled and beveled (30&#176; angle, 20 &#181;m outer diameter). Using a precision injector (Drummond Scientific, Nanoject III) we performed injections (30 nl each, 1 nl s -1 , 300 &#181;m deep) into 6-8 positions within the left visual cortex. For sparse labeling experiments, the viral suspension was composed of AAV9.CaMKII.Cre.SV40 (Penn Vector Core, final used titer 1 &#215; 10 8 genome counts (gc) per ml) mixed with a virus encoding the reporter at 5 &#215; 10 11 gc ml -1 (one of: AAV2/1.hSyn.FLEX.GCaMP6f.WPRE.SV40 (Penn Vector Core); AAV2/1.hSyn.FLEX.iGluSnFR-SF-Venus.A184S ('yGluSnFR. A184S'; Janelia Vector Core), AAV2/1.hSyn.FLEX.iGluSnFR-SF-Venus.NULL ('yGluSnFR-Null'; Janelia Vector Core); AAV2/1.hSyn.FLEX.iGluSnFR-SF-Venus. A184V ('yGluSnFR.A184V'; Janelia Vector Core); AAV2/1.hSyn.FLEX.NES-jRGECO1a ('jRGECO'; GENIE Project vector 1670-115) and AAV2/1.hSyn.FLEX. SF-Venus.iAChSnFR ('yAChSnFR'; a gift from P. Borden and L. Looger, Janelia Research Campus). For coexpression of jRGECO and yGluSnFR, we included both viruses at 5 &#215; 10 11 gc per ml each. The craniotomy was closed with a 4 mm round no. 1.5 cover glass that was fixed to the skull with cyanoacrylate glue. Animals were imaged 5-15 weeks after surgery.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Visual stimulation experiments.</head><p>A vertically oriented screen (ASUS PA248Q LCD monitor, 1,920 &#215; 1,200 pixels), was placed 17 cm from the right eye of the mouse, centered at 65&#176; of azimuth and -10&#176; of elevation. A high-extinction 500 nm shortpass filter (Wratten 47B-type) was affixed to the screen. Stimuli were drifting square-wave gratings (0.153 cycles per cm, 1 cycle per second, 22&#176; of visual field per second, 2 s duration) in eight equally spaced directions, spaced by periods of mean luminance, as measured using the microscope detection path. A value of 0&#176; denotes a horizontal grating moving upward, 90&#176; denotes a vertical grating moving rearward. Stimuli were created and presented using Psychtoolbox-3 (ref. <ref type="bibr">58</ref> ). Mice were weakly anesthetized with isoflurane (0.75-1% vol./vol.) during recording. Anesthetized mice were heated to maintain a body temperature of 37 &#176;C.</p><p>Reference images. Accurate registration and source recovery require minimally warped reference raster images. The SLAP user interface communicates with ScanImage (Vidrio Technologies), which is used to perform all point-scanning imaging. Raster images can be warped by many factors, including nonlinearity in the scan pattern, sample motion, and the 'rolling shutter' artifact of the raster scan. These errors must be corrected in the reference stacks to perform accurate source recovery. We compensate for warping by collecting two sets of reference images interleaved, one with each of the two galvos acting as the fast axis. We assume that motion is negligible during individual lines along the fast axis (~300 &#181;s), and that the galvo actuators track the command accurately along the slow axis. These assumptions allow recovery of unwarped two-dimensional images by a series of stripwise registrations. The axial position of the image planes is estimated by alignment to a consensus volume.</p><p>Segmentation. SLAP performs relatively few measurements per frame, which must be combined with some form of structural prior to obtain pixel-space images. For activity imaging, that structural prior is found by by segmenting a detailed raster reference image. The goal of segmentation is to divide the labeled sample volume into compartments such that the number of compartments in any imaging plane is less than the number of measurements, and the activity within each compartment is homogeneous. The segmentation forms the spatial basis for recovered signals; each segment corresponds to one source. We use a manually trained pixel classifier (Ilastik 59 in autocontext mode) to label each voxel in the volume as belonging to one of four categories: dendritic shaft, spine head, other labeled region or unlabeled background. We do not deconvolve the reference stack or attempt to label features finer than the optical resolution. Instead, we label features at the optical resolution and design the projection matrix P such that it accounts for the transformation from the point spread function of the raster scan to that of each line scan (Supplementary Fig. <ref type="figure">1</ref>). We use a skeletonizationbased algorithm to agglomerate labeled voxels into short segments of roughly 1.4 &#181;m, which approximately correspond to individual spines or short segments of dendritic shafts. Segments that are predicted to produce very few photon counts (after considering SLM masking) are merged with their neighbors. Most FOV contained 400-600 segments in the focal plane. In simulations with similar sample brightness and density to our in vivo recordings, source recovery performs well when there are less than 1,000 segments in the focal plane (Supplementary Fig. <ref type="figure">4b</ref>). Some analyses can be performed without a segmentation (for example, Supplementary Fig. <ref type="figure">12</ref>).</p><p>Measurement matrix. The microscope's measurement (projection) matrix P is measured in an automated process using a thin (&#171;1 &#181;m) fluorescent film (see measure_PSF in the software package). Images of the excitation focus in the film, collected by a camera, allow a correspondence to be made between the</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>NAtuRE MEtHODS | VOL 16 | AUGUST 2019 | 778-786 | www.nature.com/naturemethods</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_1"><p>NAtuRE MEtHODS | www.nature.com/naturemethods</p></note>
		</body>
		</text>
</TEI>
