animal handling and experimentation was done according to the national institutes of health and local institutional animal care and use committee guidelines .
animals of both sexes were used and were housed and maintained in a temperature - controlled environment , on a 12-hour light- dark cycle , with ad libitum food and water in a columbia university animal facility .
we injected c57bl/6 mice aged p21-p24 with 750850 nl of aav - camkii - c1v1t(e162t)-p2a - eyfp at a rate of 130 nl / min at a depth of 400 m from the pial surface of the somatosensory cortex using a ump3 microsyringe pump ( world precision instruments ) . after waiting at least four weeks
, acute coronal slices 350 m thick were prepared from p57 - 210 mice using a leica vt1200s vibratome following cardiac perfusion with ice - cold sucrose solution containing the following ( in mm ) : 27 nahco3 , 1.5 nah2o4 , 222 sucrose , 2.5 kcl , 3 mgso4 , and 1 cacl2 .
slices were incubated at 36c for 30 min in acsf containing ( in mm ) : 126 nacl , 26 nahco3 , 1.1 nah2o4 , 10 glucose , 3 kcl , 3 mgso4 , and 1 cacl2 . during recordings , acsf was similar except for ( in mm ) : 2 mgso4 and 2 cacl2 .
whole - cell recordings were made through 56 mohm glass pipettes using axon multiclamp 700b amplifiers ( molecular devices ) , digitized at 10 khz with national instruments 6259 multichannel cards , and recorded using custom software written using labview ( national instruments ) .
intracellular solution , ph 7.2 , contained ( in mm ) : 135 k - methylsulfate , 8 nacl , 10 hepes , 2 mg - atp , 0.3 na - gtp , 7 phosphocreatine , 0.02 alexa fluor 594 , and 10.7 biocytin .
experiments were performed with a custom - made two - photon dual - laser dual - scanning microscope based on a modified olympus bx50wi microscope with a 40 0.8 na or 20 0.5 na water - immersion objectives ( olympus ) .
initial photostimulation characterization and mapping experiments were performed using a ti : sapphire laser as the light source ( coherent chameleon ultra ii , 140 fs pulses , 80 mhz repetition rate ) .
scanning was performed using one of the set of galvanometer mirrors controlled using fluoview software ( olympus ) .
this scanning system had a low fill fraction ( the amount of time spent scanning the marked roi versus the total scan time ) and though successful in triggering action potentials , it was relatively inefficient , with low peak photocurrents and large jitter and latency .
all other experiments were performed with a second set of scanners on our two - photon laser - scanning and slm microscope .
the laser for this microscope was fixed at 1064 nm and produced 300 fs mode - locked pulses ( fianium 1060 fs-5 ; 1064 nm , 5w , 300 fs , 80 mhz ) .
galvanometers mirrors ( cambridge technology ) and a reflective hd slm ( holoeye 1080 heo ) were installed with the mirrors controlled by scanimage ( janelia farm ) and the phase mask sent to the slm via software from holoeye .
care was taken to ensure raster scans had a high fill fraction to minimize stimulation outside the selected roi .
2c ) were performed bidirectionally over neuronal cell bodies ( 32 by 32 pixels , 51.2 s dwell time per pixel ) . to optimize ap generation ,
we obtained significant currents with as little as 1 mw of 1064 nm light on sample ( 20x 0.5 na objective ) whereas currents saturated above ~30mw at a level dependent on the amount of opsin expression .
we also optimized the temporal pattern of the photoactivation . for short duration illuminations , the off - time of c1v1 t
10 ) , but this may depend on illumination time and intensity . in our experiments , using more extended illuminations ( 150 ms ) , we measured an effective off - time of ~ 80 ms , and chose this as our upper bound for effective scan times .
since the diameter of a typical neuronal soma is ~1520 m and the effective psf produced with the 0.5 na objective at non - saturating powers is ~1 m , we chose to scan the cell roi with 32 lines , ensuring the complete overlapped coverage of the entire cell . at typical excitation powers
( 30 mw ) , values of 0.5 ms / line ( 17 ms per scan ) or shorter were too fast to reach the maximum possible current , perhaps due to insufficient integrated photon fluxes for complete activation of all opsins in the selected volume .
meanwhile , values 4 ms / line or longer ( > 130 ms per scan ) were too slow , since , as expected , opsins stimulated in the initial part of the scan were closed before the end of the scan ( fig .
intermediate scan rates of 12 ms / line produced higher , nearly identical , photocurrents .
given that the ratio of one - photon to two - photon photocurrents is 7:1 , and the rheobase of a typical pyramidal neuron is around 100 pa , the expected average one - photon photostimulation current required for successful two photon activation would be approximately 700 pa . using the photocurrent histogram ( fig .
1e ) , we estimate that our two - photon stimulation protocol should fire almost 50% of the excitatory neurons at the injection site .
this is likely a lower estimate , as many cells with one - photon currents less than 700 pa were two - photon addressable ( supplementary fig .
10a ) . in layers 2 , 3 and 5 , where we found high c1v1 t expression
, this would imply that , for a single injection , ~10,000 neurons are capable firing following two - photon photoactivation ( 48% of all neurons in a sphere 750 m in diameter , assuming a density of 92,000 neurons per mm ) .
the mean time of expression of animals in our experiments was 8  2 weeks , but we found no strong correlations of photocurrents with time over that window ( supplementary fig .
nevertheless , it is possible that with significantly longer expression times there could be an even a larger pool of two - photon addressable cells .
however , we did not find this in the oldest acute slices ( > 30 weeks post injection ) , which showed a reduced number of eyfp expressing cells , and generally reduced viability , perhaps simply due to the age of the animals .
regardless , with judicious choices of photostimulation parameters , single action potentials were reliably generated in a large fraction of c1v1t - expressing neurons with precise timing using two - photon excitation and simple raster - scanning illumination patterns .
the difference between the latency of the first and last ap during a sequence of stimulations ( normalized to the latency of the last action potential ) was 25  1% during an inter stimulus interval ( isi ) of 1 second but dropped to 4  8% with an isi of 22 seconds .
most neurons appeared to recover their original latencies given sufficient time , indicating that there is a small , subtle photo - induced process that alters the excitability of the cell that recovers on the time scale of seconds , although a very small subset of apparently otherwise healthy cells appear to become resistant to further photostimulation , even with increased power . to accurately predict putative presynaptic neurons we needed definitive criteria to distinguish monosynaptic epscs from currents generated by directly stimulating the dendrites of the postsynaptic neuron .
the rise times for direct stimulations was 35.8  19.4 milliseconds ( n = 21 ) , more than ten times the rise times for epscs and statistically distinct from them ( p<0.0001 , unpaired t - test ) .
however , the quickest way to distinguish these responses was by the latency of the response from photostimulation onset : all direct photostimulations started within 3 milliseconds of laser onset , while the optically evoked epsc latency was 54.1  18.6 milliseconds ( n = 8 , range 2984 milliseconds ) .
the smallest optically evoked epsc latency was ten times larger than the largest direct stimulation of the postsynaptic cell s arbor , so the statistical difference between these distributions is very strong ( p<0.0001 , unpaired two - tailed t - test ) . although we occasionally observed combined events in which a connected presynaptic neuron and a portion of the postsynaptic neuron s arbor were photostimulated simultaneously ( supplementary fig .
5d ) , the epsc trace was easy to identify due to the time - locked nature with which it occurs relative to laser onset and the very different kinetics from direct stimulation .
the average probability of connection found , 5% , is lower than in younger animals , although our data is the first we are aware of to probe excitatory connectivity at a large scale in older animals .
this low connectivity also indicates that two - photon photostimulation did not cause widespread axonal activation . in this study
, we applied spatial light modulators ( slms ) to generate arbitrary spatiotemporal patterns of light . in our setup , the laser beam was expanded to fill the reflective slm surface , which displayed phase masks that modulated the wavefront of the incoming laser beam such that multiple beamlets were generated in the far - field ( e.g. on the sample ) .
these targeted multi - beam patterns were coupled into the microscope through galvanometer mirrors that enabled raster - scanning of the individual laser beam spots across multiple rois .
two dimensional phase masks for the slm were generated by either software provided by holoeye software or custom code running in matlab , while the three - dimensional patterns were generated exclusively with custom code in matlab using either a simple prism - lens approach or a paralleled multi - plane optimization algorithm .
for individual neurons , the lateral resolution , defined by the full - width at half maximum ( fwhm ) of the spiking probability , was 6.9 m and the axial resolution was 29 m ( supplementary fig .
6 ) , and was identical to that of normal , single beam targeting with the same objective , confirming that beam splitting with the slm does not significantly degrade the psf .
the high lateral resolution ensures that , as soon as the cell body was partially outside of the raster - scanned roi , the spiking probability drops sharply , and implies that it is critical to illuminate a significant portion of the somatic membrane to generate action potentials .
the lower axial resolution was expected , and corresponds to the axial extent of the neuron s cell body convolved with the two - photon psf generated by the 20x 0.5na objective .
thus , the slm microscope was reliable and accurate in generating action potentials in two neurons simultaneously . to ensure that the optically induced spiking of the single patched neuron would be considered representative of all of the other neurons
, we verified that the illumination intensity of the beamlets was identical with subsequent measurements : immediately following the multiplexed optical activation experiments , the sample was changed to a uniformly fluorescent , liquid filled microcapillary ( 50 m rhodamine 6 ) and illuminated with the same multiplexed , beamlet producing phase masks on the slm .
we measured the two - photon produced fluorescence generated by each individual beamlet , and observed that there were no significant variations in the intensity of the multiple beamlets ( fig .
, we expect that every one of the additional neurons illuminated by the slm patterns would fire action potentials , as did the recorded cell .
we similarly monitored for  stray  excitation areas , or reductions in the lateral confinement or focusing of the individual multispot targets , and detected no significant effects ( supplementary fig .
e ) . considering our power budget and overall efficiency of our slm - microscope system - we can deliver almost 1 w on the sample across multiple targets  we anticipate targeting capability for up to 40 pyramidal cells simultaneously within a 500 m fov . because slms are essentially universal optics ,
they can also act as a focusing lens and the focal position of the laser beam in the sample can be moved independently , in software and without any mechanical devices , relative to the objective s focal plane .
the volume that can be addressed by the slm in our microscope for a given sample and galvanometer mirror position is determined by the slm pixel pitch and overall effective magnification and was a cylinder 520 m in diameter and 400 m tall ( 20 0.5na objective ) . while there were variations in the psf through this focused volume , due to changes in the effective na of the objective because of the additional lens function , and chromatic effects from the diffractive optic ( slm ) , the effective cell - targeting resolution did not change significantly .
although one would expect more significant degradations with a higher na , for the purposes of activating somata with two - photon photostimulation , lower na objectives are actually beneficial .
an additional complication of using the slm as a focusing device is that the nominal magnification factor of the microscope changes as the focal plane is adjusted because the beam is no longer strictly collimated between the tube lens and the objective focal plane .
fortunately , this change is linear and could be easily calibrated ( 14% increase per focal plane displacement of 100 m ; supplementary fig .
similar effects were recently seen in a novel microscope utilizing an electrotunable lens for fast axial focusing .
this change in magnification would begin to affect the lateral resolution of our raster - scanned stimulation protocol if cells were simultaneously targeted and scanned across vastly different axial planes .
for these particular instances a more complex stimulation strategy may be required . in our  out of focal plane  photoactivation experiments
there was no apparent change in the axial resolution of action potential generation in the subset of addressable slm volume that was examined , which was  120 m around the nominal focal plane of the objective ( fwhm of action potential probability versus axial distance = 28  5 m , n = 9 focal planes ; steps of 15 m , in addition to zero lens phase corresponding to objective focal plane ) .
an identical result was seen in an experiment monitoring the peak photocurrents generated by optical stimulation of a cell at different focal planes ( supplementary fig .
animal handling and experimentation was done according to the national institutes of health and local institutional animal care and use committee guidelines .
animals of both sexes were used and were housed and maintained in a temperature - controlled environment , on a 12-hour light- dark cycle , with ad libitum food and water in a columbia university animal facility .
we injected c57bl/6 mice aged p21-p24 with 750850 nl of aav - camkii - c1v1t(e162t)-p2a - eyfp at a rate of 130 nl / min at a depth of 400 m from the pial surface of the somatosensory cortex using a ump3 microsyringe pump ( world precision instruments ) . after waiting at least four weeks
, acute coronal slices 350 m thick were prepared from p57 - 210 mice using a leica vt1200s vibratome following cardiac perfusion with ice - cold sucrose solution containing the following ( in mm ) : 27 nahco3 , 1.5 nah2o4 , 222 sucrose , 2.5 kcl , 3 mgso4 , and 1 cacl2 .
slices were incubated at 36c for 30 min in acsf containing ( in mm ) : 126 nacl , 26 nahco3 , 1.1 nah2o4 , 10 glucose , 3 kcl , 3 mgso4 , and 1 cacl2 . during recordings , acsf was similar except for ( in mm ) : 2 mgso4 and 2 cacl2 .
whole - cell recordings were made through 56 mohm glass pipettes using axon multiclamp 700b amplifiers ( molecular devices ) , digitized at 10 khz with national instruments 6259 multichannel cards , and recorded using custom software written using labview ( national instruments ) .
intracellular solution , ph 7.2 , contained ( in mm ) : 135 k - methylsulfate , 8 nacl , 10 hepes , 2 mg - atp , 0.3 na - gtp , 7 phosphocreatine , 0.02 alexa fluor 594 , and 10.7 biocytin .
experiments were performed with a custom - made two - photon dual - laser dual - scanning microscope based on a modified olympus bx50wi microscope with a 40 0.8 na or 20 0.5 na water - immersion objectives ( olympus ) .
initial photostimulation characterization and mapping experiments were performed using a ti : sapphire laser as the light source ( coherent chameleon ultra ii , 140 fs pulses , 80 mhz repetition rate ) .
scanning was performed using one of the set of galvanometer mirrors controlled using fluoview software ( olympus ) .
this scanning system had a low fill fraction ( the amount of time spent scanning the marked roi versus the total scan time ) and though successful in triggering action potentials , it was relatively inefficient , with low peak photocurrents and large jitter and latency .
all other experiments were performed with a second set of scanners on our two - photon laser - scanning and slm microscope .
the laser for this microscope was fixed at 1064 nm and produced 300 fs mode - locked pulses ( fianium 1060 fs-5 ; 1064 nm , 5w , 300 fs , 80 mhz ) .
galvanometers mirrors ( cambridge technology ) and a reflective hd slm ( holoeye 1080 heo ) were installed with the mirrors controlled by scanimage ( janelia farm ) and the phase mask sent to the slm via software from holoeye .
care was taken to ensure raster scans had a high fill fraction to minimize stimulation outside the selected roi .
2c ) were performed bidirectionally over neuronal cell bodies ( 32 by 32 pixels , 51.2 s dwell time per pixel ) .
to optimize ap generation , we explored the power dependency of the two - photon photocurrents .
we obtained significant currents with as little as 1 mw of 1064 nm light on sample ( 20x 0.5 na objective ) whereas currents saturated above ~30mw at a level dependent on the amount of opsin expression .
we also optimized the temporal pattern of the photoactivation . for short duration illuminations , the off - time of c1v1 t
10 ) , but this may depend on illumination time and intensity . in our experiments , using more extended illuminations ( 150 ms ) , we measured an effective off - time of ~ 80 ms , and chose this as our upper bound for effective scan times . since the diameter of a typical neuronal soma is ~1520 m and the effective psf produced with the 0.5 na objective at non - saturating powers is ~1 m , we chose to scan the cell roi with 32 lines , ensuring the complete overlapped coverage of the entire cell . at typical excitation powers
( 30 mw ) , values of 0.5 ms / line ( 17 ms per scan ) or shorter were too fast to reach the maximum possible current , perhaps due to insufficient integrated photon fluxes for complete activation of all opsins in the selected volume .
meanwhile , values 4 ms / line or longer ( > 130 ms per scan ) were too slow , since , as expected , opsins stimulated in the initial part of the scan were closed before the end of the scan ( fig .
intermediate scan rates of 12 ms / line produced higher , nearly identical , photocurrents . given that the ratio of one - photon to two - photon photocurrents is 7:1 , and the rheobase of a typical pyramidal neuron is around 100 pa , the expected average one - photon photostimulation current required for successful two photon activation would be approximately 700 pa . using the photocurrent histogram ( fig .
1e ) , we estimate that our two - photon stimulation protocol should fire almost 50% of the excitatory neurons at the injection site .
this is likely a lower estimate , as many cells with one - photon currents less than 700 pa were two - photon addressable ( supplementary fig .
10a ) . in layers 2 , 3 and 5 , where we found high c1v1 t expression ,
this would imply that , for a single injection , ~10,000 neurons are capable firing following two - photon photoactivation ( 48% of all neurons in a sphere 750 m in diameter , assuming a density of 92,000 neurons per mm ) .
the mean time of expression of animals in our experiments was 8  2 weeks , but we found no strong correlations of photocurrents with time over that window ( supplementary fig .
nevertheless , it is possible that with significantly longer expression times there could be an even a larger pool of two - photon addressable cells .
however , we did not find this in the oldest acute slices ( > 30 weeks post injection ) , which showed a reduced number of eyfp expressing cells , and generally reduced viability , perhaps simply due to the age of the animals .
regardless , with judicious choices of photostimulation parameters , single action potentials were reliably generated in a large fraction of c1v1t - expressing neurons with precise timing using two - photon excitation and simple raster - scanning illumination patterns .
the difference between the latency of the first and last ap during a sequence of stimulations ( normalized to the latency of the last action potential ) was 25  1% during an inter stimulus interval ( isi ) of 1 second but dropped to 4  8% with an isi of 22 seconds .
most neurons appeared to recover their original latencies given sufficient time , indicating that there is a small , subtle photo - induced process that alters the excitability of the cell that recovers on the time scale of seconds , although a very small subset of apparently otherwise healthy cells appear to become resistant to further photostimulation , even with increased power .
to accurately predict putative presynaptic neurons we needed definitive criteria to distinguish monosynaptic epscs from currents generated by directly stimulating the dendrites of the postsynaptic neuron . the rise times for direct stimulations
was 35.8  19.4 milliseconds ( n = 21 ) , more than ten times the rise times for epscs and statistically distinct from them ( p<0.0001 , unpaired t - test ) .
however , the quickest way to distinguish these responses was by the latency of the response from photostimulation onset : all direct photostimulations started within 3 milliseconds of laser onset , while the optically evoked epsc latency was 54.1  18.6 milliseconds ( n = 8 , range 2984 milliseconds ) .
the smallest optically evoked epsc latency was ten times larger than the largest direct stimulation of the postsynaptic cell s arbor , so the statistical difference between these distributions is very strong ( p<0.0001 , unpaired two - tailed t - test ) . although we occasionally observed combined events in which a connected presynaptic neuron and a portion of the postsynaptic neuron s arbor were photostimulated simultaneously ( supplementary fig .
5d ) , the epsc trace was easy to identify due to the time - locked nature with which it occurs relative to laser onset and the very different kinetics from direct stimulation .
the average probability of connection found , 5% , is lower than in younger animals , although our data is the first we are aware of to probe excitatory connectivity at a large scale in older animals .
this low connectivity also indicates that two - photon photostimulation did not cause widespread axonal activation .
in this study , we applied spatial light modulators ( slms ) to generate arbitrary spatiotemporal patterns of light . in our setup , the laser beam was expanded to fill the reflective slm surface , which displayed phase masks that modulated the wavefront of the incoming laser beam such that multiple beamlets were generated in the far - field ( e.g. on the sample ) .
these targeted multi - beam patterns were coupled into the microscope through galvanometer mirrors that enabled raster - scanning of the individual laser beam spots across multiple rois .
two dimensional phase masks for the slm were generated by either software provided by holoeye software or custom code running in matlab , while the three - dimensional patterns were generated exclusively with custom code in matlab using either a simple prism - lens approach or a paralleled multi - plane optimization algorithm .
for individual neurons , the lateral resolution , defined by the full - width at half maximum ( fwhm ) of the spiking probability , was 6.9 m and the axial resolution was 29 m ( supplementary fig .
6 ) , and was identical to that of normal , single beam targeting with the same objective , confirming that beam splitting with the slm does not significantly degrade the psf .
the high lateral resolution ensures that , as soon as the cell body was partially outside of the raster - scanned roi , the spiking probability drops sharply , and implies that it is critical to illuminate a significant portion of the somatic membrane to generate action potentials
the lower axial resolution was expected , and corresponds to the axial extent of the neuron s cell body convolved with the two - photon psf generated by the 20x 0.5na objective .
thus , the slm microscope was reliable and accurate in generating action potentials in two neurons simultaneously . to ensure that the optically induced spiking of the single patched neuron would be considered representative of all of the other neurons , we verified that the illumination intensity of the beamlets was identical with subsequent measurements : immediately following the multiplexed optical activation experiments , the sample was changed to a uniformly fluorescent , liquid filled microcapillary ( 50 m rhodamine 6 ) and illuminated with the same multiplexed , beamlet producing phase masks on the slm .
we measured the two - photon produced fluorescence generated by each individual beamlet , and observed that there were no significant variations in the intensity of the multiple beamlets ( fig .
, we expect that every one of the additional neurons illuminated by the slm patterns would fire action potentials , as did the recorded cell .
we similarly monitored for  stray  excitation areas , or reductions in the lateral confinement or focusing of the individual multispot targets , and detected no significant effects ( supplementary fig . 9c 
e ) . considering our power budget and overall efficiency of our slm - microscope system - we can deliver almost 1 w on the sample across multiple targets  we anticipate targeting capability for up to 40 pyramidal cells simultaneously within a 500 m fov . because slms are essentially universal optics , they can also act as a focusing lens and the focal position of the laser beam in the sample can be moved independently , in software and without any mechanical devices , relative to the objective s focal plane .
the volume that can be addressed by the slm in our microscope for a given sample and galvanometer mirror position is determined by the slm pixel pitch and overall effective magnification and was a cylinder 520 m in diameter and 400 m tall ( 20 0.5na objective ) .
while there were variations in the psf through this focused volume , due to changes in the effective na of the objective because of the additional lens function , and chromatic effects from the diffractive optic ( slm ) , the effective cell - targeting resolution did not change significantly . although one would expect more significant degradations with a higher na , for the purposes of activating somata with two - photon photostimulation , lower na objectives are actually beneficial .
an additional complication of using the slm as a focusing device is that the nominal magnification factor of the microscope changes as the focal plane is adjusted because the beam is no longer strictly collimated between the tube lens and the objective focal plane .
fortunately , this change is linear and could be easily calibrated ( 14% increase per focal plane displacement of 100 m ; supplementary fig .
similar effects were recently seen in a novel microscope utilizing an electrotunable lens for fast axial focusing .
this change in magnification would begin to affect the lateral resolution of our raster - scanned stimulation protocol if cells were simultaneously targeted and scanned across vastly different axial planes .
for these particular instances a more complex stimulation strategy may be required . in our  out of focal plane  photoactivation experiments
there was no apparent change in the axial resolution of action potential generation in the subset of addressable slm volume that was examined , which was  120 m around the nominal focal plane of the objective ( fwhm of action potential probability versus axial distance = 28  5 m , n = 9 focal planes ; steps of 15 m , in addition to zero lens phase corresponding to objective focal plane ) .
an identical result was seen in an experiment monitoring the peak photocurrents generated by optical stimulation of a cell at different focal planes ( supplementary fig .
 we demonstrate a two - photon optogenetic method that generates action potentials in neurons with single - cell precision , using the red - shifted opsin c1v1 t . 
 we apply the method to optically map synaptic circuits in mouse neocortical brain slices and to activate small dendritic regions and individual spines . using a spatial light modulator we split the laser beam onto several neurons and perform simultaneous optogenetic activation of selected neurons in three dimensions . 
Online Methods
Viral infection, slice preparation, and electrophysiology
Imaging and photostimulation
Two-photon activation of C1V1
Detection of connections after photostimulation
SLM Microscopy
Supplementary Material