© 2015 Nature America, Inc. All rights reserved. London, London, UK. Correspondence should be addressed to M.H. ( 1 readout of neural activity are associated with a range of limitations, of patterns activity natural manipulating and generating for crucial is photostimulation patterned with concurrently neurons multiple ref. see (but tively effec combined to be yet have two-photon and ing imag two-photon However, channels. and stimulation imaging the the both in precision single-spike with and goal a single- such achieve to required ratio signal-to-noise and ( at the spatial and temporal resolution simultaneously at which they function neurons many of activity the manipulating recording for and desirable highly is approaches experimental resolution cellular with neurons of hundreds from activity neural of readout quantitative permit neurons of of at precision scale populations the spatial tion with millisecond manipulations of neural activity, enabling activation and inactiva experimental revolutionizing rapidly are actuators Optogenetic resolution in the mouse brain definedneural circuits with single-cell and single-spike flexibleand long-term optical interrogation of functionally with genetic or viral approaches, enabling high-throughput, extends the optogenetic toolkit beyond the specificity obtained ensembles based on their functional signature. during different behavioral states and targeting of neuronal demonstrate interrogation of the same neuronal population Proof-of-principle experiments in mouse barrel cortex of the manipulation with negligible optical cross-talk. calcium imaging provides high-resolution network-wide readout concurrent optogenetic activation, while simultaneous fast selected neurons to be targeted for spatiotemporally precise calcium indicator. A spatial light modulator allows tens of user- coexpression of a red-shifted and a genetically encoded two-photon optogenetic activation and calcium imaging by with cellular resolution manipulating and recording the activity of multiple neurons We describe an all-optical strategy for simultaneously Adam M Packer neural circuit activity with cellular resolution S 140 Received Wolfson Institute for Biomedical Research, University College London, London, UK. Fig. 1 Fig. Articles Previous implementations of simultaneous manipulation and and manipulation simultaneous of implementations Previous imultaneous all-optical manipulation and recording of

| O.2 NO.2 VOL.12 a

3 ). Two-photon excitation provides the optical sectioning sectioning optical the provides Two-photon ). excitation in

August;

vivo 1 , and calcium indicators of activity in neurons now now neurons in activity of indicators calcium and , . a ccepted | 3 1 FEBRUARY ). Moreover, the ability to individually target target individually to ability Moreover,). the , 2 , , Lloyd E Russell

in in vivo. 24

Novembe

2015 in in vivo. We performed simultaneous 2 r . A combination of these two two these of combination A . | ;

published n a ture methods 1 , 2 , , Henry W P Dalgleish

o n li T n his his approach e

22

decembe [email protected]

in vivo r r 2014; - - -

CO 2 Department Department of Neuroscience, Physiology and Pharmacology, University College Optical approaches have so far suffered from similar drawbacks. drawbacks. similar from suffered far have so approaches Optical resolution. single-cell maintaining large groups of while neurons to of and target the the inability recordings invasiveness inherent electrical artifacts in from the recording suffer channel during stimulation,approaches the spatial electrophysiological of Purely lack and resolution. recording the by caused activation vertent inad on channel, the recording artifacts manipulation including o atvto wt a rgambe pta lgt modulator light spatial programmable a with activation for nearby neurons. We performed user-selected targeting of neurons and of stimulated recording resolution spatiotemporal high with neurons activated the over control precise enabled beams mice in cross-talk in minimal with imaging calcium high-speed vate multiple identified neurons while simultaneously performing by afforded neurons activated the of downstream are which and activated directly being are neurons applications specific for promise show also approaches electrophysiological only employed been have uncaging glutamate on relying methods photostimulation and cellular resolution. Simultaneous two-photon holographic imaging with manipulations targetable not and out permit does tissue the ates due optical artifacts to autofluorescence substantial through resolution Caenorhabditis in employed have been wavelengths and recording manipulation discarded be must must or sensor be blanked as data the imaging either tion period, wave This results in lengths. data photostimula loss during the crucial emission readout and excitation spectral to actuator the due of channel overlap imaging the in artifact optical large a ously (even when purposefully minimized many simultane not cells only stimulates actuation One-photon awake, behaving animals over long timescales. long over animals behaving awake, in circuits neural same the of probing high-throughput enables In class. preparations window chronic with combination genetic just not identities, functional of individual basis the their on neurons photostimulate to us allowing (SLM), RR 1

Here, we took advantage of the superior optical sectioning sectioning optical superior the of advantage took we Here, ECTED ECTED , vivo ). 2 & Michael Häusser . Independent manipulation of two femtosecond-pulsed femtosecond-pulsed two of manipulation Independent . AF TE 8 . . Additionally, excitation gener one-photon widefield R in 11– P R

vivo I

1 N elegans 3 T T , although it can be difficult to ascertain which which ascertain to difficult be can it although , 6 5– two-photon microscopy two-photon

F EB 7 . Promising approaches to differentiate the the differentiate to approaches Promising . R , , although not with single-action-potential U ARY 14 , 1 1

5 2015; , in . 2

vitro

doi :10.1038/ 9 , 1 0 . Combined optical and and optical Combined . 4 in vivo ), ), but also can generate n 16 meth.321 , 1 7 to precisely acti to precisely 1 9 , our approach , approach our 7 1 8 ------

© 2015 Nature America, Inc. All rights reserved. A two-photon targeted cell-attached patch-clamp recording was obtained from neuron i. This neuron was targeted for optogenetic stimulation in a in stimulation optogenetic for targeted was neuron This i. neuron from obtained was recording patch-clamp cell-attached targeted A two-photon bar, 100 scale (pink; C1V1-2A-mCherry and ( tubes. photomultiplier PMT2, PMT1, filters; F1–3: module; scanning resonant RSM, galvanometers; GM2, GM1, block; order zero ZB, modulator; light spatial SLM, lenses; L1–4, plate; HWP, half-wave shutter; S, cell; Pockels PC, ( stimulation. Stim, recording. simultaneous during iv–vi neurons adjacent of immediately stimulation without i–iii neurons user-selected in photostimulation reliable and robust Bottom, photostimulation. enables opsin an and of activity, readout optical an generates sensor Top, a calcium goal. experimental 1 Figure ( target photostimulation the shifting 12 was µ Methods) Online (see galvanometers mm 6 using tion neuron, ( C1V1 and GCaMP6s photostimulated expressing also the resulting neurons in neighboring in trial, not but transients every on calcium large neuron in recorded the in generated 20 ms (see Online Methods). Single action potentials were reliably fashion spiral a in scanned was which spot, photostimulation single a generate to SLM the ( cortex somatosensory mouse the of 2/3 layer in recordings patch-clamp cell-attached simultaneous by performing approach all-optical our ( calibrated nm 1,064 at excitation two-photon via neurons 200 × 200 of using a resonant system scanning at view 920 nm and of photostimulated field a over movies imaging calcium opsin a red-shifted encoded genetically calcium indicator patterned green-fluorescent an ‘ultrasensitive’ GCaMP6s, with ( co-infected and stimulation imaging to order optogenetic two-photon in simultaneous microscope provide scanning resonant dual-beampath animal behaving awake, ( an in network local the functional and these in neurons their stimulation to on response the based observe then and neurons identity groups targeted activate selectively individually to of able be to was goal design Our photostimulation C RESULTS time histogram are shown. Bottom, calcium imaging recordings obtained simultaneously from neurons i–iii in in i–iii neurons from simultaneously obtained recordings imaging calcium Bottom, shown. are histogram time ( pattern. spiral Fig. 1 Fig. ombining calcium imaging and single-cell single-cell and imaging calcium ombining m laterally and ~24 ~24 and laterally m a | Fig. 1 Fig. ). We incorporated an SLM into a two-photon two-photon a into SLM an incorporated We ). Single-cell two-photon optogenetic photostimulation and single-action-potential readout readout single-action-potential and photostimulation optogenetic two-photon Single-cell b ) Optical layout of the SLM-based two-photon patterned photostimulation, two-photon resonant scanning, moving moving scanning, resonant two-photon photostimulation, patterned two-photon of SLM-based the layout ) Optical e e ) Top, electrophysiological recording during photostimulation trials (pink bar). Single sweep (from trial 2), raster plot, and peristimulus peristimulus and plot, raster 2), trial (from sweep Single bar). (pink trials photostimulation during recording ) Top, electrophysiological ). The spatial resolution of spiral photostimula spiral of resolution spatial The ). 2 in vivo in 1 ( Fig. 1 Fig. µ n m axially, measured by incrementally incrementally by measured axially, m = 3 experiments). We programmed programmed We experiments). 3 = i. 1 Fig. c 2 ). We recorded high-speed (30 Hz) (30 Wehigh-speed ). recorded 2 over the neuronal cell body for for body cell neuronal the over b ). We visualized neurons neurons visualized We ). µ 2 0 m). ( m). , , and C1V1-2A-mCherry, Supplementary Fig. 1 Fig. Supplementary d ) Inset from a large field of view (200 × 200 × 200 (200 of view field a large from ) Inset Fig. 1 Fig. in d ). We ).

