Introduction

The advent of two-photon microscopy1 has revolutionized our ability to record the structure and function of various parts of the neocortex at high resolution in vivo. In particular, two-photon imaging of cellular calcium signals has allowed monitoring of neuronal activity from a population of neurons while maintaining single-cell resolution2, 3. Such studies have proven extremely valuable in unravelling the functional organization of the sensory cortices in a wide variety of mammals such as rodents4, 5, cats6,7,8, ferrets9, 10 and macaques11, 12. However, due to the limitation of two-photon imaging of neural activity in the brain to within a depth of 450 µm13,14,15, these experiments have been largely restricted to neocortical layers 2/3. Despite several attempts to extend the depth limits of two-photon imaging16,17,18, poor signal-to-background ratio in deeper cortical layers prevents significant extension of the 450 µm limit in this modality15. Therefore, high-quality functional imaging of neural networks in cortical layers 4, 5 and 6, or in any area below the neocortex continues to pose a significant challenge.

Recently, three-photon imaging has emerged as a powerful technology enabling high-resolution optical imaging in deeper brain areas19. With three-photon excitation, a fluorophore transitions to the excited state via the simultaneous absorption of three photons each containing one-third the energy required for the transition, followed by conventional fluorescence emission20, 21. Therefore, while two-photon excitation uses excitation light with twice the wavelength of one-photon excitation, three-photon imaging uses excitation light with three times that wavelength. The use of longer-wavelength excitation light results in reduced loss of photons due to scattering in the brain. In addition, due to the dependence of three photon excitation on the third power of laser intensity, the effective excitation is localized to an extremely thin focal volume, thereby reducing out-of-focus fluorescence from superficial depths and improving signal-to-background ratio (SBR). Utilizing this technique, neuronal calcium responses have been recorded through the entire depth of the visual cortex22, 23 and from the superficial neurons of the hippocampus24 in mice.

To date, all published studies of three-photon imaging of neuronal activity have used the genetically-encoded calcium indicator (GECI) GCaMP6, either in a transgenic mouse23, 25 or introduced into the cortical tissue via transfection of AAV-based viral vectors22, 24. While the viral approach circumvents the dependence on transgenic availability in a given species, successful labelling of neurons in the targeted brain area depends on two factors: 1. tropism of the specific viral serotype, and 2. the penetration of the promoters being used to drive the expression of the GECI. Failure in either one of these 2 factors could lead to compromised labelling in a particular cell type. For example, transfection with GCaMP constructs packaged into most AAV serotypes and using the synapsin promoter result in a small fraction of neurons in layer 4 being labeled across a variety of species (see “Discussion”). Labelling in other cortical layers is strong, except that the fraction of inhibitory neurons expressing GCaMP6 is small26. An alternative strategy to introduce calcium indicators into a desired brain area without dependence on transfection/expression systems is offered by bulk-loaded synthetic calcium indicators such as Oregon Green 488 BAPTA-1 AM (OGB-1 AM). Such dyes have been successfully used in the past to label and record activity from layers 2/3 neurons in the neocortex through two-photon imaging. In our experience, proper standardization of the dye preparation and injection method can achieve high success rate with dense labelling of cortical networks using these dyes4, 7, 27. Therefore, to extend the use of bulk-loaded calcium indicators to deep-tissue three-photon imaging of calcium signals, we standardized a method to inject OGB-1 AM into the deeper cortical layers in the mouse visual cortex and optically recorded visual responses using three-photon calcium imaging. Here we describe the optimization of the various steps involved in the process and demonstrate three-photon imaging of visual responses using OGB-1 AM. The methodology described here can be easily extended to non-rodent species with thicker cortices and might help circumvent the limitations of virally-expressed GECIs.

Results

We developed a non-genetic strategy for localizing calcium indicators in deeper cortical layers, to be subsequently utilized for recording neuronal activity via three-photon imaging. Briefly, we first mapped out the three-photon brightness spectra of the relevant fluorophores used in the experiments. Second, we optimized the fabrication of glass micropipettes with narrow profiles of the shank (see “Methods”). Then we filled these pipettes with OGB-1 AM and Alexa Flour 633 hydrazide (Alexa 633), and pressure-injected these dyes at 500–600 µm depths under multiphoton visualization. Finally, following bulk-loading of the neurons with OGB-1 AM, we performed three-photon fluorescence imaging of calcium signals at 1300 nm excitation and recorded visually-evoked responses.

