The simultaneous imaging and manipulating of neural activity could enable the functional dissection of neural circuits. Here we have combined two-photon optogenetics with simultaneous volumetric two-photon calcium imaging to measure and manipulate neural activity in mouse neocortex in vivo in three-dimensions (3D) with cellular resolution. Using a hybrid holographic approach, we simultaneously photostimulate more than 80 neurons over 150 μm in depth in layer 2/3 of the mouse visual cortex, while simultaneously imaging the activity of the surrounding neurons. We validate the usefulness of the method by photoactivating in 3D selected groups of interneurons, suppressing the response of nearby pyramidal neurons to visual stimuli in awake animals. Our all-optical approach could be used as a general platform to read and write neuronal activity.
The precise monitoring and control of neuronal activity may be an invaluable tool to decipher the function of neuronal circuits. For reading out neuronal activity in vivo, the combination of calcium imaging of neuronal populations (  ) with two-photon microscopy (  ), has proved its utility because of its high selectivity, good signal-to-noise ratio, and depth penetration in scattering tissues ( [3-9] ). Moreover, two-photon imaging can be combined with two-photon optochemistry ( [10,11] ) or two-photon optogenetics ( [12-16] ) to allow simultaneous readout and manipulation of neural activity with cellular resolution. But so far, the combinations of these optical methods into an all-optical approach have been largely restricted to two-dimensional (2D) planes ( [10-14,16] ). At the same time, neural circuits are three dimensional, and neuronal sub-populations are distributed throughout their volume. Therefore, extending these methods to three dimensions (3D) appears essential to enable systematic studies of microcircuit computation and processing.
Here we employed wavefront shaping strategies with a customized dual-beam two-photon microscope to simultaneously perform volumetric calcium imaging and 3D patterned photostimulations in mouse cortex in vivo. For phostostimulation, we adopted a hybrid strategy that combines 3D holograms and galvanometer driven spiral scans. Furthermore, we used a pulse-amplified low-repetition-rate (200 kHz ~ 1 MHz) laser, which significantly reduces the average laser power required for photoactivation, and minimizes thermal effects and imaging artifacts. With this system, we photostimulated large groups of cells simultaneously in layer 2/3 of primary visual cortex (V1) in awake mice (>80 cells distributed within a 480 × 480 × 150 μm 3 imaged volume), while simultaneously imaging the activity of the surrounding neurons. Compared with other 3D all-optical approaches ( [17,18] ), which used scanless holographic photostimulation, our hybrid approach requires less laser power to stimulate per cell, and can thus simultaneously photostimulate more cells for a given fixed power budget.
This all-optical method is useful to analyze the function of neural circuits in 3D, such as studying cell connectivity, ensemble organization, information processing, or excitatory and inhibitory balance. As a demonstration, we photostimulated groups of pyramidal cells in 3D with high specificity, and also targeted a selective population of interneurons in V1 in awake mice, finding that stimulating the interneurons reduced the response of pyramidal cells to visual simuli.
We built a holographic microscope with two independent two-photon lasers, one for imaging and the other for photostimulation ( Figure 1 ). Each laser beam’s axial focal depth could be controlled without mechanical motion of the objective, yielding maximum flexibility while reducing perturbations to the animal. On the imaging path, we coupled a wavelength-tunable Ti:Sapphire laser through an electrically tunable lens (ETL, EL-10-30-C-NIR-LD-MV, Optotune AG) (  ) followed by a resonant scanner for high speed volumetric imaging. The ETL, as configured, provided an adjustable axial focus shift up to 90 μm below and 200 μm above the objective’s nominal focal plane. On the photostimulation path, we used a low-repetition-rate ultrafast laser coupled to a spatial light modulator (SLM, HSP512-1064, Meadowlark Optics) to shape the wavefront, allowing flexible 3D beam splitting that simultaneously targets the user defined positions in the sample ( Figure 1 ). The axial and lateral targeting error was 0.59 ± 0.54 μm and 0.82 ± 0.65 μm, respectively, across a 3D field of view (FOV) of 240 × 240 × 300 μm 3 (Materials and Methods). The SLM path was coupled through a pair of standard galvanometers that can allow for fast extension of the targeting FOV beyond that nominal addressable SLM-only range (  ). For optogenetics experiments, we actuated this pair of galvanometric mirrors to scan the beamlets in a spiral over the cell bodies of the targeted neuron (see Figure 1 for an exemplary 3D pattern with 100 targets on an autofluorescent plastic slide). We term this a ‘hybrid’ approach, as it combined holography with mechanical scanning, as opposed to purely holographic approach. For in vivo experiments, we imaged green fluorescence from the genetically encoded calcium indicator GCaMP6s or GCaMP6f (  ) and photostimulated a red-shifted opsin, C1V1-mCherry (  ). With switchable kinematic mirrors and dichroic mirrors, the lasers could be easily redirected to whichever path, and thus the system could also be utilized for red fluorophores and blue opsins.
Figure 1 Two-photon imaging and photostimulation microscope.
( A ) Dual two-photon excitation microscope setup. HWP, half-wave plate; ZB, zeroth-order beam block; SLM, spatial light modulator; ETL, electrically tunable lens; PMT, photomultiplier tube. ( B ) Schematics for simultaneous volumetric calcium imaging and 3D holographic patterned photostimulation in mouse cortex. ( C ) Exemplary 3D holographic patterns projected into Alexa 568 fluorescence liquid with its xz cross section captured by a camera. ( D ) Measured point spread function (PSF) in the axial (z) direction for two-photon excitation (photostimulation path). The full-width-at-half-maximum (FWHM) is 14.5 μm, corresponding to an NA ~ 0.35. ( E ) 100 spots holographic pattern spirally scanned by a post-SLM galvanometric mirror bleaching an autofluorescence plastic slide across five different planes. ( F ) A typical field of view showing neurons co-expressing GCaMP6s (green) and C1V1-mCherry (magenta). ( G ) Spike counts of target pyramidal cells in layer 2/3 of mouse V1 evoked by photostimulation with different spiral duration and average laser power (3 cells in each condition; mice anesthetized; 1 MHz repetition rate for photostimulation laser). The inset shows the cell-attached recording of a 10 ms spiral stimulation over five trials in a neuron. The red shaded area indicates photostimulation period. Error bars are standard error of the mean over cells.
We co-expressed GCaMP6s or GCaMP6f (  ) and C1V1-p2A (  ) in mouse V1 ( Figure 1 ), and excited them with 940 nm and 1040 nm light, respectively. The separation of their excitation spectrum allowed for minimal cross-talk between the imaging and photostimulation paths (Discussion). C1V1-expressed cells were identified through a co-expressed mCherry fluorophore. Single spikes can be evoked with very low average laser power (~2.25 mW with 20 ms spiral, or ~ 4.5 mW with 10 ms spiral, 1 MHz pulse train, layer 2/3 in vivo, Figure 1 ), latency and jitter (17.0 ± 4.2/8.5 ± 1.6 ms latency, and 2.0±1.5/0.5±0.3 ms jitter for the two conditions; jitter defined as the standard deviation of the latency). With a higher power (10 ~ 20 mW), neural activity could also be evoked with photostimulation duration as short as 1 ms ( Figure 2 ).
Figure 2 Comparison between spiral scan and scanless holographic approaches for photostimulation.
In the scanning approach, the laser spot is spirally scanned over the cell body; in the scanless approach, a disk pattern (~12 μm in diameter) is generated by the SLM, covering the entire cell body at once. ( A ) Photostimulation triggered calcium response of a targeted neuron in vivo at mouse layer 2/3 of V1, for different stimulation modalities. For each modality, the multiplication of stimulation duration and the power squared was kept constant over four different stimulation durations. The average response traces are plotted over those from the individual trials. ( B ) ΔF/F response of neurons on different photostimulation conditions [10 cells over two mice in vivo (photostimulated one at a time), layer 2/3 of V1, over a depth of 100 ~ 270 μm from pial surface; one-way ANOVA test show significant different response between spiral scan and scanless approach at the same power for stimulation duration of 20 ms, 10 ms and 5 ms. At 1 ms, the p value is 0.17]. For each neuron and each stimulation duration, the power used in the scanless disk modality is 1 and 1.8 times relative to that in the spiral scan. For each neuron and each modality, the multiplication of the stimulation duration and the power squared was kept constant over four different stimulation durations. The power used in the spiral scan with 20 ms duration varies from 2.2 mW to 5 mW for different cells. ( C ) Boxplot summarizing the statistics in ( B ). The central mark indicates the median, and the bottom and top edges of the box indicate the 25th and 75th percentiles, respectively. The whiskers extend to the most extreme data points (99.3% coverage if the data are normal distributed) not considered outliers, and the outliers are plotted individually using the '+' symbol. In this experiment, the mice are transfected with GCaMP6f and C1V1-mCherry. Repetition rate of the photostimulation laser is 1 MHz. The spiral scan consists of 50 rotations with progressively shrinking radius, and the scanning speed is adjusted to make different stimulation durations.
Compared with alternative scanless strategy like temporal focusing (  ;  ;  ;  ) or pure holographic approaches (  ), where the laser power is distributed across the whole cell body of each targeted neuron, our hybrid approach is simple, accommodates large numbers of simultaneous targets, and appears to have a better power budget for large population photostimulation in general. To test this, we compared the required power budget for hybrid approach and the scanless (pure holographic) approach at different photostimulation durations (20 ms, 10 ms, 5 ms and 1 ms). On our system, when photostimulation duration was above 5 ms, the hybrid approach required about half of the laser power than the scanless approach to evoke similar response in the neuron; at 1 ms photostimulation duration, the hybrid approach shows a trend with smaller power budget (but not significant, p=0.17 using one-way ANOVA test) than the scanless approach ( Figure 2 ). One reason for this difference is that the scanless approach employs a spatial multiplexed strategy, where the two-photon light is spatially distributed across the entire cell body; to maintain the two-photon excitation efficiency (squared-intensity) within its coverage area, a larger total power is typically required. The hybrid approach, on the other hand, is a combination of spatial (across different cells) and temporal (within individual cell) multiplexed strategy. While optimal strategy will depend on opsin photophysics, the opsin typically has a long opsin decay constant (  ) (10 s of millisecond) and this favors the hybrid approach because the opsin channels can stay open during the entire (multiple) spiral scans. But at very short duration, the limited number of laser pulses per unit area may contribute to an efficiency drop of the hybrid approach versus scanless approach.
We tested our 3D all-optical system by targeting and photoactivating selected groups of pyramidal cells throughout three axial depths of layer 2/3 of V1 in anesthetized mice, while simultaneously monitoring neuronal activity in those three planes (240 × 240 μm 2 FOV for each plane) at 6.67 vol/s. Neurons were photoactivated one at a time, or as groups/ensembles ( M neurons simultaneously, M = 3 ~ 27, Figure 3 ) and the majority of the targeted cells (86 ± 6%, Materials and Methods) showed clear calcium transients in response to the photostimulation ( Figure 3 ).
Figure 3 Simultaneous holographic photostimulation of pyramidal cells in vivo.
( A ) Contour maps showing the spatial location of the cells in three individual planes in mouse V1 (145 μm, 195 μm, and 245 μm from pial surface). Cells with shaded color are the targeted cells. ( B ) 2D overlap projection of the three planes in ( A ). ( C )-( E ) Representative photostimulation triggered calcium response of the targeted cells (indicated with red shaded background) and non-targeted cells, for different stimulation patterns. A total number of ( C ) 3, ( D ) 9, and ( E ) 27 cells across three planes were simultaneously photostimulated. The average response traces are plotted over those from the individual trials. ( F ) Histogram of individual targeted cell response rate (averaged across trials) in different stimulation conditions. The stimulation conditions are listed in ( H ). ( G ) Histogram of the percentage of responsive cells in a targeted ensemble across all trials in different stimulation conditions. ( H ) Response of the non-targeted cells to the photostimulation versus distance to their nearest targeted cell. ΔF/F is normalized to the averaged response of the targeted cells. The total number of photostimulation patterns for condition 1 ~ 7 in ( F ~ H ) is 34, 26, 12, 8, 6, 2, 1 respectively; and the total trial for each condition is 8 ~ 11. The mice were transfected with GCaMP6s and C1V1-mCherry. The photostimulation power is 4 ~ 5 mW/cell, and duration was 870 ms, 962 ms, and 480 ms for conditions 1, 2, and 3 ~ 7 respectively.
We further investigated the reliability of the photoactivation and also its influence on the activation of non-targeted cells – that is, cells within the FOV not explicitly targeted with a beamlet. We performed 8 ~ 11 trials for each stimulation pattern. Cells not responding to photostimulation under any condition were excluded in this analysis (see Materials and Methods). We characterize the response rate at the individual cell ( Figure 3 ) and the ensemble level ( Figure 3 ). The former characterizes the response rate of individual targeted cells in any stimulation pattern, and the latter characterizes the percentage of responsive cells within a targeted ensemble (defined here as ensemble response rate). As the simulatenously stimulated neurons number M increased, the response rate for both individual cells and ensembles remained high (both is 82 ± 9%, over all seven stimulation conditions). Although we had high targeting accuracy and reliability for exciting targeted cells, we also observed occasional activity in non-targeted cells (nonspecific activation) during photostimulation ( Figure 3 ). This was distance-dependent, and as the distance d between the non-targeted cells and their nearest targeted cells decreased, their probability of activation increased ( Figure 3 ). And, for the same d , this probability increased with M . The activation of the non-targeted cells may occur through different mechanisms, such as by direct stimulation (depolarization) of the cells through their neurites that course through the photostimulation region, or through synaptic activation by targeted cells, or by a combination of the two. In these experiments, we specifically used extremely long stimulation durations (480 ~ 962 ms) to maximally emulate an undesirable photostimulation scenario. The nonspecific activation was confined (half response rate) within d < 25 μm in all conditions ( M = 3 ~ 27 across three planes spanning a volume of 240 × 240 × 100 μm 3 ). Nonspecific activation could be reduced by increasing excitation NA (which is currently limited by the relatively small size of the activation galvanometer mirrors), using somatic-restricted expression ( [24,26,27] ), as well as sparse expression.
We then aimed to modulate relatively large groups of neurons in 3D. With the low-repetition-rate laser and hybrid scanning strategy (Discussion), the laser beam can be heavily spatially multiplexed to address a large amount of cells while maintaining a low average power. We performed photostimulation of 83 cells across an imaged volume of 480 × 480×150 μm 3 in layer 2/3 of V1 in awake mice ( Figure 4 ). With a total power of 300 mW and an activation time of ~ 95 ms, we were able to activate more than 50 cells. In one experiment, we further sorted target cells into two groups (40 and 43 cells respectively) and photostimulated them separately. More than 30 cells in each group were successfully activated simultaneously with clear evoked calcium transient. In another example, more than 35 cells out of a target group of 50 cells responded. These large scale photostimulations (>=40 target cells; Figure 4 ), show that 78 ± 7% of cells in the target ensemble can be successfully activated (excluding cells that never respond in any of the tested photostimulation pattern, 8 ± 3%, see Materials and Methods). Nonspecific photoactivation was more frequent for cells surrounded by target cells, but overall it was confined within 20 μm from the nearest target cell ( Figure 4 ). We also noted that cells that could be photoactivated individually or in a small ensemble may not get photoactivated when the number of target neurons increases. We hypothesize that this could be due to feed forward inhibition, as targeted pyramidal neurons may activate local interneurons, which then could suppress the firing of neighboring cells. These network interactions will be the subject of future study.
Figure 4 Large scale photostimulation of pyramidal cells in layer 2/3 of V1 in awake mice.
( A ~ C ) Simultaneous photostimulation of 40 cells, 43 cells and 83 cells across four planes in mouse V1 (150 μm, 200 μm, 250 μm and 300 μm from pial surface, with an imaged FOV of 480 × 480 µm 2 in each plane.). The contour maps show the spatial location of the cells in individual planes. Cells with black contour are the simultaneously targeted cells. The red shaded color shows the evoked ΔF/F in average. ( D ) Photostimulation triggered calcium response of the targeted cells (indicated with red shaded background) and non-targeted cells, corresponding to conditions shown in ( A ~ C ). The average response traces are plotted over those from a total of 11 individual trials. Those with a red dot indicate cells showing clear evoked calcium transient through manual inspection. ( E ) Number of target cells, number of total responsive cells across all trials, and cells that did not show any response in any photostimulation pattern, for four different photostimulation conditions. Condition 1 ~ 3 correspond to those in ( A ~ C ). Error bars are standard deviation over trials. ( F ) Response of the non-targeted cells to the photostimulation versus distance to their nearest targeted cell (for conditions shown in E). ΔF/F is normalized to the averaged response of the targeted cells. Error bars are standard error of the mean over different photostimulation conditions in (E). The mice were transfected with GCaMP6f and C1V1-mCherry. The photostimulation power was 3.6 ~ 4.8 mW/cell, and the duration was 94 ms (composing of 5 continuously repeated spiral scans).
Nonspecific excitation can be minimized with sparse stimulation, by simply reducing the likelihood of stimulating directly adjacent cells. One naturally sparse pool of cells are cortical interneurons. Different interneuron classes participate in cortical microcircuits that could serve as gateways for information processing (  ;  ). These interneurons are located sparsely in the cortex, yet are highly connected to excitatory populations (  ), and are known to strongly modulate cortical activity (  ). However, the effect of simultaneous stimulation of selective subset of interneurons with single cell resolution has not been studied in detail, as previous reports have largely relied on one-photon optogenetics where widespread activation is the norm (  ;  ) [but see Ref. (  ) for single cell interneuron stimulations]. To explore this, we used our all-optical approach to examine the effect of photoactivating specific sets of interneurons in 3D on the activity of pyramidal cells that responded to visual stimuli in awake head-fixed mice ( Figure 5 ).
Figure 5 Selective photostimulation of SOM interneurons suppresses visual response of pyramidal cells in awake mice.
( A ) Experiment paradigm where the SOM cells were photostimulated when the mouse received drifting grating visual stimulation. ( B ) Normalized calcium traces (ΔF/F) of representative targeted SOM cells and pyramidal cells that are responding to visual stimuli, without (left panel) and with (right panel) SOM cell photostimulation. The normalization factor of the ΔF/F trace for each cell stays the same across the two conditions. The shaded regions indicate the visual stimuli period. The symbols at the bottom of the graph indicate the orientations and contrast of the drifting grating (black, 100% contrast; gray, 10% contrast). ( C ) Histogram of the visual stimuli evoked ΔF/F change for different cell populations that show significant activity change (p<0.05, two-sample t-test over ~ 30 trials) due to SOM cell photostimulation ( M = 9, simultaneously photostimulated). Left panel, targeted SOM cells (7 out of 9 show significant responses to photostimulation). Middle and right panels, pyramidal cells responding to horizontal or vertical drifting-gratings respectively. The inset compares the activity of a representative cell without and with targeted SOM cell photostimulation; the shaded regions indicate the visual stimuli period; the red bar indicates the photostimulation period. ( D ) Spatial map of all recorded cells. Pyramidal cells responding to horizontal drifting-gratings and showing significant visual stimuli evoked ΔF/F change due to SOM cell photostimulation (p<0.05, two-sample t-test over ~30 trials) [cell population in the middle panel of C ] are color coded according to their ΔF/F change. The targeted SOM cells are outlined in red, and those responding are shaded in red. ( E ) Comparison of the orientation selectivity in normal situation and with SOM cells photostimulation, for a cell population that normally have strong orientation selectivity but responsive to SOM cells photostimulation. During SOM cell photostimulation, their selectivity is largely abolished (one-way ANOVA test). For individual cells, black and red lines indicate a significant difference in the visual stimuli evoked ΔF/F between the two conditions that the lines connect with (~30 trials, p<0.05, two-sample t-test), whereas gray lines indicate no significant difference. The SOM-cre mice were transfected with GCaMP6s and Cre-dependent C1V1-mCherry. The duration of visual stimuli was 2 s. The photostimulation power was ~ 6 mW/cell, and the duration was 2.8 s (composing of 175 continuously repeated spiral scans).
Using viral vectors, we expressed Cre-dependent C1V1 in somatostatin (SOM) inhibitory interneurons (SOM-Cre mice), while simultaneously also expressing GCaMP6s in both pyramidal cells and interneurons, in layer 2/3 of mouse V1. We first imaged the responses of pyramidal cells across three planes (separated by ~ 45 μm each) to orthogonal visual stimuli consisting of drifting grating without photostimulation. We then simultaneously photostimulated a group of SOM cells ( M = 9, with seven showing responses) across these three planes concurrently with the visual stimuli ( Figure 5 ; Materials and Methods). We observed a significant suppression (p<0.05, two-sample t-test) in response among 46% and 35% of the pyramidal cells that originally responded strongly to the horizontal and vertical drifting-grating respectively ( Figure 5 ). Moreover, the orientation selectivity of highly selective cells was largely abolished by SOM cell photoactivation ( Figure 5 ). This is consistent with reports that SOM cells inhibit nearby pyramidal cells with one-photon optogenetics in vivo ( [32,33] ) or with two-photon glutamate uncaging in vitro (  ). Our two-photon approach provides high precision 3D manipulation over groups of cells ( Figure 5 ), and simultaneous readout of neuronal activity across the network in vivo. Thus, our approach could be useful for dissecting the excitatory and inhibitory interactions in cortical circuits in vivo.
We describe here a 3D all-optical method that could be used to map the functional connectivity of neural circuits and probe the causal relationships between the activity of neuronal ensembles and behavior. We extend previous in vivo methods from planar to volumetric targeting, and increase the total number of cells that could be simultaneously photoactivated. This represents a significant advance of precision optogenetics towards large spatial scales and volumes. The dual beam path microscope facilitates independent control of imaging and photostimulation lasers, and is thus well suited for controlling and detecting neural activity, without any disturbing or slow movements of the objective. In the following sections we discuss our rationale for the design of the microscope and evaluate the results.
A- Minimization of laser power
To simultaneously photostimulate multiple cells with two-photon excitation, it is becoming common to use holographic approaches ( [12,14,17,18,24,35] ). Spatial light modulators can generate an ‘arbitrary’ 3D pattern on the sample, limited only by Maxwell’s equations, and the space-bandwidth product of the modulation device. With SLMs, one can independently target a very large number of sites, far in excess of what we demonstrate here, but the number of addressable neurons is limited by the allowable power budget. Moreover, special care has to be taken to minimize the total power deposited on the brain, and avoid direct and indirect thermal effects (  ). We addressed this issue by using a hybrid holographic strategy and a low-repetition-rate laser for photostimulation, with high peak intensities for efficient two-photon excitation, but moderate average power. This allowed us to target a large group of cells with low average power (e.g. 83 targeted cells across an imaged volume of 480 × 480 × 150 μm 3 in awake mice V1 layer 2/3 with 300 mW in total, Figure 4 ). As these cells generally are not targeted continuously, we do not expect any heat induced effects on cell health under our stimulation conditions (  ).
In our hybrid strategy, a group of beamlets is generated by the SLM that target the centroids of the desired neurons. Each discrete focal point in the hologram maintains sufficient axial confinement for typical inter-cell spacing. These beamlets are then rapidly spirally scanned over the neurons’ cell bodies by post-SLM galvanometers. Several alternative scanless approaches exist: pure 3D holograms and another method combining holographic patterning and temporal focusing. The former approach directly generates the full 3D hologram covering the cell bodies of targeted neurons all at once (  ). Though simplest, the full 3D hologram has a decreased axial resolution as its lateral extend increases (  ), and is subject to light contamination to the non-targeted cells, particularly in scattering tissues such as the mammalian brain. In contrast, temporal focusing ( [38,39] ) decouples axial from lateral extent of the hologram by coupling the holographic pattern to a grating (  ) such that only one axial position in the sample has sufficient spectral content to generate a short laser pulse, thus tightening the axial confinement. Recent reports have extended this method to 3D stimulation( [23,24,40] ). Regardless of the exact implementation, these scanless approaches require higher laser powers per cell in general than our hybrid method. For example, with typical photostimulation duration (≥5 ms), about twice of the power is required using pure hologram compared with our hybrid strategy to achieve similar response in the same cells ( Figure 2 ). It would likely require even more power for the same excitation with temporal focusing, as its tighter axial confinement would excite less of the membrane. On the other hand, the area-activation of scanless activation generally gives lower latencies and less jitter, compared to scanning strategies. However, as we show in our hybrid scanning approach, even with low powers and longer scan times, we can obtain latencies under 10 ms, with little jitter (<1 ms). Taken together, the spiral scan strategy we adapted requires a lower laser power budget per cell, and is very scalable towards activating large number of simultaneously targeted cells, making it a practical tool to study ensembles in neural circuits.
One key strategy we exploited to lower the total average laser power in patterned photostimulation was to employ a low-repetition-rate laser for photostimulation. The average laser power P ave scales with the product of laser peak power P peak and pulse repetition rate f rep . Since the laser beam is split into M beamlets to target M individual cell, the two-photon excitation for each cell scales with ( P peak / M ) 2 (  ). To maintain the required P peak for a large M , we reduced f rep instead of increasing P ave . The two-photon photostimulation laser we used had a low f rep (200 kHz ~ 1 MHz), leading to a significant increase in P peak and thus the number of possible simultaneously targeted cells M , with the same P ave . We note that most opsins open ion channels, the average open time is much longer than the laser’s interpulse interval (1/ f rep ), and multiple ions can be conducted during each photostimulation. This is in contrast to fluorescence, where at most a single photon is emitted for each absorption, and the lifetime is significantly shorter than the interpulse interval. Thus opsins are ideal targets for low-repetition rate, high peak power excitation. In addition, the repetition rate should be balanced with the photostimulation duration. When the photostimulation duration is very short (e.g. 1 ms), the whole cell body might not be covered well with enough pulses in the spiral scan approach. In these scenarios, a higher repetition rate could be more favorable. The optimal conditions will likely be cell- and opsin-dependent, but would be expected to follow our trends.
B- Volumetric Imaging
We choose an ETL for volumetric imaging, because of its low cost and good performance for focusing. Many other options exist including SLM (  ), ultrasound lens (  ), remote focusing ( [43,44] ) and acousto optic deflector ( [45-47] ); see Ref. (  ), for a complete review. One future modification could be replacing the ETL with a second SLM to perform multiplane imaging (  ) and adaptive optics (  ), which could increase the frame rate and improve the imaging quality.
C- Minimizing Cross-talk between Imaging and Photostimulation
Another important consideration in our all-optical method was to minimize the cross-talk between imaging and photostimulation. We chose the calcium indicator GCaMP6 and the red-shift opsin C1V1-mCherry, which has a minimized excitation spectrum overlap. Nevertheless, there is still a small cross-talk between the two, as C1V1 has a blue absorption shoulder, and GCaMP6 has a red shifted absorption tail. The first cross-talk affects neuronal excitability, and is the result of photostimulation by the imaging laser. Although the C1V1 we used was red-shifted, it can still be excited at 920 ~ 940 nm, the typical wavelengths used to image GCaMP6. This cross-talk highly depends on the relative expression of the calcium indicators and opsin (  ;  ). For this reason, the imaging laser power was kept as low as possible to values that are just sufficient for imaging. But if the calcium indicator is weakly expressed, hence naturally dim, the increased imaging power may bias the neuronal excitability. Indeed, our cell-attached electrophysiology recording indicates that neuron firing rate has a trend to increase as the imaging laser power increases. However, we found no significant difference of the firing rate under our normal volumetric imaging conditions, where the laser power was typically below 50 mW and could be up to 80 mW for layers deeper than ~ 250 μm. Nevertheless, as red indicators keep improving, a future switch toward ‘blue’ opsins again will be desirable to reduce the spectral overlap between opsin and indicator.
The second type of cross-talk affects the high fidelity recording of neural activity, and is caused by fluorescence (or other interference) generated by the photostimulation laser directly, which may cause background artifact on the calcium signal recording. To avoid this, in our experiments we use a narrow filter (passband: 500 nm ~ 520 nm) for GCaMP6 signal detection. C1V1 is co-expressed with mCherry, which has negligible fluorescence at the filter’s passband. But, in addition, GCaMP6 can still be excited at the photostimulation laser’s wavelength at 1040 nm. Typically this fluorescence is weak and does not impact the data analysis (e.g. Figure 3 ). However, if the baseline of GCaMP6 is relatively high or the number of simultaneously targeted neurons is large, it could cause a significant background artifact in the calcium imaging, identified as sharp rise and then sharp decay of fluorescence signals. If the photostimulation duration is short (e.g. Figure 4 , only one frame appears to have the artifact), and stimulation frequency infrequent, the impacted frames could simply be deleted with negligible data loss. But if the photostimulation duration is long (e.g. Figure 5 ), the calcium imaging movie can be pre-processed so that the mesh grid shape background is replaced by their adjacent pixel value (see Materials and Methods). The ‘mesh’ arises because the interpulse interval of the laser is greater than the pixel rate, so only selected pixels are compromised. The grid is non-uniform in the image because of the non-uniform resonant scanner speed. This pre-processing significantly suppresses the artifacts while maintaining the original signal. Nevertheless, to avoid any analysis bias, the neuronal response can be further approximated by measuring the ΔF/F signal right after the photostimulation, when there is no background artifact. Also, an alternative method is to gate the PMT, or the PMTs output during the photostimulation pulse, thought this requires dedicated additional electronics. In this case, there will be ‘lost’ signal, and this can be treated similarly by filling in the data with interpolation. Finally, the constrained nonnegative matrix factorization algorithm (  ) used to extract the fluorescence signal could also help, as it can identify the photostimulation artifact as part of the background and subtract it from the signal. With these corrections, the photostimulation artifacts can be eliminated from the extracted fluorescence trace in Figures 3-5 .
D- Nonspecific Activation
One strategy to reduce nonspecific stimulation is to reduce the size of the PSF by increasing the NA. In our current set of experiments, we use a relatively low excitation NA (~0.35) beam that is limited by the small mirror size (3 mm) of the post-SLM galvanometric scanners. Increasing the mirror size is a straightforward future improvement that would increase this NA, and decrease the axial point spread function. This would also improve the effective axial resolution of photostimulation (currently ~ 20 μm, measured by displacing the 12 μm diameter spiral pattern relative to the targeted neuron), and thus reduce the nonspecific activation of the non-targeted cells. Another approach to reduce the nonspecific activation is to use a somatic-restricted opsin. Somatic-restricted opsins were reported recently ( [24,26,27] ), and showed reduced, but not eliminated, activation of non-targeted cells in vitro. Finally, it remains possible that a significant number of nonspecific activated cells occur through physiological synaptic activation by the photostimulated neurons.
Our method could have wide utility in neuroscience. We demonstrate the successful manipulation of the targeted neural microcircuits in awake head-fixed behaving mice by photostimulating a targeted group of interneurons ( Figure 5 ), and we expect this 3D all-optical method would find its many other applications in dissecting the neural circuits. Though we only targeted neurons in cortical layers 2/3, the total targetable range of the SLM can be more than 500 µm (  ), thus covering layers 2/3 and 5 simultaneously. Questions such as how neural ensembles are being organized across different cortical layers, and how different neural assemblies across a 3D volume interact with each other can now be directly explored. Indeed, by identifying behavior-related neural ensemble using closed-loop optogenetics ( [50,51] ), one may be able to precisely control the animal behavior, which could have a significant impact in attempts to decipher neural codes and also provide an optical method for potential treatment of neurological and mental diseases in human subjects.