vivo µ m ). ). -

. m itrie nevl gnrtd oe cin oetas at potentials action more site, generated per interval) ms (0.2 intersite ms ms 40 0.2 to time exposure previously total the observed Increasing as onset, photostimulation from ured 17.3 of pyramidal latency a putative with neurons in potential action one exactly generating time; exposure total ms intersite 20 ms 0.1 interval, site, per ms (0.1 fashion raster in sequentially sites target the to directed was laser photostimulation The ron. in to generation neu the recorded ensure robust potential action neuron of the borders the beyond slightly extending of sites grid of pattern a We10 × 10 photostimulation a chose spatiotemporal microscopes. two-photon available commercially all with sible ( infection viral via potentials the in neurons same photostimulation optogenetic two-photon precise and imaging calcium sensitive simultaneous of capable is approach photostimulation in result ( not did resolution this at 200 even × imaging 200 maintained entire the was imaged we sensitivity when detection potential Action interval) generated a similar number of action potentials in in intersite potentials ms action 0.2 (1.4 of neurons site, recorded number the per similar ms a (1 generated ms interval) 120 to further yet time trials; lation to first potential; action cover to (1.4 soma took cell the it time increased the of because latencies longer latency, Supplementary Fig. 2 Fig. Supplementary We tested an alternative method for generating single action action single generating for method alternative an Wetested c ) A large field of view of neurons coexpressing GCaMP6s (green) (green) GCaMP6s coexpressing of of neurons view field ) A large n = 9 neurons from four mice; 114 photostimulation trials; in n

Supplementary Fig. 3b Fig. Supplementary vivo a µ ture methods in m) for the experiment shown in in shown experiment the for m)

vivo in cortical neurons expressing C1V1-2A-YFP C1V1-2A-YFP expressing neurons cortical in ± Supplementary Fig. 3a Fig. Supplementary in vivo. in 0.09 action potentials; 33.2 33.2 potentials; action 0.09 . ). In summary, we demonstrated that our that ). In we summary, demonstrated n = 4 neurons, 3 57 animals, photostimu ( a d ± ) Schematic illustration of the illustration ) Schematic

(mean (mean 0.07 action potentials, 60 60 potentials, action 0.07 | O.2 NO.2 VOL.12 ± 0.7 (mean (mean 0.7 ± s.e.m., s.e.m., ). Increasing the exposure exposure the Increasing ). Supplementary Fig. 3a Fig. Supplementary µ ). This method is pos ). method This | n m field of view, and and view, of field m FEBRUARY e = 3 neurons). in vivo in (scale bar, 50 (scale ± s.e.m.) ms, meas ms, s.e.m.) ± Articles 2.1 ms latency latency ms 2.1 microscope. microscope.

2015

± 2.6 ms ms 2.6 µ m). m).

|

141

2

3 ), ), - - - - .

© 2015 Nature America, Inc. All rights reserved. neurons are circled in black. 300 total neurons, 120 trials, mean inferred action potentials post-photostimulation = 1.0 1.0 = post-photostimulation potentials action inferred mean trials, 120 neurons, total 300 black. in circled are neurons panel from field the in photostimulation of strength the ( circles). (white bar, 100 (scale GCaMP6s and C1V1-2A-mCherry with colabeled cortex somatosensory 3 Figure jitter low with neurons individual in potentials action generating optically reliable for a strategy found and parameters of range a with pho tostimulating while mice five in neurons 19 from recorded we total, In half-maximum; at (full-width axially the 22 was moving neuron, the by to relative measured pattern galvanometers, mm 3 with pattern trials; 18.1 tials, (3.8 properties electrophysiological intrinsic its from expected as potentials, action more and latency shorter a with although fashion, similar a in responded which neuron, same photostimulation onparadigm the a fast-spiking putative inter tested small also we the comparison, in For volume). available photostimulation of population restricted the ing exhaust desensitization opsin of result a as (perhaps action potentials more in result not did mination 3b Fig. Supplementary s.e.m.; are bars Error ms. 34 or 16 11, lasting photostimulations spiral and patterns photostimulation spot 20 ( jitter. and latency low showing data raw overlaid Right, bar). pink (photostimulation, trials ten over delivery stimulus around times of spike Middle, raster of one targets. the in recorded electrophysiologically was generation potential action while photostimulated were locations multiple which in configuration recording patch-clamp cell-attached showing 100 bars, (scale mirrors galvanometer and SLM the using locations multiple to patterns photostimulation spiral targeting for a protocol present right, 100 bar, (scale C1V1-2A-YFP expressing neurons 2/3 layer cortex of of somatosensory view ( neurons identified of multiple 2 Figure 142 legend). in arrowhead black c a C1V1-2A-mCherry GCaMP6s Articles a ) Metrics evaluating performance for 10 and 10 for performance evaluating ) Metrics ) The leftmost panel shows an example field field example an shows panel leftmost ) The The spatial resolution of photostimulation using the grid grid the using photostimulation of resolution spatial The

µ | m). The remaining panels, from left to left from panels, remaining The m). O.2 NO.2 VOL.12 Supplementary Fig. 4 Fig. Supplementary | | µ Precise, concurrent photostimulation photostimulation concurrent Precise, Simultaneous fast calcium imaging and concurrent photostimulation of multiple neurons neurons multiple of photostimulation concurrent and imaging calcium fast Simultaneous m). ( m). ± 1.3 ms latency, latency, ms 1.3 b b ) Left, magnification of magnification ) Left, iv ) Calcium transients from the ten photostimulated neurons showing the responses on all individual trials. ( trials. individual all on responses the showing neurons photostimulated ten the from transients Calcium ) viii x | n v FEBRUARY = 6 neurons, 4 mice.= 6 neurons, vii ix ii i vi iii in ). Additional illu Additional ).

vivo in vivo. in n ).

= 1 neuron, 100 photostimulation photostimulation 100 neuron, 1 = 2015 .

viii | vii

b ix vi iv iii

x v ii i a n

a Supplementary Fig. 3c Fig. Supplementary ture methods

µ - m laterally and 67 67 and laterally m ± 0.17 poten action b c a a

Evoked action potentials C1V1-2A-YFP C1V1-2A-YFP as measured by the sum of inferred spikes immediately post-stimulation. Stimulated Stimulated post-stimulation. immediately spikes inferred of sum the by measured as 0 1 2 Spiral duration(ms) Field ofview 11 16 µ m ). ). ­ - - - 34