Before we could use OGB-1 AM and other fluorophores for three-photon imaging, we needed to determine the best three-photon excitation wavelengths for these fluorophores. Theoretically, for any fluorophore, the peak excitation wavelengths for two- and three-photon absorption should be located at two and three times the one-photon absorption peak, respectively. However, two-photon absorption peaks for most fluorophores deviate from double the one-photon peaks28,29,30. This deviation may be true for three-photon absorption as well, thus necessitating actual measurement of the three-photon brightness spectra for relevant fluorophores to be used in experiments. Therefore, we mapped out the brightness spectra of a set of green and red fluorophores commonly used in imaging experiments (red fluorophores: Alexa 633, Texas Red Dextran, Sulforhodamine 101, mCherry, mRaspberry, tdTomato; green fluorophores: Oregon Green 488 BAPTA-1 hexapotassium salt, Fluorescein dextran). Some of these dyes are used in our laboratory and others to image the brain vasculature and astrocytes, with the goal of studying neurovascular coupling8, 31. Briefly, for the three-photon spectral testing of the various dyes, we filled glass micropipettes with aqueous solutions of the individual dyes, imaged them under the microscope at varying excitation wavelengths and measured the fluorescence brightness at each wavelength (see “Methods”). For comparison, we measured the two-photon brightness spectra of the same dyes as well. The two-photon brightness spectra (Fig. 1) revealed peaks that matched reported action cross-sections of the dyes28,29,30, validating that our method was sensitive in capturing the strong excitation wavelengths. The three-photon excitation peaks for the green fluorophores, including OGB-1 AM, were located around 1300 nm (Fig. 1, wavelength range 1250–1350 nm). The red fluorophores revealed two broad peaks in their three-photon brightness spectra (Fig. 1, wavelength range 1500–1800 nm). The precise location of the peaks varied slightly among the red fluorophores we tested. Moreover, while the two-photon spectra of all fluorophores revealed characteristic sharp peaks, the brightness peaks in the three-photon spectra were much broader. These broad peaks likely resulted from the fact that the excitation beam for three-photon excitation had much broader bandwidth (see Supplementary Fig. S1). From these spectra, we chose to use 1300 nm and 1600 nm as the optimal excitation wavelengths for three-photon imaging of OGB-1 AM and Texas Red Dextran, respectively. These wavelengths were also suitable because the absorption coefficient of water have local minima at 1300 and 1600 nm32, 33, thereby causing less attenuation of the excitation beam due to water absorption.

Figure 1
figure 1

Two- and three-photon fluorescence brightness spectra of selected green and red fluorophores. Normalized two-photon (green curves) and three-photon (magenta curves) fluorescence brightness values are plotted against different excitation wavelengths. Open circles: fluorescent brightness values measured at excitation wavelengths 10 nm apart; continuous lines: individual points 10 nm apart interpolated at 2 nm steps. The measurements of each fluorophore were repeated at least twice and similar results were obtained.

Superficial injections of OGB-1 AM in layers 2/3 of mice and other species have been routinely carried out using glass micropipettes with 2–3 µm tip diameter3, 4. In order to drive the pipettes down deeper into the cortex, it was important to fabricate pipettes with narrower shanks so that the damage to the superficial layers of cortex could be minimized. Therefore, we fabricated glass micropipettes with small tip diameters (2–3 µm) and slowly-tapering shanks (110 µm diameter at 1.4 mm behind the tip) that could be inserted deeper into the brain with limited damage to the tissue. With impedances ranging 13–15 MΩ, these pipettes could be used to inject the dyes without clogging at the tips.