is directed on a sample, but distributed over a larger area larger a over distributed but sample, a on directed is power more much whereby strategy alternate an to opposed as over multiplexed was beamspot a spatiotemporally small neuron, a in density power high a (i.e., required was beamlet per power less as targeted, be to neurons more allowed group a as beamlets for targets many ( photostimulation providing simultaneous tissue, cortical of territories large across neurons in expression strong showed C1V1-2A-mCherry concurrently neurons so as multiple to activate beamlets targeted spatially ual, We the used SLM to into split laser the individ photostimulation S ably ably generated one at potential action latencies (1.2 similar ( neuron a over recordings cell-attached when just one of targeted the selected ten targets was two-photon positioned simultaneous via potentials action generated strategy photostimulation our that confirmed imultaneous photostimulation of multiple selected neurons

Reliability (%) Select pixel 100 10 25 50 75 targets −200 1 0 Trial µ Spiral duration(ms) m). Ten neurons were targeted for simultaneous photostimulation photostimulation simultaneous for targeted were Ten neurons m). 11 −100 16 2 0 4 50% . Animals virally infected with C1V1-2A-YFP or or C1V1-2A-YFP with infected virally Animals . 20 Time (ms) Fig. 2 Fig. s Calculate SLM 100

34 ∆ phase mask F in vivo. in / F 200 b c

Inferred spikes reli ms 16 and 11 lasting scans Spiral ). Latency (ms) 10 20 30 40 ( post-photostimulation 0 300 a Spiral duration(ms) ) A field of view of neurons in layer 2/3 of 2/3 layer in neurons of view of field A ) 0 0.7 1.3 11 400 Fig. 2 Fig. 16 Generate beamlets ± 16 msspiral 0.1 (mean (mean 0.1 10 spots 10 trials 34 a Latency ). Spiral scanning of the the of scanning Spiral ). c ) Color-coded plot of plot Color-coded ) Jitter (ms) 10 20 30 40 iv viii Jitter ± x Spiral duration(ms) s.d.; s.d.; v 11 vii ii ix i Spiral scan vi beamlets iii

16 10 ms 50 pA

20 spots 10 spots 2 5 ± ). We ). 34 0.04

- -

© 2015 Nature America, Inc. All rights reserved. cantly with the expression of C1V1 ( C1V1 of expression the with cantly signifi not but slightly correlated photostimulation to response The analysis. subsequent from excluded be could neurons these responses to photostimulation ( previously observed as strongly, very work previous others’ ( responded neurons neighboring of proportion small a Only mice. three in ( photostimulation to responses reliable and strong showed neurons target Individual neurons we the ( 10 photostimulated selected neously imaging these and the surrounding 290 neurons at 30 Hz, simulta While neurons. of ten a cluster to targeted beamlets ten populations neural how precisely controlled photostimulation inputs are integrated ( by neurons specified multiple of stimulation ( approach all-optical the Wecombined N programmed photostimulation. of patterns using neurons selected individually multiple, in show experiments These potentials action timed precisely generate can approach our that animals. seven in neurons 11 from work with low jitter comparable (results to from those previous potentials action generated optically summary, we demonstrated for trials tostimulation six recorded neurons in In three animals). 5.6 ± on 88% potentials one or more action potentials, (1.3 latency in increase slight a in photostimulated neurons from 10 to 20 reduced the of power laser per spot, resulting number the Increasing respectively. body, cell the cover to it took time longer the and time exposure lation photostimu increased of the because presumably animals), four 11.3 87% on potentials action 1.5 spiral: ms (34 latency tion increased the number of action potentials generated and their in six neurons in four animals; deviation of the latency), 107 respectively; photostimulation trials latency, 18.8 98% and 1.2 exact comparisons; *, ** and *** denote behavioral states ( spike responses to photostimulation (mean and running speed. (Regression line in gray.) ( ( speed. of running neurons.ten Bottom, photostimulation simultaneous ( imaging. calcium high-speed with observed view were simultaneously and These neurons the ofsurrounding across field photostimulation. for were chosen in (marked white) cortex of 2/3 somatosensory mouse ( Styrofoam treadmill. ( 4 Figure In summary, we were able to optically invoke spatiotemporally spatiotemporally invoke optically to able were we summary, In d c a 0% of 30.1 trials, etwork readout during targeted multineuron stimulation multineuron targeted during readout etwork ) Top, mean calcium transient of all stimulated ) neurons Top,to transient in response of stimulated mean calcium all ) Mice were head-fixed and allowed to run freely on a fixed-axis on a freely fixed-axis to run and ) allowed Mice were head-fixed ) Correlation between mean perturbation of responses to photostimulation ± 0.8 ms jitter for 16 ms and 34 ms spirals, respectively; 70 pho ± ± P 23 values in the text). Anes., anesthetized. 3.3 ms jitter, 93 photostimulation trials in six neurons in in neurons six in trials photostimulation 93 jitter, ms 3.3 3% and 88% 88% and 3% , | 24 ± Dependence of network perturbations on behavioral state. on behavioral ofperturbations Dependence network 0.05 action potentials, one or on potentials, more 0.05 action potentials action , 2 6 ) in 10–20 selected neurons, confirmed by recording recording by confirmed neurons, selected 10–20 in ) Supplementary Fig. 5 Fig. Supplementary ± 17.1 and 8.0 n = 3 mice, 576 imaged neurons; Tukey’s test for multiple ± b in ) ) A of field neurons view ten in which in layer 8.5 and 35.9 ±

4% of trials, 26.4 26.4 trials, of 4% Fig. 3b Fig. vivo 27 , 2 8 . . We the SLM programmed to generate ± . Some neurons expressed GCaMP6s GCaMP6s expressed neurons Some . ± ± 0.06 action potentials, one or more more or one potentials, action 0.06 8% of trials, 34.9 34.9 trials, of 8% 4.0 ms jitter as (defined the standard , c P Fig. 2 Supplementary Fig. 6a ). We performed this experiment experiment this We performed ). < 0.05, 0.01 and 0.001, respectively; ± 4.0 ms latency, 17.0 ), as expected from our and and our from expected as ), ± c ± ). ). Increasing the spiral dura 0.06 and 1.2 1.2 and 0.06 s.d.) during different 20 Supplementary Fig. 6b Fig. Supplementary e ± , ) Comparison of inferred 2 Fig. Fig. 13.3 and 21.4 21.4 and 13.3 9 , and showed reduced reduced showed and , Fig. Fig. n 1 = 3 mice, ) with the photo the with ) ± 2 4.6 ms latency, latency, ms 4.6 ± ) to investigate investigate to ) 6% and 100% 6% and 100% ± 0.05 action action 0.05 ), although ± 11.9 and ± Fig. Fig. 3 3.3 ms ms 3.3 in

vitro

a ). ). ). ). ------

in target neuron responses to photostimulation when animals animals when photostimulation to responses neuron target in ( anesthetized lightly same mice the while were animals awake but the not or running were in view of field same the in stimulation patterned same the mice; three in stimulations total 220 (Spearman speed running and photostimulation to response of amplitude mean ( running speed and photostimulation to response the recorded ously ( neurons target ten photostimulated ( cylinder to fixed-axis a mice on freely run head-fixed and awake allowed we experiments our In were mice while running, awake but stationary photostimulation or under light to isoflurane anesthesia. response network local circuits is Locomotion a modulator salient of in neuronal activity cortical circuits. of neural responsiveness the modulate states behavioral circuits neural of properties tional func the probing for strategy our of power the Todemonstrate states behavioral different in interrogation All-optical line; unity the to day on responses their 1 and day 8 ( between determination of coefficient 7c Fig. same response to photostimulation on both days ( Fig. 7b ( again them photostimulated neurons and later week ten 1 photostimulated we ( First, readout. and stimu lation cell multiple of stability and reliability the assessed We L view.of field same many the in others and neurons those of responses the recording taneously simul while neurons of sets defined in potentials action precise Supplementary Fig. 7a Fig. Supplementary ong-term reliability and stability of all-optical interrogation d c a Photostimulation ). All neurons in all animals showed a highly significant significant highly a showed animals all in neurons All ). ; in three fields of view in three animals). ; Weof in in fields three view animals). three the observed 30–

i. 4 Fig. response (∆F/F (%)) 10 30 50 70 3 Running speed(cm/s) 2 0 ; we therefore applied our approach to compare the the compare to approach our applied therefore we ; n P a = 8.5 × 10 5 c ture methods ). We found a significant correlation between between correlation significant a found We ). 10 Supplementary Fig. 7d Fig. Supplementary ρ 15 = 0.27, 0.27, = Fig. 4 Fig. 20 −19 25 ); then we found the same ten neurons neurons ten same the found we then ); ; ; e e

R P

). We found a significant reduction reduction significant a Wefound ). Inferred spikes post- | 2 = 7.1 × 10 × 7.1 = O.2 NO.2 VOL.12