Injecting OGB-1 AM in layers 5–6 of the neocortex would require the pipette to travel through the brain significantly farther than what is required for conventional layer 2/3 injections. It is important to avoid piercing cells and blood vessels during the long travel to the injection depths, because this could lead to clogging of the tips and tissue damage. Therefore, we carried out the process of pipette insertion, travel and dye injection under continuous visualization of the pipette tip, which was achieved by mixing a red fluorescent dye (Alexa 633) with OGB-1 AM in the pipette and visualizing it via multiphoton imaging through a 40 × objective (for details see Fig. 2 and Methods). The mouse head was tilted to facilitate insertion of the pipette under the objective, and then a target location for pipette entry on the brain surface was chosen via bright-field imaging through the objective (Fig. 2a). The objective was then retracted up by 2 mm, the pipette was advanced under the objective and the epi-fluorescence from Alexa 633 at the tip was brought into focus (Fig. 2b). By simultaneously moving the pipette and the objective downward, the tip was then brought to the entry location on the brain surface (Fig. 2c). At this point imaging modality was switched to multi-photon mode by using 1300 nm excitation, which generated strong two-photon excitation fluorescence from the Alexa 633 at the pipette tip. The pipette was then slowly advanced through the brain while maintaining the tip in focus, until the desired depth of injection was reached (Fig. 2d). The dye mixture was then pressure-injected into the brain by applying air pulses from a Picospritzer. Following completion of the injection, the pipette was slowly retracted from the tissue. The cells were allowed to load with the dye for a period of 60 min, at the end of which the head was tilted back to horizontal orientation and multiphoton imaging of labelled cells commenced using a 25 × objective (Fig. 2e). Finally, in a subset of experiments, we also injected Texas Red Dextran into the bloodstream to image cortical blood vessels.

Figure 2
figure 2

Schematic of the OGB-1 AM injection method. (a) Step 1. The pipette entry point on the brain surface (red star) is determined by stereotaxic coordinates and anatomical landmarks. The surface vessels are visualized with a 40 × objective under bright-field illumination. (b) Step 2. The pipette tip is positioned directly above the entry point on the brain surface using green epi-fluorescent light after the objective is raised by 2 mm. (c) Step 3. The pipette and the objective are lowered vertically until the brain surface comes into focus. (d) Step 4. The pipette is driven down diagonally until its tip reaches the desired depth, here into cortical layer 5–6 located below layer 4 (L4). The tip is visualized throughout the travel via two-photon fluorescence of Alexa 633 under 1300 nm excitation. (e) Step 5. After dye injection and labelling of cells, the craniotomy is sealed with agarose and a 5 mm glass coverslip. The head is tilted back to horizontal orientation and a 25 × objective lens is positioned to perform three-photon imaging using 1300 nm excitation.

Various cortical compartments such as labelled cell bodies, blood vessels and fibre tracts were visualized using three imaging modalities. Three-photon imaging of OGB-1 AM fluorescence at 1300 nm excitation was used to visualize the activity of visual cortical neurons. Three-photon imaging of Texas Red Dextran fluorescence at 1600 nm excitation was used to visualize the entire vascular network. Vascular imaging was included in order to demonstrate the possibilities of neural and vascular imaging in the same brain tissue, in two different colours, for potential neurovascular coupling studies8. In addition, we used the label-free Third Harmonic Generation (THG) imaging at 1600 nm excitation to visualize blood vessels and a subset of the myelinated axons in the cortex. THG with 1600 nm excitation generated photon emission at 533 nm, which was detected in the green emission channel of the microscope (see "Methods"). We imaged an anatomical z-stack (n = 2 mice) of the entire cortical column using these three modalities and by varying power exponentially with imaging depth. The OGB-1 AM labelled a field of cells spanning ~ 300–400 µm in diameter localized to cortical layers 5–6 (Fig. 3a, b, yellow). The vascular network could be imaged through the entire cortical column (Fig. 3a–c, magenta). The strong THG signal from the myelinated axons was a great advantage because it helped clearly visualize the white matter tract below cortex, thereby allowing a clear demarcation of the ventral boundary of the cortical layer 6 (Fig. 3a-c, cyan). The strong fluorescence from the vascular Texas Red Dextran allowed visualization of blood vessels running through the white matter tract (Fig. 3c) as well as below it (Fig. 3a).

Figure 3
figure 3