= 0.7 when the fit was constrained photostimulation Running 0.5 0 1 Stimulated cells b

Fig. 4 Fig. Awake C1V1-2A-mCherry GCaMP6s ** in

i. 4 Fig. Anes. Fig. 4 Fig. *

−5 vivo ). a | ; ; ) while we repeatedly repeatedly we while ) FEBRUARY n , we assessed how how assessed we , = 22 experiments; experiments; 22 = b d 0.5 ad simultane and ) ). We performed performed We ). Running 0 1 Unstimulated cells Supplementary Supplementary Supplementary Supplementary Articles Awake ** ** 20 cm/s 20% 20

*

2015 Anes. * s

∆ F / F |

143 - - - -

© 2015 Nature America, Inc. All rights reserved. of indicator sensitivity and lack of two-photon optogenetics and calcium The imaging. combination spectral overlap between the optoge same neurons with cellular resolution in mice and the recording for activating strategy an all-optical developed allow this to be achieved in a minimally invasive manner. We have approaches Optical behavior. drive to together work neurons of how to is populations understanding crucial function they which at resolution temporal and spatial the at circuits neural Probing DISCUSSION animal. of behaving awake, the in neurons ensembles defined functionally activating for approach our two in respectively, view; of fields neurons, sensory-responsive weakly and 30% (maximum groups sensory-responsive weakly and groups) (both responsive the strongly sensory- between tion different was not significantly running on a Styrofoam treadmill. The response to photostimula and awake was animal the while groups three the of each within ( tions orienta stimulation particular to weakly or strongly that responded neurons revealed barrel the within stimulation sensory to Next, two-photon imaging of the responses of neurons individual ( cortex somatosensory the in C2 barrel identify to ing properties. To achieve this goal, first we performed intrinsic imag functional individual their of basis the on population the within neurons of groups different target to us allowed approach Our O states. behavioral different and activity ongoing during networks of neuronal perturbing for approach robustness our the demonstrate results These per mouse). trials per 20 state minimum states; behavioral between distributed n Tukey’sawake versus anesthetized; test for multiple comparisons; awake; ( neurons network local of for non-stimulated states the responses compari sons). We multiple a observed significant difference between for all behavioral test Tukey’s anesthetized; versus awake (ANOVA); ( anesthetized were photostimulation ( photostimulation of five neurons responding strongly to a givenphotostimulated sensory stimulation(pink line). or ( weakly to both stimuli revealed similarstimulation responses (gray shading)(mean were simultaneously responded differently or not at all to sensory caudal whisker stimulation. Five neurons that on their response to dorsal-ventral and rostro- neurons were selected for photostimulation based see somatosensory cortex. (For definitions of symbols, 2A-mCherry (pink) in the C2 barrel of mouse C1V1- and (green) GCaMP6s coexpressing bar, 50 (scale view signatures functional individual their on based manipulation 5 Figure 144 minimizes wavelengths emission GCaMP6s and excitation netic P = 3 mice, 576 imaged neurons, 30 stimulated neurons, 280 trials Articles ptogenetic manipulation targeted to functional ensembles to functional targeted manipulation ptogenetic = 4.2 × 10 × 4.2 = b

.) ( | ± O.2 NO.2 VOL.12 6%, 6%, Fig. 5 Fig. b | P ) Groups of individually identified Targeting neurons for optogenetic optogenetic for Targeting neurons = 1.5 × 10 × 1.5 = p P ∆ = 0.55, Mann-Whitney test; test; Mann-Whitney 0.55, = = 0.00082, running versus anesthetized; anesthetized; versus running 0.00082, = b F −8 ). We targeted photostimulation to five neurons neurons five to photostimulation targeted We ). Fig. 5 Fig. / n , one-way ANOVA; one-way , F = 25 strongly responsive neurons and 15 weakly responsive neurons, stimulated in groups of 5 in two fields of view in one mouse). µ response to photostimulation: 33% 33% photostimulation: to response m) showing neurons neurons showing m) | in vivo in FEBRUARY P −8 c ). This experiment highlights the utility of of utility the highlights experiment This ). = 0.00099, one-way analysis of variance variance of analysis one-way 0.00099, = , running versus anesthetized; anesthetized; versus running , c . . ( ) Simultaneous a ) A field of ) A field

2015 |

P n a = 0.0078, running versus versus running 0.0078, = ture methods n = 25 and 15 strongly strongly 15 and 25 = in

vivo a by combining P P ± = 0.012, 0.012, = = 0.029, 0.029, = Fig. 5 Fig. 4% and and 4% a C1V1-2A-mCherry ). ). - - - - -

GCaMP6s activated during a behavioral task. Our method thus enables enables thus method Our task. behavioral a during are that activated neurons multiple of activation the target to ability the and months to weeks over awake microscope the is under animal behaving and the while stimulation for neurons individual select to able being of flexibility the both provides preparation, nature a with of window chronic combined optical the approach, The precision. single-spike enables and artifact stimulation the lation while minimizing the photostimulation time by splitting splitting by time photostimulation the minimizing while lation of the number stimu per neurons attempts to maximize strategy effi cient shaping of more the profile of temporal the Our pattern. response be may strategies alternative such of advantage The ‘shot’. per neurons fewer addressing of cost the at quickly, more based approaches, focusing– simultaneous temporal photostimulations and/or can holographic be achieved alternative In strategy. power and time for required a multiplexing given spatiotemporal simultaneous stimulation pattern can be performed, dictated by the and a how quickly addressed that neurons can be simultaneously neurons of scanning, allows one to simultaneously address a large population slices brain in deep channelrhodopsin of excitation two-photon via contrast generation potential action phase enables general with combined focusing temporal that work was in this review while published work could strategy excitation principle experiments only demonstrated optical provide to focusing sectioning temporal and/or holography via body cell a over to beamspot excitation methods small a scanning multiplex spiral spatiotemporally or raster on relied manipulation experiments. for optogenetic avenues new up open will ensembles neuronal defined ally function from activity out read and manipulate simultaneously to ability The properties. functional specific of their basis on the neurons individual target to one allows it as genetically, or cally anatomi either defined were neurons which in approaches ous circuits enable will one to replay and signature manipulate natural patterns of activity in neural functional their on based neurons target brain mammalian the in circuits neural of interrogation optical and long-term flexible high-throughput, Our Our approach, combining SLM-based beam splitting with spiral optogenetic single-neuron-precision for methods Previous 1 . This strategy provides a significant advance over previ advance a provides significant . strategy This b 22– 3 , in 2 24 6 ,34,35

, 3 vivo 3 or illumination of the entire cell body at once once at body cell entire the of illumination or . All of these approaches have thus far been been far thus have approaches these of All . . There is a tradeoff between the number of of number the between tradeoff a is There . stimulatio in Sensor 2

3 vitro showing that the two-photon optogenetic y n Photostimulation , aside from our previous proof-of- previous our from aside , in

vivo 1 20% s and recent work that was was that work recent and 3 6 3 ∆ . . Other work has . shown Other F / c in F

Average photostimulation Weak Strongly sensoryresponsiv vivo Max ∆F/F (%) 10 20 30 40 l 0 ± y . The ability to to ability The . sensor s.e.m.) to response n.s. y responsiv 1 10% s ∆ F / F e e - - - - -