OGB-1 AM labelled cells deep in mouse visual cortex relative to blood vessels and white matter. (a) Side view perspective of a three-dimensional reconstruction of the three-photon image volume depicting the field of OGB-labelled cells with respect to blood vessels and the white matter. OGB-1 AM labelled cells in layers 5–6 are shown in yellow, blood vessels labelled with Texas Red Dextran are shown in magenta and cortical white matter imaged with THG is shown in cyan. x–y–z volume dimensions: 375 µm × 375 µm × 1100 µm. (b) Single z plane three-photon image at 750 µm below brain surface showing labelled cells and blood vessels. (c) Single z plane three-photon image in the white matter at 900 µm below brain surface. Myelinated axons in the white matter have a banded structure and show a strong THG signal. The brightness and contrast were adjusted in (ac) in order to highlight primarily either the labelled neurons (a, b) or the white matter tract (c).

To test the feasibility of recording neuronal responses using three-photon imaging of OGB-1 AM fluorescence, we presented drifting square-wave gratings in the contralateral monocular visual field of the mouse, while imaging the OGB-1 AM labelled cell fields. Functional three-photon imaging was carried out between the depths of 550–650 µm (n = 3 mice). Using 40–60 mW average power on the brain surface, we routinely recorded visual responses that were modulated by the grating orientation and direction of motion (Fig. 4). Recent work has shown that for three-photon imaging at ~ 600 µm depth with 1300 nm excitation, heating-induced tissue damage starts at ~ 100 mW average power34. Our use of 40–60 mW average power for OGB-1 AM imaging falls within those safety limits.

Figure 4
figure 4

Visual responses of OGB-1 AM labelled neurons in layer 5–6 imaged by three-photon microscopy. (a) Anatomical image at cortical depth 550 µm below the pial surface. (b) Tuning curves of direction and orientation selectivity for six neurons (numbered 1 through 6, indicated by arrows in a). Direction Selectivity Index (DSI) and Orientation Tuning Bandwidth (BW, half-width at half-height) of each neuron are labelled accordingly. Open circles represent mean ∆F/F responses and vertical bars lines represent standard deviation; Blue curves are double Von Mises’ fits to the mean data. (c) Anatomical image at cortical depth 600 µm below the pial surface. (d) Tuning curves of direction and orientation selectivity for six neurons at 600 µm below pia (numbered 1 through 6, indicated by arrows in c).

Discussion

Our goal was to extend the use of calcium indicators in three-photon imaging to include bulk-loaded synthetic chemical dyes that could complement the use of GECIs, where applicable. We standardized the bulk-loading of layer 5–6 neurons in the mouse visual cortex with OGB-1 AM dye and subsequently imaged visual responses from labelled neurons using three-photon microscopy at 1300 nm excitation. Our results show that OGB-1 AM can be used for three-photon functional imaging of deeper cortical layers.

The choice of optimal excitation wavelength is of critical importance in three-photon microscopy, and is not driven by the consideration of the absorption cross-section of the fluorophore alone. The near infra-red (NIR) wavelengths of light suitable for three-photon excitation are absorbed strongly by water, which attenuates the excitation beam intensity and leads to significant heating of the brain tissue. The absorption spectrum of water in the NIR range contains several peaks and valleys, revealing two narrow regions centred around 1300 nm and 1700 nm where excitation attenuation is minimum19, 32, 33, 35. The ultimate choice of excitation wavelength for a particular fluorophore is based on a combination of this attenuation window and the absorption cross-section of the fluorophore. Ideally, the optimal wavelength would be one where the fluorophore absorption is high (peak in absorption cross-section spectrum) and water absorption is low (valley in water absorption spectrum). However, for some fluorophores, if the peak in fluorophore absorption does not coincide with the trough in water absorption, depending on the relative amplitudes of the fluorophore absorption spectrum a decision has to be made regarding what wavelength to use in three-photon imaging.

Therefore, we first mapped out the optimal three-photon excitation wavelengths for the fluorophores used in our experiment (OGB-1 AM, Alexa 633 and Texas Red Dextran) and some other fluorescent dyes and proteins routinely used in multiphoton imaging of the brain vasculature8, 31. Conventionally, the intrinsic fluorescent properties (absorption cross-section) of fluorophores are quantified through spectroscopic methods, but the results from study to study varies tremendously (reviewed by Drobizhev and colleagues36). For the practical utilization of fluorophores in a multiphoton imaging context, imaged fluorescence brightness under varying wavelengths of excitation reveals information sufficient for optimizing the excitation wavelength used for imaging experiments. For example, the brightness spectra shown in Fig. 1 indicated that the best excitation wavelength to be used for a specific fluorophore under the optical parameters of our imaging system design, which includes the lasers, table optics and microscope. The peak brightness wavelengths for the same fluorophore may be different in other imaging systems which may be configured differently. The fluorescence brightness imaged inside a glass micropipette or cuvette is not solely dependent on the absorption cross-section of the fluorophore, instead it depends on various other imaging parameters37. For example, the fluorescence brightness in three-photon excitation is highly sensitive to the pulse duration of the excitation laser beam. But the pulse duration of an excitation beam under the objective lens could vary across different wavelengths and from one imaging system to another, depending on the dispersion properties of the optics used. As a consequence, the wavelength that produces the peak brightness could also differ between different imaging systems. Therefore, the brightness spectra we report are operational guides for one particular imaging system, they should not be confused with universal action cross-section plots, and such spectra need to be determined independently for each imaging system. For green fluorophores such as OGB-1 AM in our setup, the choice of wavelength was simple as there was only one peak in the brightness spectrum around 1300 nm, which also coincides well with the local minima in water absorption. For red fluorophores, we saw two broad peaks centred around 1600 and 1700 nm, the relative amplitude of the peaks varying between fluorophores. For Texas Red Dextran, the bigger peak fell near 1600 nm, where the effective attenuation length of the mouse cortex happens to be slightly shorter than at 1700 nm35, implying that there is slightly more attenuation at 1600 nm. However, the brightness peak at 1600 nm was almost twice in amplitude compared to 1700 nm. Therefore, we chose 1600 nm as optimal excitation wavelength for Texas Red Dextran.

We succeeded in restricting the OGB-1 AM loading to cells within a diameter of 300–400 µm from the injection site to cortical layers 5–6. As a result, the superficial layers of cortex above the loaded cell field contained no labelled cells and thus contributed little or no fluorescence. This situation differs from the previously reported studies using virally expressed GECIs22, where neurons in layers 2/3 were also labelled with GCaMP6. Despite strong non-linear confinement of the excitation beam within a very narrow focal volume in three-photon excitation, superficial fluorophores in layers 2/3 would nevertheless contribute some low levels of fluorescence, thereby reducing SBR and attenuating the excitation beam for deeper cortical layers. The localized labelling achieved by our method, in contrast, ensured three-photon excitation fluorescence from only the labelled cell field localized at the desired depth. The consequent marginal improvements in SBR may prove critical when performing three-photon imaging even deeper in the brain, or in other types of tissues which may have even shorter attenuation lengths.

Functional imaging of calcium signals through OGB-1 AM fluorescence in deeper cortical layers, as described here, overcomes the challenges of imaging with some GECIs. The AAV-based viral approaches typically use synapsin or CaMKII promoters to drive expression of the GECIs in mammalian neurons. In the neocortex of most mammals tested so far, these promoters drive strong expression in layers 1, 2, 3, 5 and 6, but in layer 4 only a small subset of neurons express the exogenous protein (see Anderman et al.38 for mouse neocortex38 and Supplementary Fig. S2 for cat and mouse neocortex). Because two-photon imaging does not provide access to depths at which cortical layer 4 is typically located in non-rodent species, the lack of reliable expression in layer 4 has not been a major impediment to two-photon imaging experiments thus far. But now that three-photon imaging has made it possible to carry out high-resolution optical imaging at depths of 1 mm or beyond, layer 4 cortical neurons in non-rodent species such as cats, ferrets or macaques (typically spanning 650–1200 µm from the surface) are within imaging access, provided one can label these neurons with a calcium indicator. In this regard, the lack of virally-driven expression in cortical layer 4 poses a challenge for using GECIs to record layer 4 neuronal activity through three-photon imaging. The method described here in the mouse, involving visualized bulk-loading of a synthetic calcium indicator through localized injection deep in the neocortex, could be easily extended to layer 4 of non-rodent species such as ferrets, cats and monkeys. Such an approach would circumvent the limitations of viral transfection methods in these species and provide a viable alternative approach to label neurons in and carry out functional three-photon imaging from layer 4.