© 2015 Nature America, Inc. All rights reserved. This work was supported by grants from the Wellcome Trust, the Gatsby Gatsby the Trust, Wellcome the from grants by supported was work This AAVdj virus. to access and plasmids for University) (Stanford Deisseroth K. of and AAVdj; use on advice for NS069375-01A1) P30 no. (grant Core Virus and Vector Gene Neuroscience Stanford the at Lochrie M. of microscope; the customization enabling for Technologies) Prairie (formerly Corporation Bruker at staff the manuscript; the on comments and discussion for Peterka D. and B. Judkewitz Smith, S. Bianco, I. B. Clark, Roth, A. Schmidt-Hieber, C. Wilms, C. software; and routines analysis discussion, helpful for Pettit N. and London M. Stringer, Turaga, C. S. Pachitariu, M. We thank Ackno online ve Note: Any Information Supplementary and Source Data files are available in the of version and are Methods references any in available the associated M circuits provide should approach neural in processing information into insights new this fundamental using work Future behaviors. a exhibiting population a specific functional signature within during sensory processing or defined neurons those only in code sion than previously possible, enabling investigation of the neural preci greater far with targeted be to manipulation optogenetic allow will This population. in the ensembles of specific targeting enable to stimuli sensory different to neurons of response characterization the of functional detailed a use to able were we that showing experiments proof-of-principle describe we Here sion. preci temporal lacks and of activity readout indirect a very only alone ana identity tomical and/or genetic on based targeted be could manipulations optogenetic Previously, neurons. the of signature functional the unprecedented of basis the the on manipulation with optogenetic target us to opportunity provides neurons of population approach. the of side readout methods imaging complex more and faster in advances addition, In here. the into integration their enable will excitation, two-photon their of characterization including of optrodes use the as such optogenetics, and electrophysiology of bination on relying the com strategies and readout manipulation taneous are downstream any confusion about which cells are directly stimulated and which removes precision single-cell with neurons target and locations data. Additionally,crucial neuronal the ability to observe directly of loss the in resulting photostimulation, during readout the of excitation on one-photon relying approaches all-optical in previous observed problem talk recent most the indicator of calcium ‘ultrasensitive’ imaging calcium high-speed with readout approaches different these among choice the dictate will addressed being question biological underlying the that expect We method. this with sequence a in rates high at performed be can which of neurons, among ensembles activity of synchronous active development, our approach is well suited for the generation photostimulate neurons. Thus, all while of to are these technologies currently under strategy scanning fast a using and beam the Charitable Foundation, the European Commission (Marie Curie International International Curie (Marie Commission European the Foundation, Charitable ethods Our ability to read out and manipulate activity in the same same the in activity manipulate and out read to ability Our fast combining approach two-photon dual all-optical, Our w rsion rsion of the pape ledgments in 38– the pape the

vivo 11– 4 0 n analysis and 1 . 3 14 . Further development of new molecular tools molecular of new development . Further , 1 5 r . , , which has been a problem with other simul r . 4 2 , , or on 5– 7 4 . These approaches require blocking blocking require approaches . These 1 could be incorporated into the the into incorporated be could c-fos 2 0 drastically reduces the cross- the reduces drastically expression in

vivo approach presented presented approach 4 3 , which , provides which

in

online online

vivo

3 7 - - - - - . ,

6. 4. 3. 2. 1. c R The authors declare no competing financial interests. COM A.M.P., L.E.R., H.W.P.D. and M.H. designed the study and wrote the paper. A.M.P., L.E.R. and H.W.P.D. performed experiments and analyzed data. A Council. Research European the and Council Research Medical the Organization, Biology Molecular European the 328048), no. grant Fellowship Incoming 14. 13. 12. 11. 10. 9. 8. 7. 5. 24. 23. 22. 21. 20. 19. 18. 17. 16. 15. om/reprints/index.ht eprints and permissions information is available online at UTHOR

P (2012). networks inhibitory cortical distinct by (2013). optogenetics. method of tagging neuronal populations for identification during for populationsneuronal tagging of method animal. behaving the in circuits neural local of recording and perturbation light-assisted mice.moving freely in control neurons single from recordings (2010). 18720–18731 illumination. light structured with photo-stimulation (2011). patterning. lightholographic andremote-focusing by photostimulation and imagingdimensional Neurosci. Mol. Front. optogenetics. with combination and imaging activity neural multi-color channel. light-sensitive program by a small brain area in zebrafish. zebrafish. in area brain small a by program mice.moving freely in behaviour learned Neurosci. Nat. fields. firing cell place of imaging and perturbation optical resolution (2012). 862–885 circuits. modulation. bistable and excitation saturation. at dysfunction. social and processing activity. (2009). window.cranial chronic a through neocortex (2008). modulators.light spatial with photostimulation microscopy.fluorescence (1997). neurons. pyramidal neocortical in dynamics calcium 1511 during subtypes neuron projection striatal recording.electrophysiological Wilson, N.R., Runyan, C.A., Wang, F.L. & Sur, M. Division and subtraction and Division M. Sur, & F.L.Wang, C.A., Runyan, N.R., Wilson, Huber,D. cellular- D.W.SimultaneousTank, & K. Rickgauer,J.P.,Deisseroth, neurons. in calcium Imaging A. Konnerth, & Grienberger,C. for photons andTargeting neurons Hausser,M. & B. Roska, Packer,A.M., Lima, S.Q., Hromadka, T., Znamenskiy, P. & Zador, A.M. PINP: a new a PINP: Zador,A.M. Znamenskiy,T.,P.& Hromadka, S.Q., Lima, S. Royer, P.Anikeeva, Y.LeChasseur, M. Maschio, Dal V.Three- Emiliani, & D. Ogden, A., Begue, C., Ventalon,F., Anselmi, J. Akerboom, a using plasticity synaptic ofinduction Optical Oertner,T.G. Y.P. Zhang,& Fajardo, O., Zhu, P. & Friedrich, R.W. Control of a specific motor motor specific a of Control R.W. Friedrich, & P. Zhu, O., Fajardo, Packer,A.M. R. Prakash, channelrhodopsin-2 of excitationD.W.Two-photon Tank, Rickgauer,J.P.& O.Yizhar, T.W.Chen, A. Holtmaat, V.Nikolenko, scanning W.W.Webb,laser Two-photon& W.,Strickler,J.H. Denk, D.W. Tank, & D. Kleinfeld, W., Denk, K., Svoboda, identification of Optogenetic Kreitzer,A.C. & S.F. A.V.,Owen, Kravitz, ETING

CONTRI , 21–32 (2013). 21–32 , F Nat. Methods Nat. Nature IN et al. et et al. et et al. et n et al. et A B et al. et a NCI et al. et et al. et UTIONS et al. et ture methods

et al. et et al. et Nat. Neurosci. Nat. Proc. Natl. Acad. Sci. USA Sci. Acad. Natl. Proc. 17 et al. et Multi-array silicon probes with integrated optical fibers: optical integrated with probes silicon Multi-array

Sparse optical microstimulation in barrel cortex drives cortex barrel in microstimulationoptical Sparse Neocortical excitation/inhibition balance in information in balanceexcitation/inhibition Neocortical 499 Ultrasensitive fluorescent for imaging neuronal imaging for proteins fluorescent Ultrasensitive A et al. et Two-photon optogenetic toolbox for fast inhibition, fast for toolbox optogeneticTwo-photon , 1816–1824 (2014). 1816–1824 , L Eur. J. Neurosci. J. Eur. Two-photon optogenetics of dendritic spines and neural and spinesdendritic of optogeneticsTwo-photon Optetrode: a multichannel readout for optogenetic for readoutmultichannel a Optetrode: m Long-term, high-resolution imaging in the mouse the in imaginghigh-resolution Long-term,

SLM microscopy: scanless two-photon imaging and imaging two-photon scanless microscopy: SLM Genetically encoded calcium indicators for indicators calcium encoded Genetically INTERESTS A microprobe for parallel optical and electrical and optical parallel for microprobe A , 295–300 (2013). 295–300 ,

l . 6

Simultaneous two-photon imaging and imaging two-photon Simultaneous , 2 (2013). 2 , 9 , 1202–1205 (2012). 1202–1205 , Nat. Methods Nat. Science

16 Proc. Natl. Acad. Sci. USA Sci. Acad. Natl. Proc.

PLoS ONE PLoS Nat. Neurosci. Nat. | , 805–815 (2013). 805–815 , in vivo in O.2 NO.2 VOL.12

248

31 Nature Nat. Methods Nat.

, 73–76 (1990). 73–76 , , 2279–2291 (2010). 2279–2291 , 4 . , 139–141 (2007). 139–141 , Nat. Methods Nat.

in vivo in

106 4

Nature 477 , e6099 (2009). e6099 , in vivo in

, 15025–15030 (2009). 15025–15030 , Nat. Protoc. Nat. Front. Neural Circuits Neural Front. 15 , 171–178 (2011). 171–178 , . Nature | Front. Neural Circuits Neural Front.

, 163–170 (2011). 163–170 , FEBRUARY 451

recordings. 9 In vivo In , 1171–1179 (2012). 1171–1179 ,

, 61–64 (2008). 61–64 , Nature Opt. Express Opt. 8

, 319–325 (2011). 319–325 ,

488 http://www.nature. Articles 108

4 dendritic , 1128–1144 , , 343–348 ,

, 19504–19509 , Neuron 385

Brain Res. Brain 2015

, 161–165 161–165 ,

in vivo in 18

7 73

| , , 67 67 ,

2

145 , 5 , ,

© 2015 Nature America, Inc. All rights reserved. 33. 32. 31. 30. 29. 28. 27. 26. 25. 146 Articles

(2009). system. Tet the and transfer gene viral using (2014). cortex. auditory the in discharge corollary for cortex. visual mouse in state 156 (2009). indicators. calcium GCaMP improved with cortex. perturbations to stimulation channelrhodopsin-2. optogenetics. with control Zhu, P.Zhu, basis circuit and synaptic A Mooney,R. & A. Nelson, Schneider,D.M., behavioral by responses visual of Stryker,M.P.Modulation & C.M. Niell, Y. Fu, L. Tian, P.E.Sensitivity Latham, & Hausser,M. L., Beeren, A., Roth, M., London, single-neuron by microcircuits cortical of DissectionY. Dan, & A.C. Kwan, Papagiakoumou,E. neural precise toward scalpel: to cudgel From K. Svoboda, & S. Peron, | O.2 NO.2 VOL.12 , 1139–1152 (2014). 1139–1152 , et al. et Nature et al. et et al. et A cortical circuit for gain control by behavioral state. behavioral by control gain for circuit cortical A in vivo in Optogenetic dissection of neuronal circuits in zebrafish in circuits neuronal of dissection Optogenetic Imaging neural activity in worms, flies and mice and flies worms, in activity neural Imaging

466 in vivo in | . FEBRUARY , 123–127 (2010). 123–127 , et al. et Curr. Biol. Curr. Nat. Methods Nat. implies high noise and suggests rate coding in coding rate suggests and noise high implies Scanless two-photon excitation of excitation two-photon Scanless Nat. Methods Nat.

Neuron 22

2015 , 1459–1467 (2012). 1459–1467 ,

7 , 848–854 (2010). 848–854 ,

65 |

, 472–479 (2010). 472–479 , n 8 Nat. Methods Nat. , 30–34 (2011). 30–34 , a ture methods Front. Neural Circuits Neural Front. Nature

513

6 , 875–881 , , 189–194 ,

3 Cell , 21 ,

43. 42. 41. 40. 39. 38. 37. 36. 35. 34.

fear memory recall. memory fear systems. neural in Optogenetics Methods Nat. dimensions.three in activity neural microscopy.light-field using activity zebrafish. in .microbialengineered using tissue. scattering inside deep neurons.pyramidal CA1 hippocampal in activity neuronal related theta of mechanisms USA Sci. Acad. Natl. Proc. light. sculpted by activity neuronal of controloptogenetic single-cell Liu, X. Liu, K. Deisseroth, & M. Mogri,T.J., Davidson, L.E., Fenno, O.,Yizhar, J. Freeman, of imaging Simultaneous R. Yuste, & D.S. Peterka, J., Jackson, S., Quirin, R. Prevedel, M.B.Ahrens, D.R. Hochbaum, Papagiakoumou,E. Network J.C. Magee, & A. B.V.,Zemelman,Vaziri, Losonczy,A., Two-photon A. Vaziri, & B.V.,J. Andrasfalvy,Zemelman,Tang,B.K., et al. et et al. et Optogenetic stimulation of a hippocampal engram activates engram hippocampal a of stimulationOptogenetic et al. et

Nature et al. et 11 , 941–950 (2014). 941–950 , et al. et Mapping brain activity at scale with cluster computing. cluster with scale at activity brain Mapping Simultaneous whole-animal 3D imaging of neuronal of imaging 3D whole-animal Simultaneous Brain-wide neuronal dynamics during motor adaptation motor duringdynamics neuronal Brain-wide

et al. et Nat. Neurosci. Nat. Nature 485 All-optical electrophysiology in mammalian neuronsmammalian in electrophysiology All-optical , 471–477 (2012). 471–477 , Functional patterned multiphoton excitationmultiphoton patterned Functional

107

484 Nat. Photonics Nat. , 11981–11986 (2010). 11981–11986 , , 381–385 (2012). 381–385 , Neuron

13 Front. Neural Circuits Neural Front. , 967–972 (2010). 967–972 , Nat. Methods Nat.

Nat. Methods Nat. 71 , 9–34 (2011). 9–34 ,

7 , 274–278 (2013). 274–278 ,

11

11 , 727–730 (2014). 727–730 , , 825–833 (2014). 825–833 ,

8 , 29 (2014). 29 ,

© 2015 Nature America, Inc. All rights reserved. Titration of calcium indicator expression. indicator calcium of Titration 4 and of 0.7 administration 7 days with post-operative cement. by dental place in fixed and (VetBond) cyanoacrylate of layer thin a by skull the to sealed Norland craniotomy, the into (NOR-61, press-fit were cement Adhesive) Optical optical UV-curable with Optics) circular mm (UQG 3 coverslip glass a square to 2 mm cemented a coverslip glass of composed windows (Sugi, Cranial Sugi-sponges Kettenbach). with stanched or solution with away external washed sterile was was bleeding any craniotomy which circular during mm 3 performed a above), (see injection virus After LED. green a with visualized as pattern vessel blood the to from the brain indicated thereflectance in barrel,increase An which surface. couldthe be illuminated localized(LED) relativediode light-emitting red a while Technologies) Vision Allied F-032b, (Pike camera device) (charge-coupled CCD a with imaged and CaCl mM 2 HEPES, mM 10 KCl, mM 2.5 NaCl, mM (150 solution external sterile with perfused was brain The interval. s interstimulus a 20 with s 4 for Hz 10 at oscillate to programmed was actuator The glass pipette glued to a piezoeletric actuator (Physik Instrumente). in barrel certain experiments. C2 The C2 the whisker wasto threaded intosite a trimmed injection the localize further to formed imaging Intrinsic before injection. virus Sun-Medical) with cortex C&B, cement dental (Super-Bond ing somatosensory overly skull the to fixed was well imaging circular mm 5 a with from the midline to the temporalis muscles, and a metal headplate containing mixture a 0.1 with injected were animals Co-injected visible 24 days later. Animals singly injected received 1 were performed through the same craniotomy site, which was still 1 also injections, Subsequent Vetbond (3M). with closed was 1 with injected first were 2/3 (~300 0.1 of rate a at injected and pipette injection AAV1-Syn-GCaMP6s-WPRE-SV40 AAVdj-CaMKIIa-C1V1(E162T)-TS-P2A-mCherry-WPRE (AAV2-CaMKIIa-C1V1(E162T)-p2A-EYFP, Virus Apparatus). beveled apparatus hydraulic injection driven by a pump ~15 syringe (Harvard pipettes diameter: (inner injection point sharp a Calibrated to diameter). in mm 0.5 of bregma, mm lateral and 3.5 from 2 mm posterior hemisphere, Craniotomies were drilled (NSK UK Ltd.) installation. over barrel window cortex (right chronic and headplate injections, Viral procedures. surgical g mg 0.01 an used with were sexes anesthetized mixture (0.1 and of both injection a intraperitoneal ketamine-xylazine were of Animals old randomization. months 3 without to weeks 4 imately ( mice C57/BL6 1986. Act Procedures) from (Scientific license Animal the with under accordance in out Office Home UK the carried were procedures surgical All ONLINE doi: the on heavily depended approach all-optical our in readout the Following all surgical procedures, animals recovered for at least bilaterally removed was scalp the experiments, chronic For 10.1038/nmeth.3217 µ l GCaMP6s virus and 0.9 0.9 and virus GCaMP6s l µ l ml l

METHODS −1 µ m deep). Animals that received two separate injections −1 body weight, respectively) or with isoflurane during during isoflurane or with respectively) weight, body 2 , 1 mM MgCl mM 1 , Baytril in drinking water. drinking in Baytril µ 2 l of virus, and then the scalp incision incision scalp the then and virus, of l ) to make the skull semitransparent semitransparent skull the make to ) µ l C1V1-2A-mCherry virus. C1V1-2A-mCherry l 2 0 ) was front-loaded into ) the was front-loaded Mus µ m) were coupled to a to coupled were m)