Methods

Multiphoton imaging setup

Imaging was performed with a customised microscope from Bruker, with two separate excitation sources for two- and three-photon imaging (see Fig. 5). An optical parametric oscillator (Insight X3, Spectra Physics) running at 80 MHz repetition rate served as the two-photon excitation source. A noncollinear optical parametric amplifier (NOPA, Spectra Physics) running at 1 MHz repetition rate pumped by a 70 W laser (Spirit 1030–70, Spectra Physics) was used as the three-photon excitation source. All structural and functional imaging in the mouse visual cortex and collection of fluorophore brightness spectra (see below) were performed using a 25 × objective lens (XLPLN25XWMP2, NA 1.05, Olympus). In addition, a 40 × objective lens (LUMPLFLN 40XW, NA 0.8, Olympus) was used during the visualized injection of fluorescent dyes into layers 5–6 of the mouse visual cortex in vivo (see below). The emitted photons were separated into green (OGB-1 AM or THG) and red (Texas Red Dextran) channels by passing through first a dichroic beam splitter (T565lpxr, Chroma) and then through barrier filters (green: 525 ± 25 nm band-pass, Chroma; red: 675 ± 75 nm bandpass, Chroma) before being collected by two photomultiplier tube (PMT) detectors (H10770PB-40 SEL, Hamamatsu). For 1300 nm excitation beam from the NOPA, we compensated the group delay dispersion of the system by placing a two-prism compressor in the optical path before the microscope. No external compensation mechanism was used for 1600 nm excitation beam. The final pulse widths under the Olympus 25 × objective, as measured by an autocorrelator (Carpe, APE) using secant-squared fitting, were found to be 65 fs and 58 fs for 1300 and 1600 nm beams, respectively.

Figure 5
figure 5

Schematic of the system setup. The 1150 LP filter is used to block the residual visible light from the NOPA. The 2-prism compressor is used to obtain short pulses out of the objective lens for 1300 nm excitation. NOPA, noncollinear optical amplifier; LP, long pass; M, mirror; MM, motorized mirror; IR, infrared; PMT, photomultiplier tube.

Measuring two- and three-photon fluorescence brightness spectra

Selected red and green fluorophores of interest were prepared as aqueous solutions: Alexa 633 hydrazide 87 μM (Invitrogen); Sulforhodamine 101 7.6 μM (Sigma Aldrich); Texas Red Dextran 70 kDa 87 μM (Invitrogen); mCherry 91 μM (OriGene); mRaspberry 75 μM (OriGene); tdTomato 4 μM (OriGene); Oregon Green 488 BAPTA-1 hexapotassium salt 45 μM (Invitrogen); Fluorescein Dextran 2000 kDa 12.5 μM (Sigma Aldrich). Each fluorophore solution was loaded into a glass micropipette and imaged under the objective lens by varying excitation wavelengths at 10 nm steps and maintaining the same average power on the sample at each wavelength. The fluorescence brightness was calculated by averaging the pixels within a region of interest (ROI) drawn within the pipette and subtracting from it the average brightness within an ROI of the same size drawn outside the pipette. For two-photon spectra of all fluorophores, a wavelength range of 800 to 1200 nm (pulse duration < 200 fs) was scanned. For three-photon spectra, 1250 to 1350 nm (pulse duration < 150 fs) was scanned for green fluorophores and 1500–1800 nm (pulse duration < 245 fs) was scanned for red fluorophores. These spectral measurements were repeated at least twice for each fluorophore.

Animals and surgery