µ musculus The sensitivity of of sensitivity The l min l µ l l ml −1 −1 4 µ into layer layer into 5 ) approx ) l l of virus. Rimadyl Rimadyl was per 4 4 or or µ l, l, - - -

a reduction in virus titer to 10% of the original level (i.e., 10 (i.e., level original the of 10% to was titer virus parameter in reduction a crucial The implantation. window chronic by introduced artifacts confounding potential to minimize in order on the (depending extent of Acute expression). was imaging used intervals from the imaging). cortical surface to a maximum depth of for 500 0.5% and at 10 taken were site infection the surgery tiling Two-photon images for 1.5% induction, anesthesia for isoflurane (5% under below) (see imaging two-photon enable to performed was craniotomy acute an points of time these each At post-injection. weeks 3 and weeks 2 time week, 1 three points: of each for used be could animals two cohort, each within that such divided then was cohort viral-titer six-animal Each dilutions. above the of one with cohort each injected and each mice six of cohorts three into sexes both of mice C57/BL6 300 bregma, of min NaCl, 0.001% pluronic F-68). 100 nl of was virus atinjected 0.1 mM 140 8.0, Tris,pH mM (20 solution buffer a in diluted liliter 10 × 3.22 of solutions titer three at 10 × 3.22 titers: virus viral GCaMP6s with animals injected we expression, expression of GCaMP6s. To assess the stability of calcium indicator performed by raster scanning a femtosecond-pulsed laser laser femtosecond-pulsed resonant or a standard via Coherent) II, Ultra scanning (Chameleon beam raster by performed photostimulation. and Imaging (PackIO Bessel a software custom with kHz 20 at with recorded and kHz 4 above filter filtered Devices), a on (Molecular 700a amplified were MultiClamp Signals solution. external with filled and resistance) pipette M (~5 glass borosilicate from pulled pipettes Two-photon above. recordings patch-clamp described targeted as performed was recordings. installation patch-clamp targeted Cell-attached wavelength. emission on and GCaMP6s based separated both were which C1V1-2A-mCherry, spectrally easily with neurons weeks, of 5 co-labeling After interest. observed of we tissue cortical the to surgical access optical single a during long-term animals to provide installed was window a chronic procedure, the into injected viruses of been mixture had this After above). (see C1V1-2A-mCherry expressing virus the with directly it dilute could we meant virus ( classifier the based we on which neuron held-out one including not 20, ref. in (94% ( spikes of number inferred the and spikes of number true the correlation between the of strength the by defined as performance best the in resulted window ms 433 a over inference this of result the deconvolution algorithm the of results the integrated we when reported reliably be could window ms 250 a within occurring burst a in spikes of number 60 Hz ( at imaging while recordings cell-attached targeted two-photon performing by resolution single-action-potential confirmed we ( post-injection weeks as 12 as expression long stable in resulted which milliliter), per genomes The need to reduce the titer of the GCaMP6s-producing GCaMP6s-producing the of titer the reduce to need The −1 ± into L2/3 barrel cortex (2 mm and posterior 3.5 mm lateral 3%) and false positive rate (7% positive 3%) and false n Supplementary Fig. 9c Fig. Supplementary 4 = 4 neurons; 9 ) written in LabView (National Instruments). (National LabView in written ) Supplementary Fig. 9d Fig. Supplementary µ m below dura). We divided 18 adult (P60–P80) (P60–P80) adult 18 We dura). divided below m 13 Supplementary Fig. Supplementary 9a genomes per milliliter of stock and lower lower and stock of milliliter per genomes 4 6 ( 12 Supplementary Fig. 9b Supplementary and 3.22 × 10 × 3.22 and ). We also quantified the hit rate rate hit the quantified We also ). 47 Supplementary Fig. 8 Fig. Supplementary , Two-photon imaging was was imaging Two-photon 4 8 were obtained using glass glass using obtained were ). ± 6%) on as neurons three 11 ). ). We found that the genomes per mil per genomes n a ture methods ). ). Integrating Headplate Headplate ). Next, Next, ). µ µ µ m m 12 - l

© 2015 Nature America, Inc. All rights reserved. G) algorithm (GS) Gerchberg-Saxton The Coherent). fs; 100 width, pulse watts; 2.3 fs; Fianium Ltd.) 250–400 or width, pulse nm output, 1,055 (total laser fixed at femtosecond-pulsed 1,064 nm (total output, 5 watts; ( coverslip a to glued foil of zero at order was beam blocked of the focus L3 with a piece small The SLM. the of area active crystal liquid the driving voltages to values pixel converted table lookup Systems). manufacturer-supplied The Nonlinear Optics/Boulder (Meadowlark driver SLM the electronics to connected cable interface visual digital and card graphics Ti 660 GTX GeForce NVIDIA an via mask SLM the on phase the displayed Systems) Nonlinear Optics/Boulder (Nikon). 16×/0.8-NA = Objective (Hamamatsu); tube plier multi-alkali = photomultiplier tube (Hamamatsu); PMT1 PMT2 = GaAsP photomulti Chroma); (607/45m-2P, filter bandpass Chroma); (HQ575dcxr, 575LP F2 = = 4 525/70 Dichroic nm mm; bandpass 180 filter length (525/70m-2P, Chroma); nm ORCA-Flash4.0 Tube mm; 75 = focal length lens 675/67 = focal F3 lens = Scan (Hamamatsu); = = camera 607/45 F1 sCMOS nm follows: (Semrock); as filter are bandpass detectors and lenses filters, additional The removed. is Chroma) T700lpxxr-xxt, long-pass, metal-oxide nm 3 (700 Dichroic when only camera (sCMOS) semiconductor complementary in scientific beamlets the SLM on the mode image widefield to used be can Chroma) 660LP, Technology). An optional beam-combining dichroic (Dichroic 2, 660 nm long-pass, The GM2. T1030SP,1, (Dichroic Chroma onto short-pass nm a 1,030 is dichroic relayed Corp.) Bruker by Technology, integrated (Cambridge (RSM) mirror galvanometer scanning resonant a by axis fast the along scanned be also could and Corp.) Bruker by Technology, integrated Cambridge mm, 6 (GM2, path mirrors galvanometer of imaging pair second a The with scanned lens. was first the of positioned focus the foil) of with location the (coverslip at (ZB) block order zero a with f doublet, achromatic inch 1 (L3, telescope a via Technologies)) dual beam Ultimate microscope by Bruker Corp. (formerly Prairie into galvanometer integrated Technology, Cambridge mm, 6 (GM1, or 3 pair, mirror galvanometers photostimulation the to relayed was SLM The Thorlabs). (WPH10M-1064, (HWP) plate maxi half-wave a with SLM polarization the from and efficiency area diffraction for mized active SLM the fill to Thorlabs) ( (L1 telescope beam-expanding a using resized Associates), (Vincent to refer (PC (acronyms cell Pockels a by controlled was power The relative sample. the moves to telescope, expansion beam and SLM microscope, entire including the that difference significant the with but scope using a lightpath micro similar to that the for to an coupled was Systems) Nonlinear Optics/Boulder active area, 512 × 512 pixels, optimized for 1,064 nm, Meadowlark nm. at 765 imaged was mCherry and imaging, calcium during nm of 920 wavelength an excitation with imaged was GCaMP6s experiments. all for used was (Nikon) objective (Bruker Corporation, formerly Prairie Technologies). moving a with scanning raster A galvanometer 16×/0.8-NA n displayed on the SLM that would result in the desired pattern with = 400 or 250 mm; L4, 2 inch achromatic doublet, doublet, achromatic inch 2 L4, mm; 250 or 400 = a h ectto suc fr h pootmlto pt ws a was path photostimulation the for source excitation The (Meadowlark 1.3 Version BNS_DVI running computer A mm 7.68 × (7.68 (SLM) modulator light spatial reflective A ture methods f 5 m) n L ( L2 and mm) 50 = 5 0 was used to calculate phase masks to be be to masks phase calculate to used was Fig. 1 Fig. b Fig. 1 Fig. f ) = 200 mm), plano-convex lenses, lenses, plano-convex mm), 200 = ) (Conoptics Ltd.) and shutter (S) (S) shutter and Ltd.) (Conoptics ) b ). in