All animal procedures were approved by the Institutional Animal Care and Use Committee of the University of Minnesota and all experiments were performed in accordance with the relevant guidelines and regulations. OGB-1 AM injections in deep cortical layers were performed in male C57BL/6 J mice (n = 5, postnatal days 71–79). Following dye injections, structural imaging was performed in two of five mice, whereas the other three mice were used for functional imaging of visual responses. For the two mice used for structural imaging, anaesthesia was induced by an intraperitoneal injection of urethane (1.5 g kg−1), supplemented by injections of ketamine (10–30 mg kg−1) and xylazine (1–3 mg kg−1), and maintained by one subsequent injection of urethane (0.25 g kg−1) during imaging. In the mice used for functional imaging, anaesthesia was induced by an intraperitoneal injection of fentanyl citrate (0.04–0.06 mg kg−1), midazolam (4–6 mg kg−1) and dexmedetomidine (0.2–0.25 mg kg−1) cocktail. During functional imaging, a lower dosage of the anaesthetic mixture (0.006–0.02 mg kg−1 h−1 fentanyl citrate, 0.6–2.0 mg kg−1 h−1 midazolam and 0.03–0.1 mg kg−1 h−1 dexmedetomidine) was administered through an i.p. catheter connected to a syringe pump. In all mice, the heart rate, temperature and respiration rate were continuously monitored throughout the duration of the experiment. Small craniotomies (2–3 mm in diameter) were made over the primary visual cortex (V1) centred approximately 2.5 mm lateral to the lambda suture and 1–1.5 mm anterior to the transverse sinus. In mice used for structural imaging, Texas Red Dextran (2.5%, 1 µL/g) was injected retro-orbitally to visualize the vasculature.

OGB-1 AM dye injection

i. Pipette and OGB-1 AM dye preparation. Pipettes for OGB injections were pulled from borosilicate glass capillaries (1B150F-4, outer diameter 1.5 mm, inner diameter 0.84 mm, World Precision Instruments) using a micropipette puller (P-97, Sutter Instrument). The pipettes had a tip diameter of 2–3 µm and a gradual taper such that the diameter at 1.4 mm behind the pipette tip measured ~ 110 µm. The OGB-1 AM dye mixture was prepared and loaded into the pipettes following procedures that have been described previously27. Because the AM ester is transparent until it enters cells, Alexa 633 was included in the pipette to visualize the pipette tip during the approach to cortical layers 5–6 and through the ejection of the OGB-1 AM dye using three-photon microscopy (see below). Less commonly used AM dyes, e.g., Cal-590, have been recently applied in the neocortex by visualized guidance and injection with two-photon microscopy39.

ii. Determining the entry point of the pipette into the brain. The mouse was positioned on a stage under the microscope and the head was tilted ~ 15° with respect to the imaging plane to provide full clearance for the pipette to approach the cortical surface without bumping the objective lens (Fig. 2a). The location for the pipette’s entry into the brain was first determined by visualizing the cortical surface through a 40 × objective lens (3.3 mm working distance) under bright-field illumination. The angle for the pipette’s approach was set to 30° with respect to the imaging plane (thus, ~ 45° relative to the brain surface due to the tilting of the head). During travel to the injection site in layers 5–6 (~ 500–600 μm deep), this angle would cause significant displacement along the horizontal axis (approximately 500–600 μm). Therefore, we chose the location of entry carefully, making sure that despite the horizontal displacement, the pipette would still remain within V1 once it reaches the desired depth (see Step 1 in Fig. 2).

iii. Pipette insertion into the brain. Once the entry location was in focus, the 40 × objective lens was moved up by 2 mm to ensure the entry of the pipette. The pipette was mounted on a micromanipulator (MPC-365, Sutter Instrument) at an angle of 30° and the pipette tip containing the dye mixture was brought in focus under the objective lens using epi-fluorescence (see Step 2 in Fig. 2). Then the pipette was slowly lowered vertically using the manipulator while the objective lens was simultaneously lowered to keep the tip in focus, until the tip arrived at the pre-determined entry point on the brain surface (see Step 3 in Fig. 2). Two to three drops of agarose (2%, dissolved in artificial cerebrospinal fluid) were applied if brain pulsations were visible.