in vitro

vivo microscope f microscope microscope = 150 mm) mm) 150 = 1 8 - - - ,

(three rotations, 20 20 rotations, (three patterns photostimulation Spiral laser. imaging two-photon the by visualized be could that a sample fluorescent burning by homogeneously registered be could beams photostimulation the geneously fluorescent sample was photostimulated. Alternatively, homo a while lens, tube and objective the via plane sample the conductor) camera (ORCA-Flash4.0, Hamamatsu), which imaged semi metal-oxide complementary (scientific sCMOS widefield a using registered was neurons the of images two-photon the to distribution power (<6% s.d.) among of The targets. beams relative positioning these homogeneous sufficiently in resulted and effect this counteract to sufficient was algorithm GS the to prior intensity spot desired of weighting linear A values. pixel boring neigh in variation greater of the because cross-talk interpixel to prone more are and aberration chromatic increase that features) angles requires higher resolution phase masks (smaller diffracting to large as in diffracting our SLM, cross-talk of interpixel impact standard GS algorithm. This effect was likely due to the increasing was lower than for targets at the center of the field of view with the of view, which required the generation of large angles by the SLM, of field the at periphery the situated to targets efficiency fraction beams individual on each targeted neuron. We found that the dif imaging movies using a discrete Fourier transform (DFT)–based (DFT)–based transform Fourier a using movies discrete imaging Analysis. whisker. individual an for guide a as glued was tube actuator capillary a which onto (Noliac) piezoelectric two-dimensional a with stimuli filtered white-noise random, one-second-long, or Instrumente) (Physik actuator piezoelectric a with one-dimensional 10 Hz stimulation of one-second-long either consisted anesthesia, isoflurane under on encoder occurred which the rotary axle. Whisker stimulation, sit Styrofoamthe on treadmill while the running to freely speed was ran measured with a generally trained Animals and apparatus. the in necessary passively if head-fixation to acclimatized behavior. and stimulation Sensory high-resolution two in as such images comparing by confirmed was resolution Micrometer-scale neurons. labeled strongly or processes shaped uniquely any and vessels blood on based sessions previous from images to matched precisely be could imaging two-photon via obtained resolution high at images Afterward, microscope. the of eyepieces the through area visualized vessels general blood large on same based the localize to straightforward was it Thus, allowed 832 × maximum 832 was imaging window the two-photon by allowed and view of field cortex, of chronic area mm 2 × The 2 a of window. visualization chronic the observed pattern under vessel blood the on based weeks over found (see L3 of focus the near beamlet single a on measured sample by all butmasks and phase blocking loading across even was (59 SLM the by distribution generated beamlets power The mW. 80 to 20 from Power on sample for ranged experiments spiral photostimulation was but mW, 150 to generally 100 mW (for all 28 in experiments from ranged pattern grid a using tion mirrors photostimula for sample on Power plane. SLM galvanometer the to conjugate of pair a with simultaneously beamlets In longitudinal experiments, the same field of view could be be could view of field same the experiments, longitudinal In Movement correction was performed on all calcium calcium all on performed was correction Movement Figure 4a Figure µ m diameter) were generated by moving all all moving by generated were diameter) m , b . ± Animals were gradually gradually were Animals 3 mW, 3 Supplementary Fig. Supplementary 3 Fig. 1 Fig. doi: n 10.1038/nmeth.3217 b = 3 patterns) as as patterns) 3 = ). µ m. m. ). ). - - - - -

© 2015 Nature America, Inc. All rights reserved. 44. All MATLAB. or Prism mean are values with performed were tests statistical time step deconvolution non-negative fast algorithm, for a which the only required parameter with was the imaging performed infer was Spike ence channels. C1V1 and GCaMP both using hand by memory reducing and selected were somata neuronal defining Contours speed requirements. increasing matrix- a thus with DFT, upsampling multiply selective via images two between algorithm doi:

10.1038/nmeth.3217 J. Virol. J. viruses. adeno-associated ofretargeting and interbreedingmultispecies Grimm, D. Grimm, 46

5 82 . . Analyses were performed with MATLAB and ImageJ; 1 . This algorithm computes the cross-correlation cross-correlation the computes algorithm This . et al. et , 5887–5911 (2008). 5887–5911 , ±

In vitro In s.e.m. unless otherwise noted. otherwise unless s.e.m. and in vivo in gene vector evolution via evolution vector therapy gene

-

51. 50. 49. 48. 47. 46. 45.

image registration algorithms.registration image Optik pictures. plane diffraction and image from phase the of determination computation velocity angular for circuit neural a and neocortex in inhibition of architecture microcircuit canonical nonspecific, dense, machine: processing (TPTP) patching targeted neurons unlabeled of electroporation single-cell and recordings patch-clamp frompopulation calcium imaging. Nature signals.intrinsic of imaging optical by revealed cortex of architecture Guizar-Sicairos, M., Thurman, S.T. & Fienup, J.R. Efficient subpixel Efficient J.R. Fienup, & S.T.Thurman, M., Guizar-Sicairos, the for algorithm practicalW.O. A Saxton, R.W.& Gerchberg, Packer,A.M. Margrie,T.W.Two-photon& M. P.,Brecht, W.,Osten, Denk, S., Komai, TargetedHausser,M. W.& Denk, M., Kano, B., Judkewitz, K., Kitamura, Vogelstein,J.T. FunctionalT.N. Wiesel, & C.D. Gilbert, R.D., Frostig, E., Lieke, A., Grinvald, (

Stuttg. 324 in vivo in , 361–364 (1986). 361–364 , . PhD thesis, Columbia University (2011). University Columbia thesis, PhD . Understanding the nervous system as an information an as system nervous the Understanding ) . 35 et al.et Nat. Methods Nat. , 237–250 (1972). 237–250 , Fastnonnegative deconvolution forspiketrain inference in vivo in

5 Opt. Lett. Opt. , 61–67 (2008). 61–67 , . J. Neurophysiol.J. Nat. Protoc. Nat.

33 , 156–158 (2008). 156–158 ,

1

, 647–652 (2006). 647–652 , 104 , 3691–3704, (2010). n a ture methods

CORRIGENDA Corrigendum: Simultaneous all-optical manipulation and recording of neural circuit activity with cellular resolution in vivo

Adam M Packer, Lloyd E Russell, Henry W P Dalgleish & Michael Häusser Nat. Methods 12, 140–146 (2015); published online 22 December 2014; corrected after print 6 February 2015

In the version of this article initially published, the size of the scale bar reported in the legend of Figure 3a was incorrect. The correct size is 100 μm, not 50 μm. In addition, the volume of injected virus in the Online Methods section “Titration of calcium indicator expression” had the incorrect unit. The correct volume is 100 nl, not 100 μl. The errors have been corrected in the HTML and PDF versions of the article. Nature America, Inc. All rights reserved. America, Inc. © 201 5 Nature npg

NATURE METHODS