iv. Visualized travel to the injection site and dye injection. Once the tip was at the brain surface, imaging was switched to multiphoton mode and the two-photon excitation fluorescence from Alexa 633 at the pipette tip was visualized using 1300 nm excitation from the Spirit-NOPA. Under continuous visual guidance, the pipette was slowly advanced using the diagonal axis of the Sutter micromanipulator, until the pipette tip reached 500 μm below the brain surface (see Step 4 in Fig. 2). To prevent the pipette tip from clogging, occasional small pressure puffs (~ 10 psi) were applied as the pipette traversed through the brain. At the injection location, the dye mixture was pressure-ejected into the extracellular space (3–5 pulses, 30 s pulse duration, 10–15 psi per pulse) by using a Picospritzer (Parker Hannifin). Upon completion of injection, the pipette was withdrawn slowly, and a period of approximately one hour was allowed for the dye-loading of cells to complete. The craniotomy was sealed with agarose (1.5–2%, dissolved in artificial cerebrospinal fluid) and a 5 mm glass coverslip (World Precision Instruments) was placed over it. The mouse head was tilted back to horizontal position and the Olympus 25 × objective lens was positioned over the labelled area before imaging commenced (see Step 5 in Fig. 2).

Visual stimulation

Drifting square-wave grating stimuli (100% contrast, 1.5 Hz temporal frequency and 0.025–0.033 cycles/degree) were presented on a 17-inch LCD monitor placed 15 cm from the eye. The stimuli were presented at 8 directions of motion in 45° steps. All our images were collected at 512 × 512 pixels. The sizes of the imaged fields of view (FOV) ranged between 265 × 265 and 495 × 495 μm, and the integration time per pixel was set to 3.2 μs. Under these imaging conditions, the frame periods ranged between 1.11 and 1.25 s. During functional imaging, drifting gratings were displayed for 5 imaging frames, interleaved with 10 frames of blank stimulus (equiluminant uniform grey), except for one experiment in which the blank stimulus was displayed for 7 frames. Thus, grating stimuli were displayed for approximately 6 s with 12 or 8 s of blank. Each condition was repeated at least 4 times.

Data analysis

All images were analysed with custom code written in Matlab (Mathworks). Neurons were automatically masked by morphological criteria and validated manually4, 6, 7. Fluorescence time courses of each neuron F(t) were calculated by averaging over the pixels within the mask. Then the response ∆F/F were computed as (F1 − F0)/ F0, where F1 was the average fluorescence across the entire stimulus window and F0 was the average fluorescence during the last approximately 4 s from the blank interval. Responsive neurons were defined by ANOVA across 8 directions over multiple trials (p < 0.05).

To compute the direction selectivity, we first fit a double von Mises curve to the neural response:

$$f\left( \theta \right) = A_{1} e^{{\kappa \left( {\cos \left( {2\left( {\theta - \varphi_{1} } \right)} \right) - 1} \right)}} + A_{2} e^{{\kappa \left( {\cos \left( {2\left( {\theta - \varphi_{2} } \right)} \right) - 1} \right)}} + B,$$
(1)

where \({A}_{1}\) is the amplitude at the preferred direction, \({A}_{2}\) is the amplitude of the second peak, \(\kappa\) represents a width parameter,\(\theta\) is the orientation angle, \({\varphi }_{1}\) is the preferred direction, \({\varphi }_{2}\) is constrained to be \({\varphi }_{1}\) + 180°, and \(B\) is the baseline40. The response to the preferred direction of motion (\({R}_{pref}\)) and the opposite (null) direction of motion (\({R}_{null}\)) were estimated from the fitted curve.

The Direction Selectivity Index (DSI) was calculated as,

$$DSI = 1 - R_{null} /R_{pref}$$
(2)

To determine Orientation Tuning Bandwidth (BW), responses to the two directions of motion for the same orientation were first averaged. Then, these responses were fit with single von Mises function (Eq. 3 below).

$$f\left( \theta \right) = Ae^{{\kappa \left( {\cos \left( {2\left( {\theta - \varphi } \right)} \right) - 1} \right)}} + B,$$
(3)

where \(A\) is the peak amplitude and \(\varphi\) is the preferred orientation. The other parameters are as in Eq. 1. BW was then calculated as the half-width at half-height of the fitted curve.