Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2024 Dec 1.
Published in final edited form as: Nat Protoc. 2023 Nov 1;18(12):3732–3766. doi: 10.1038/s41596-023-00893-w

Guide to the construction and use of an adaptive optics two-photon microscope with direct wavefront sensing

Pantong Yao 1, Rui Liu 2, Thomas Broginni 2, Martin Thunemann 3, David Kleinfeld 1,2,4,5,*
PMCID: PMC11033548  NIHMSID: NIHMS1983361  PMID: 37914781

Abstract

Two-photon microscopy, combined with appropriate optical labeling, has enabled the study of structure and function throughout animals and their organ systems, especially nervous systems. This methodology enables, for example, the measurement and tracking of sub-micrometer structures within brain cells, the spatio-temporal mapping of spikes in individual neurons, and the spatio-temporal mapping of transmitter release in individual synapses. Yet the spatial resolution of two-photon microscopy rapidly degrades as imaging is attempted at depths more than a few scattering lengths into tissue, i.e., below the superficial layers that constitute the top 300 to 400 μm of neocortex. To obviate this limitation, we measure the wavefront of the guide star at the focus of the excitation beam and utilize adaptive optics that alters the incident wavefront to achieve an improved focal volume. We describe the construction, calibration, and operation of a two-photon microscope that incorporates adaptive optics to restore diffraction-limited resolution throughout the nearly 900 μm depth of mouse cortex. Our realization utilizes a guide star formed by excitation of red-shifted dye within the blood serum to directly measure the wavefront. We incorporate predominantly commercial optical, optomechanical, mechanical, and electronic components; computer aided design models of the exceptional custom components are supplied. The resultant adaptive-optics two-photon microscope is modular and allows for expanded imaging and optical excitation capabilities. We demonstrate our methodology in mouse neocortex by imaging the morphology of somatostatin-expressing neurons that lie 700 μm beneath the pia, calcium dynamics of layer 5b projection neurons, and thalamocortical glutamate transmission to L4 neurons.


A goal of neuroscience is to decipher how the complex dynamics of neuronal activity encodes sensory input and guides subsequent behavior. Two-photon laser scanning microscopy1,2 (TPLSM) can image throughout the mammalian brain with cellular-to-subcellular resolution and provides much of the current functional data to address this goal3. With a variety of organic and genetically encoded biosensors4, TPLSM permits investigators to record neuronal activity in terms of calcium dynamics5, neurotransmitter release6,7, and even voltage signaling8. Imaging methods, in contrast to multi-site electrodes9,10, report the areal organization of the recorded neuronal activity in relation to both real-space coordinates and functional coordinates, e.g., as famously studied for the visual system11. Spatial information may be further used to align the measured neuronal activity with the patterns of gene expression, acquired ex-vivo, to enable the study of neuronal dynamics in relation to molecularly defined cell types12.

The spatial resolution and the signal-to-background ratio of TPLSM degrades with increasing imaging depth. Inhomogeneities in brain tissue and refractive index mismatches through the preparation will aberrate the wavefront of the excitation beam and lead to an enlarged focus with diminished focal intensity (Figure 1a,b). To counteract the optical aberrations, adaptive optics TPLSM (AO-TPLSM) integrates a phase modulator, i.e., a deformable mirror or spatial light modulator, to the conventional TPLSM to compensate the distortion of the wavefront13 (Figure 1c). The compensation can be determined by either direct measurement of the distorted wavefront via a wavefront sensor1416 (Figure 1d) or by inferring it indirectly from the acquired signals1721.

Figure 1 |. Concepts of adaptive optics and wavefront sensing.

Figure 1 |

a, Schematic diagram illustrating the propagating wavefront of the excitation beam in an aberration-free imaging system in which the beam focused as a diffraction limited spot. b, Aberrated wavefront as it propagates through the inhomogeneous imaging sample, resulting in an enlarged and distorted focus. c, Compensating the aberration by the phase modulator to recover the diffraction limited focus. d, Acquiring the desired wavefront for the phase modulator by direct wavefront sensing of the aberrated wavefront that generates by a point source in the sample.

Overview of the procedure.

Despite its advantages in neuroscience research, implementing AO-TPLSM presents challenges. Here we describe a comprehensive guide to make it relatively straight forward to construct the hardware and perform AO-TPLSM imaging. We share the design of our system (Figures 3 and 4) in terms of assembly drawings for all components (Supplementary Data 1). We use commercially available parts as much as possible (Tables 1 to 3) and, for the customized parts, detailed drawings and computer aided design models are supplied (Table 4 and Supplementary Data 2). We present illustrated step-by-step instructions (Figure 5) for the construction (Procedure I: steps 1 to 22, and Supplementary Data 1), alignment (Procedure II: steps 23 to 42), calibration (Procedures IIIa and IIIb: steps 43 to 53), and quality control (Procedure IIIc: steps 54 and 55). The custom MATLAB codes for calibrating and operating the AO-TPLSM system are supplied (Supplementary Software). We provide details of the preparation of the fluorescent molecule, Cy5.5-dextran, that underlies the guide star (Procedure IV: steps 56 to 68). Lastly, we provide example demonstrations of the procedure to perform in vivo imaging experiments with AO corrections (Procedure V: steps 69 to 75).

Figure 3 |. Schematic diagram of AO-TPLSM.

Figure 3 |

a, Schematic diagram of the entire system showing optics and beam path of the AO-TPLSM. DM, deformable mirror; SHWS, Shark-Hartmann wavefront sensor; TS, translational stage; M, mirror; L, lens; D, dichroic mirror; SP filter, shortpass filter; BP filter, bandpass filter; GS, galvo scanner; RS, resonant scanner; fs laser, femtosecond laser; MPPC, multi-pixel photon counters. b, Schematic diagram showing only the optics that are involved in descanning of the guide star signal.

Figure 4 |. Implementation example of AO-TPLSM.

Figure 4 |

Computer model of AO-TPLSM. Detailed technical drawings are provided in Supplementary Data 1.

Table 1 -.

Optical components for AO-TPLSM

Item Part Number Description Vender Qty
Lens 4-f scanner AC508–150-B f = 150.0 mm, ∅2" Achromatic Doublet, ARC: 650 – 1050 nm Thorlabs 4
Scan lens AC508–150-B f = 150.0 mm, ∅2" Achromatic Doublet, ARC: 650 – 1050 nm Thorlabs 2
LB1199-B N-BK7 Bi-Convex Lens, ∅2", f = 200.0 mm, ARC: 650–1050 nm Thorlabs 1
KPC070AR.16 Plano-Concave Lens, N-BK7, 50.8 mm Diameter, -200 mm EFL, 650–1000 nm Newport 1
Tube Lens ACT508–500-B f = 500.0 mm, ∅2" Achromatic Doublet, ARC: 650 – 1050 nm Thorlabs 1
Fluorescent Collection A240-A f = 8.00 mm, NA = 0.5, Unmounted Rochester Aspheric Lens, AR: 350 – 700 nm Thorlabs 3
LA1765-A N-BK7 Plano-Convex Lens, 030.0 mm, f = 75.0 mm, AR Coating: 350 – 700 nm Thorlabs 1
LA1805-A N-BK7 Plano-Convex Lens, ∅1", f = 30.0 mm, AR Coating: 350 – 700 nm Thorlabs 2
LA1027-A N-BK7 Plano-Convex Lens, ∅1", f = 35.0 mm, AR Coating: 350 – 700 nm Thorlabs 1
Beam Expander LA1805-B N-BK7 Plano-Convex Lens, ∅1", f = 30 mm, AR Coating: 650 – 1050 nm Thorlabs 1
LA1484-B N-BK7 Plano-Convex Lens, ∅1", f = 300 mm, AR Coating: 650 – 1050 nm Thorlabs 1
Beam Compressor KPX117AR.18 Plano-Convex Lens, N-BK7, 25.4 mm Diameter, 450 mm EFL, 1000–1550 nm Newport 1
KPX100AR.18 Plano-Convex Lens, N-BK7, 25.4 mm Diameter, 150 mm EFL, 1000–1550 nm Newport 1
Beam Expander For WFS AC254–125-A f = 125 mm, ∅1" Achromatic Doublet, ARC: 400 – 700 nm Thorlabs 1
AC254–200-A f = 200 mm, ∅1" Achromatic Doublet, ARC: 400 – 700 nm Thorlabs 1
Objective XLPLN25XSVMP2 Multiphoton Excitation Objectives Olympus 1
Microlens Array #64–483 Microlens Array 10 x 10mm, 500μm Pitch, 0.25° Divergence Edmund 1
Elliptical Mirror PFE20-P01 2" Protected Silver Elliptical Mirror, 450 nm - 20 μm Thorlabs 1
Reflecting Mirror PF10–03-P01–10 ∅1" Protected Silver Mirror, 10 Pack Thorlabs 2
Beamspliter for WFS FF775-Di01–25×36 775 nm edge BrightLine® multiphoton single-edge dichroic beamsplitter Semrock 1
Fluorescent Collection FF775-Di01–25×36 775 nm edge BrightLine® multiphoton single-edge dichroic beamsplitter Semrock 1
FF665-Di02–35×37-EB 665 nm edge BrightLine® multiphoton single-edge dichroic beamsplitter Semrock 1
FF552-Di02–25×36 552 nm edge BrightLine® single-edge standard epi-fluorescence dichroic beamsplitter Semrock 1
FF662-FDi01 –25×36 662 nm edge BrightLine® single-edge image-splitting dichroic beamsplitter Semrock 1
Filter Fluorescent Collection FF01–530/55–25 530/55 nm BrightLine® single-band bandpass filter Semrock 1
FF01–593/46–25 593/46 nm BrightLine® single-band bandpass filter Semrock 1
FF01–708/75–25 708/75 nm BrightLine® single-band bandpass filter Semrock 1
FF01–790/SP-25 790 nm blocking edge BrightLine® multiphoton short-pass emission filter Semrock 3
for WFS FF01–790/SP-25 790 nm blocking edge BrightLine® multiphoton short-pass emission filter Semrock 1

Table 3 -.

Opto-mechanics for AO-TPLSM

Item Part Number Description Vender Qty
Optical Post SP-2 Optical Post, 2.0 in. Height, 0.5 in. Diameter, 8–32 and 1/4–20 Thread Newport 1
Kinematic Cage Cube Platform B4C Kinematic Cage Cube Platform for C4W/C6W Thorlabs 1
Base Adapter BE1-P5 ∅1.25" Studded Pedestal Base Adapter, 1/4"-20 Thread, 5 Pack Thorlabs 3
Cage Cube C4W 30 mm Cage Cube Thorlabs 1
Clamping Fork CF125C-P5 Clamping Fork, 1.24" Counterbored Slot, 1/4"-20 Captive Screw, 5 Pack Thorlabs 3
Pedestal Post Table Clamp CL8 ∅1" and ∅1.5" Pedestal Post Table Clamp Thorlabs 4
Cage Plate CP08 SMI-Threaded 30 mm Cage Plate with Flexure Clamping, 1 Retaining Ring, 8–32 Tap Thorlabs 5
Cage System Iris CP20S 30 mm Cage System Iris Diaphragm (∅0.8 – ∅20 mm) Thorlabs 5
Cage Plate CP33 SM1-Threaded 30 mm Cage Plate, 0.50" Thick, 2 Retaining Rings, 8–32 Tap Thorlabs 8
Cage Plate CPTS10 Cage Plate to ∅1/2" Post Adapter, 10 mm Post Offset, Imperial Thumbscrew Thorlabs 1
Mounting Plate CPVMP Vertical Cage System Mounting Plate for 30 mm and 60 mm Cage Systems Thorlabs 3
Cage Rotation CRM1T Cage Rotation Mount for ∅1" Optics, SM1 Threaded, 8–32 Tap Thorlabs 1
Lens Mount CXY1 30 mm Cage System, XY Translating Lens Mount for ∅1" Optics Thorlabs 1
Translating Lens Mount CXY2 60 mm Cage System Translating Lens Mount for ∅2" Optics Thorlabs 4
Drop-In 30 mm Cage Mount DCP1 Drop-In 30 mm Cage Mount, Flexure Lock, SM1 Threaded, 0.40" Thick, 2 Retaining Rings Thorlabs 1
Cage Assembly Rod ER05-P4 Cage Assembly Rod, 1/2" Long, ∅6 mm, 4 Pack Thorlabs 1
Cage Assembly Rod ER1-P4 Cage Assembly Rod, 1" Long, ∅6 mm, 4 Pack Thorlabs 4
Cage Assembly Rod ER2-P4 Cage Assembly Rod, 2" Long, ∅6 mm, 4 Pack Thorlabs 6
Cage Assembly Rod ER3-P4 Cage Assembly Rod, 3" Long, ∅6 mm, 4 Pack Thorlabs 1
Cage Assembly Rod ER4-P4 Cage Assembly Rod, 4" Long, ∅6 mm, 4 Pack Thorlabs 1
Cage Assembly Rod ER6-P4 Cage Assembly Rod, 6" Long, ∅6 mm, 4 Pack Thorlabs 4
Cage Assembly Rod ER10 Cage Assembly Rod, 10" Long, ∅6 mm Thorlabs 12
Cage Assembly Rod ER12 Cage Assembly Rod, 12" Long, ∅6 mm Thorlabs 4
Cage Assembly Rod ER18 Cage Assembly Rod, 18" Long, ∅6 mm Thorlabs 8
Rectangular Filter Mount FFM1 30-mm-Cage-Compatible Rectangular Filter Mount Thorlabs 1
Large Goniometer GNL18 Large Goniometer, 1.75" Distance to Point of Rotation, ±5° Thorlabs 1
45° Mirror Mount H45 45° Mirror Mount for ∅1" Optics Thorlabs 1
Kinematic Mirror Mount KCB1C Right-Angle Kinematic Mirror Mount with Smooth Cage Rod Bores, 30 mm Cage System and SM1 Compatible, 8–32 and 1/4"-20 Mounting Holes Thorlabs 6
Kinematic Elliptical Mirror Mount KCB2EC Right-Angle Kinematic Elliptical Mirror Mount with Smooth Cage Rod Bores, 60 mm Cage System and SM2 Compatible, 8–32 and 1/4"-20 Mounting Holes Thorlabs 1
Kinematic Mirror Mount KM100 Kinematic Mirror Mount for ∅1" Optics Thorlabs 6
Compact Kinematic Mirror Mount KMS Compact Kinematic Mirror Mount, 8–32 Taps for Post Mounting Thorlabs 1
Light-Tight Blank Cover Plate LB1C Light-Tight Blank Cover Plate for 60 mm Cage Cube, 1/4"-20 Tap Thorlabs 2
Cage Cube LC6W 60 mm Cage Cube Thorlabs 2
Mounting Bracket LCP01B 60 mm Cage Mounting Bracket Thorlabs 3
30 mm to 60 mm Cage Plate Adapter LCP33 30 mm to 60 mm Cage Plate Adapter, 8–32 Tap Thorlabs 2
XY Adapter Plate LNR50P3 XY Adapter Plate for LNR50 TravelMax Stages, Imperial Hole Spacings Thorlabs 2
Aluminum Breadboard MB1218 Aluminum Breadboard 12" × 18" × 1/2", 1/4"-20 Taps Thorlabs 1
Aluminum Breadboard MB612F Aluminum Breadboard, 6" × 12" × 1/2", 1/4"-20 Taps Thorlabs 1
Mirror Holder MH25 Mirror Holder for ∅1" Optics 2.5 – 6.1 mm Thick Thorlabs 1
Aluminum Breadboard MSB46 4" × 6" × 3/8" Mini-Series Aluminum Breadboard, 8–32 and 1/4"-20 High-Density Taps Thorlabs 1
UltraLight Breadboard PBG3048F UltraLight Breadboard, 30" × 48" × 0.98", 1/4"-20 Taps Thorlabs 1
Post Holder PH1.5 ∅1/2" Post Holder, Spring-Loaded Hex-Locking Thumbscrew, L = 1.5" Thorlabs 2
Post Holder PH2-P5 ∅1/2" Post Holder, Spring-Loaded Hex-Locking Thumbscrew, L = 2", 5 Pack Thorlabs 1
Post Holder PH3-P5 ∅1/2" Post Holder, Spring-Loaded Hex-Locking Thumbscrew, L = 3", 5 Pack Thorlabs 2
Post Holder PH4-P5 ∅1/2" Post Holder, Spring-Loaded Hex-Locking Thumbscrew, L = 4", 5 Pack Thorlabs 1
High-Precision Rotation Mount PR01 High-Precision Rotation Stage, 1/4"-20 and 6–32 Taps Thorlabs 1
Translation Stage with Standard Micrometer PT1 1" Translation Stage with Standard Micrometer, 1/4"-20 Taps Thorlabs 1
Post collar R2T Thin Slip-On Post Collar for ∅1/2" Posts, 5 Pack Thorlabs 2
Right-Angle End Clamp RA180 Right-Angle End Clamp for ∅1/2" Posts, 1/4"-20 Stud and 3/16" Hex Thorlabs 1
Adaptor SM1A39 Adapter with External C-Mount Threads and External SM1 Threads Thorlabs 1
Lens Tube SM1L03 SM1 Lens Tube, 0.30" Thread Depth, One Retaining Ring Included Thorlabs 5
End Cap SM2CP2 Externally SM2-Threaded End Cap Thorlabs 4
Lens Tube SM2L15 SM2 Lens Tube, 1.5" Thread Depth, One Retaining Ring Included Thorlabs 3
Lens Tube SM2L20 SM2 Lens Tube, 2" Thread Depth, One Retaining Ring Included Thorlabs 1
Retaining Ring SM2RRC Extra-Thick SM2 (2.035"-40) Threaded Retaining Ring Thorlabs 1
Large-Area Translation Stage TBB1212 Large-Area Translation Stage, 12" × 13.66" Thorlabs 1
Optical Post TR1.5 ∅1/2" Optical Post, SS, 8–32 Setscrew, 1/4"-20 Tap, L = 1.5" Thorlabs 1
Optical Post TR2-P5 ∅1/2" Optical Post, SS, 8–32 Setscrew, 1/4"-20 Tap, L = 2", 5 Pack Thorlabs 1
Optical Post TR3-P5 ∅1/2" Optical Post, SS, 8–32 Setscrew, 1/4"-20 Tap, L = 3", 5 Pack Thorlabs 2
Optical Post TR4 ∅1/2" Optical Post, SS, 8–32 Setscrew, 1/4"-20 Tap, L = 4" Thorlabs 2
Optical Post TR10 ∅1/2" Optical Post, SS, 8–32 Setscrew, 1/4"-20 Tap, L = 10" Thorlabs 3
Universal Base Plate UBP2 Universal Base Plate, 2.5" × 2.5" × 3/8" Thorlabs 2
Extended Dovetail Baseplate XR25DR2 Extended Dovetail Baseplate for Stages with 3" Wide Dovetails, 150 mm Thorlabs 1
Translation Stage XR50P 50 mm Travel Linear Translation Stage, Side-Mounted Micrometer, 1/4"-20 Taps Thorlabs 1
Rail XT95–500 95 mm Construction Rail, Clear Anodized, L = 500 mm Thorlabs 5
Base Plate XT95P3 Base Plate for 95 mm Rails Thorlabs 9
Drop-On Rail Carriage XT95RC4 Drop-On Rail Carriage for 95 mm Rails, 4.00" Long, 1/4"-20 Tapped Holes Thorlabs 3
Rail XT95SD-250 95 mm One-Sided Construction Rail, Black Anodized, L = 250 mm Thorlabs 1
Mounting Plate G061008000 Mounting Plate Without Hole Digikey 7
Mounting Plate G061010000 Mounting Plate 25 Digikey 3
Mounting Plate G061042000 Mounting Plate 30 Digikey 9
Mounting Plate G061045000 Mounting Plate M35×0.5 Digikey 4
Mounting Plate G061047000 Mounting Plate 35 Digikey 1
Corner Connector G061110000 Corner Connector 40 Digikey 12
Corner Connector G061120000 Corner Connector 80 Digikey 6
Rods G061207000 Rod 20 mm Digikey 12
Adjustable Prism Insert G063731000 Adjustable Prism Insert 30 Digikey 4
Retaining Rings G065078000 Retaining Rings 1", 2 ea. Digikey 5

Table 4 -.

Custom opto-mechanics for AO-TPLSM

No. Part Name Qty Original Part ote
1 main breadboard 1 Thorlabs, PBG3048F
2 z-motor adaptor 1 from scratch
3 XY stage breadboard 1 Thorlabs, MB1218
4 Galvo mounting plate 1 from scratch Need 1 for the galvo-resonant scanner system; Need 2 for a galvo-galvo scanning system
5 Galvo holder (6-mm 8135K X-galvo) 1 from scratch Let the machinist know that Part5/Part5 backup must be able to fit into Part4
5 - backup (Optional) Galvo holder (6-mm 8135K Y-galvo) 1 from scratch Need it for the galvo-galvo system, but not galvo-resonant scanner system
6 resonant scanner mounting plate 1 from scratch The information about the SM1 threads can be found here: https://www.thorlabs.com/newgrouppage9.cfm?objectgroup_id=1524
7 resonant scanner holder 1 from scratch Let the machinist know that the resonant scanner must be able to fit into Part No. 7
8 extra-thick retaining ring 1 Thorlabs, SM2RRC
9 vertical mounting plate 1 Thorlabs, CPVMP
10 ER11.23 4 Thorlabs, ER12
11 objective mounting plate 1 LINOS Microbench, G061008000
12 MPPC Cover 3 Hamamatsu, C13366–3050GA Take the cover off from the MPPC body
13 MPPC mounting plate 3 LINOS Microbench, G061010001
14 dichroic mount (short) 2 from scratch
15 dichroic mount (long) 2 from scratch
16 adjustable prism insert 4 LINOS Microbench, G063731000
17 L11 mounting plate 1 LINOS Microbench, G061042000
18 retaining ring (L12, L13, L14) 3 LINOS Microbench, G065078000
19 mounting plate (D1) 1 LINOS Microbench, G061042000
20 deformable mirror adaptor 1 from scratch
21 deformable mirror breadboard 1 Thorlabs, MB612F
22 EMCCD breadboard 1 Thorlabs, MSB46
23 lens array adaptor 1 from scratch Round corner for the square center counterbore
24 deformable mirror conjugation tool 1 from scratch

Figure 5 |. Overview of the procedure.

Figure 5 |

Flowchart illustrating the essential steps for constructing, aligning, and calibrating the AO-TPLSM as well as showing the main steps for conducting an imaging experiment with AO-TPLSM.

System Design

Like a conventional TPLSM, AO-TPLSM contains an excitation path to focus the excitation beam on the preparation, and a collection path that couples the light emitted at the focus to the photon-detectors, i.e., multi-pixel photon counters (MPPCs) or photomultiplier tubes. A pair of the scanners that are conjugating to the rear pupil plane of the objective in the excitation path scans the focus across the preparation during the acquisition of an image. An image frame is constructed from the intensity signal as a function of the scanner angles.

Image quality, including the spatial resolution and signal-to-background ratio, is largely determined by the quality of the focus, and is characterized by the point-spread-function (PSF). The goal of AO-TPLSM is to compensate for the aberrated wavefront of the excitation beam to achieve a non-distorted PSF (Figure 1c). The shape of the aberrated wavefront, W, can be expressed as a sum of Zernike modes, the polynomials labeled Znm with azimuthal frequency m and radial order n, weighted by coefficients anm, where

W=n=0m=nnanmZnm

In our implementation of AO-TPLSM, we integrate a deformable mirror (DM) to the excitation path, whose reflective surface is a membrane that can be deformed to closely approximate a sum of Zernike modes Znm, each with magnitude anm, by a group of actuators. This changes the optical path length and thus introduces a known, corrective distortion to the wavefront. To fully utilize the surface of the DM, the excitation beam is expanded to fill the aperture of the DM using a pair of lenses (L1 and L2) between the laser and the DM. The pattern on the DM is imaged to the rear pupil plane of the objective, i.e., the two planes are conjugate (Figure 6b). This is achieved by a second pair of lenses (L3 and L4) between the DM and the Y-scanner, that form a four-times focal length (4-f) relay to conjugate the DM with the Y-scanner and demagnify the image of the DM; the X- and Y-scanners are conjugated to each other and to the pupil plane, as in conventional TPLSM.

Figure 6 |. Concepts of collimation and conjugation.

Figure 6 |

a, Diagram demonstrating that the divergence of the beam passing through a telescope can be controlled by adjusting the distance between the lens pair. b, Diagram illustrating the concepts of conjugation. The conjugate of a given plane P0 is defined as the plane Pc where the points on P0 are imaged. Upper panel shows a 4-f system that the front focal plane of the first lens and the back focal plane of the second lens are conjugate to each other. Middle and lower panel shows that adjusting the distance between the lenses of a telescope does not change the conjugation of the two focal planes. We applied this feature to the design the of relay between the DM and the scanner to orthogonalize the collimation and conjugation.

To determine the desired wavefront for the DM, the wavefront of the descanned guide star signal representing the aberration is measured by direct wavefront sensing (Figure 1d). This is achieved by a Shack-Hartmann wavefront sensor (SHWS), consisting of a microlens array and an electron multiplying charge-coupled device (EMCCD) that is located at the focal plane of the microlens array. The local tilt of the aberrated wavefront, segmented by the microlens array, will deflect focused spots on the EMCCD away from their center (Figure 2a,b) and the angles of the deflections are used to estimate the wavefront from the guide star signal. To separate the guide star light from the excitation beam, a dichroic mirror (D4) is employed to reflect the guide star light to the wavefront sensing path. The SHWS also needs to be conjugated to the rear pupil of the objective, like the case for the DM, and another 4-f set of relay lenses (L9 and L10) is introduced to conjugate the microlens array with the Y-scanner.

Figure 2 |. Concepts of Shark-Hartmann wavefront sensing.

Figure 2 |

a, Diagram showing that the aberrated wavefront is split into segments by the lens array and focus on the EMCCD respectively. b, Diagram demonstrating that the wavefront can be estimated by calculating the slope of each segment based on the deflection of the focal spot. Δy, the distance of the deflected spot from the central axis of the microlens; f, the focal length of a microlens.

Critical task.

All told, it is essential to conjugate the X-scanner, Y- scanner, DM, and SHWS to the rear pupil of the objective for successful aberration correction (Procedure II, Figures 79). Conjugating these components is not trivial since corrections to the position of one component may break the conjugation between other components. To minimize this difficulty, our system is designed to orthogonalize the conjugation procedure from alignment. For example, the DM is mounted on a translational stage (TS1) with a pair of mirrors (M6 and M7) so that sliding TS1 along the optical axis minimally affects the overall alignment of the excitation beam. A mirror pair on the TS3 stage are introduced to adjust the optical path between the L3 and L4 lenses so that the collimation of the excitation beam can be adjusted without affecting the conjugation (Figure 6). The critical dimensions for conjugation, noted in the assembly drawing, should be carefully followed. Further, we optimized the assembly sequence so that conjugation at the final steps does not affect conjugation of components early in the assembly process.

Figure 7 |. Conjugating the pupil plane with the scanners.

Figure 7 |

a, Diagram for finding the objective pupil plane that conjugates to the scanners. b, Real item image of the iris at the pupil plane taken through the IR viewer. The beam passing through the iris center (arrow) shows that the excitation beam is well-aligned to the back aperture of the objective. While the scanner is on, little movement of the bright ring should be observed if the iris is conjugate to the scanners.

Figure 9 |. Conjugating SHWS to the pupil plane.

Figure 9 |

a, Schematics showing the setup for finding the plane in the wavefront sensing path that conjugates to the pupil. The laser shutter was closed in this step. Another light source (e.g., flashlight) is needed to illuminate the paper target at the pupil plane. b, Sharp image of the target, indicating that the EMCCD sensor is conjugated to the pupil plane.

Operational Logic

Besides aberrations that are caused by brain tissue, the imaging system per se aberrates the excitation beam because of imperfections in the optics, misalignments in the microscope, and the aberrations induced by the cover glass of the cranial window. These are referred to as system aberrations. To achieve the best image quality, as well as to maximize the imaging depth, both sample aberrations and system aberrations need to be corrected.

For the system aberration, an indirect wavefront sensing method is applied to search for the best pattern on the DM that recovers the PSF in the aberration-free sample (Procedure IIIb). The pattern on the DM can be considered as a sum of individual Zernike modes. We utilized a gradient-descent algorithm (Supplementary Software) to optimize the coefficient for each Zernike mode by maximizing the emission intensity of a fluorescent solution, under a cover glass16 (Figure 12). The procedure starts with a flat pattern displayed on the DM. In each iteration, images are obtained with an individual Zernike mode added to or subtract from the DM pattern that was obtained from prior iterations. The intensity gradient with respect to each Zernike coefficient is determined as the difference between the average intensity of the images taken with the corresponding Zernike mode added versus subtracted. At the end of each iteration, all Zernike coefficients are updated based on the result of the gradient-descent algorithm. After several rounds of iteration, the coefficients of all Zernike modes are found to stabilize at asymptotic values (Figure 13). This leads to a diffraction-limited PSF in the aberration-free sample (Figure 14).

Figure 12 |. Configuration for System aberration calibration.

Figure 12 |

a, Schematics illustrating the configuration for system aberration calibration. b, Flowchart of the system aberration calibration procedure. It corresponds to the MATLAB codes “sensorlessWF_sys_abr_descend.m”.

Figure 13 |. Results for system aberration calibration.

Figure 13 |

Representative outcomes of system aberration calibration for the excitation beam in 930 nm (upper row), 1030 nm (middle row), and 1250 nm (bottom row). Left column, showing the changes of Zernike coefficients as a function of optimization cycles. Middle column, Zernike coefficients after 50 optimization cycles. Right column, wavefront phase map on the DM that compensates for the system aberration.

Figure 14 |. Point spread function after system aberration correction.

Figure 14 |

Point spread function measured from a 200-nm diameter fluorescent bead after the correcting the system aberration. Scale bar, 1 μm. Upper row, image of the X-Y plane with the signal profile showing the lateral resolution. Bottom row, image of the X-Z plane with the signal profile, showing the axial resolution.

To determine the wavefront pattern, or phase map, for correcting the sample aberration, we apply the direct wavefront sensing method and measure the wavefront of the descanned guide star with the SHWS. Conceptually, the guide star refers to an ideal point source of light in the sample whose wavefront will be aberrated as it propagates through the tissue to the rear pupil (Figure 1d). On basis of the reversibility of optical wave propagation, applying the same aberrated wavefront at the pupil generates a diffraction-limited focus in the tissue (Figure 1c). In practice, as a two-photon excited fluorescence naturally produces a confined light source, we used the emitted light of two-photon excited cyanine 5.5-conjugated 2000kDa dextran (Cy5.5–dextran) in the brain microvessels as the guide star16,22. Cy5.5–dextran is a red-shifted dye that is bright, inexpensive to produce (Procedure IV), apparently nontoxic, and readily delivered to the vessels by either retro-orbital injection23 or tail vein injection. Unlike directly injecting a dye into a region of the brain14, vascular circulation constantly replenishes the guide star and makes it compatible with transcranial windows24 as well as “open” cranial windows25 for chronic imaging.

With the system aberration correction complete, we take a calibration pattern of the deflection of spots on the SHWS (Figure 10c). This serves as a reference that must be matched during the direct sensing waveform correction. In particular, the calibration pattern could have slightly off-center spots since the descanning pathway will introduce aberration (Figure 3b).

Figure 10 |. AO Calibration preparation.

Figure 10 |

a to f, Images obtained on the EMCCD before the AO Calibration. Left column, diagram showing the light source for the EMCCD images. a to c was taken with the Cy5.5 fluorescence, d to f used the femtosecond laser beam reflected by a mirror at the pupil plane. Upper row, diagram showing the position of the EMCCD along the optical axis. a and d were taken by the EMCCD at the conjugate plane (P1). c and f were taken by the SHWS of which the microlens array is at the conjugate plane (P2). b and e were taken with EMCCD at the same position as c and f (P2) but no microlens array was placed on the light path. The edge of bright disk in a was indicated by a red circle in image a, b, d, and e, showing that the bright disks in the four images are concentric. g, Merge of c and f. It is critical to the AO calibration that a, b, d, and e are concentric, and that c and f are overlapped.

To compute the DM pattern based on the SHWS images from the guide star, it is critical to establish the relation between the DM pattern, in terms of its Zernike modes, to the SHWS, in term of the deflection of the spots from each microlens in the array. This is achieved by AO calibration (Procedure IIIa, Figure 11), in which we place a mirror at the pupil level to map the DM to the SHWS and record the corresponding pattern of the deflected spots on SHWS when each of the individual Zernike modes is displayed by the DM.

Figure 11 |. AO Calibration.

Figure 11 |

a, Schematics illustrating the AO calibration. b, Flowchart of the AO calibration procedure. It corresponds to the MATLAB codes “DM_SHWS_calibration_Ctr.m” and “DM_SHWS_calibration.m”.

Critical.

We encourage the user to calibrate the system regularly, e.g., twice a year for the best performance, including the AO calibration (Procedure IIIa) and system aberration calibration (Procedure IIIb). We also recommend that the user verify the imaging system by correcting the aberration for a fiber test sample after the calibration; this will ensure that the system operates properly (Procedure IIIc).

The sample aberration, as it varies regions by region, should be corrected for every field of view during experiment (Procedure V). The region in which a single correction achieves substantial improvement in image quality is defined as the isoplanatic patch. The isoplanatic patch size of the mouse brain is at most hundreds of micrometers14,16,2628. In practice, to achieve the best imaging quality, we recommend that the user perform sample aberration correction for each 100 μm × 100 μm, or even 50 μm × 50 μm, field of view and apply the resulting pattern within an axial range of ±50 μm.

Applications

With the capability of correcting the aberration of a given sample, AO-TPLSM could be widely applied to improve the image resolution and signal-to-noise ratio (SNR) during in vivo imaging. We previously demonstrated near-diffraction-limited images using direct wavefront sensing from descanned guide stars formed in labeled brain microvessels in awake behaving mice. We resolved soma and fine structures, such as dendrites and individual synaptic spines, up to 850 μm below the pia16. Together with the expression of genetically encoded sensors, this approach has been used in the study of cortical deep layers, including the recording of the calcium transients in spines of layer 5b basal dendrites16 and imaging the glutamate signal from presynaptic boutons and postsynaptic spines during tactile sensing7. Besides recording in neocortex, AO-TPLSM has been employed to correct the optical aberrations of the mouse eye for noninvasive retinal imaging at subcellular resolution29.

Endoscopic GRIN lenses extend the optical access to regions that are deep below the pial surface in the brain12,30,31. However, the intrinsic aberrations of the GRIN lens cause the imaging resolution to decay dramatically radially and axially and results in a small field of view and narrow depth of field. AO-TPLSM with direct wavefront sensing can also counteract the intrinsic aberration of the GRIN lens by treating it as sample aberration with 30 μm × 30 μm isoplanatic patches32.

In addition to the improvement of imaging quality, the DM in the AO-TPLSM also serves as a convenient tool to manipulate the focus spot of the microscope. For example, the third Zernike mode of the DM, i.e., defocus, corresponding to Noll Index 4, moves the focus along the optical axis without introducing extra aberration. With the fast settle time of the DM (~ 0.5 ms), defocus can be used for multiplane imaging. The first two Zernike modes of the DM, i.e., tip, and tilt corresponding to Noll indices 2 and 3, moves the focus along the X and Y axes, respectfully, and may be potentially used for online motion correction.

Alternative methods

The essential task for adaptive optics is the measurement of aberration to determine the phase map and program the DM to compensate for the optical aberration(s) (Figure 1c,d). Besides the direct wavefront sensing method that we describe in detail, indirect sensing methods have also been widely implemented in TPLSM19,26 and even three-photon microscopy20,21. Instead of using a guide star signal, the indirect methods infer the desired wavefront from the acquired images. Since the aberrated wavefront usually leads to a degraded image, one can find the desired wavefront by tuning it based on certain metrics of the image. Indirect methods are easier to implement, as they do not have the wavefront sensing light path and no guide star needs to be formed and measured, albeit they require more time than sensor-based direct methods as they utilize a collection of many images across multiple iterations. The bottom line, however, is that the direct method we introduce has better SNR and greater imaging depth than all of the indirect methods that have been implemented in TPLSM16.

Limitations

Limited by the scattering of the tissue, the maximum image depth of AO-TPLSM is about ~ 900 μm under the pia, where the guide star pattern on the EMCCD degrades severely. The emission of Cy5.5 peaks at 703 nm; therefore, a guide star with a longer emission wavelength is desired for improved deep wavefront sensing. Guide stars with longer emission wavelength also better represent the aberration of the excitation beam, which ranges from 800 nm to 1300 nm.

Reducing the expansion ratio of the descanned guide star can potentially increase the SNR of the image on the EMCCD by concentrating the light intensity on the microlens array. However, this will reduce the number of the focus spots for wavefront sensing and diminish the precision of the wavefront estimation.

We designed an entire AO-TPLSM system from scratch rather than modify an existing plan or commercial TPLSM system. This ensures ease of flexibility. We note that the bulk of the cost for the AO-TPLSM system are the AO components and a tunable 100-femtosecond laser.

Expertise needed to implement the protocol

We designed the AO-TPLSM and detailed the construction steps to make it easy for laboratories with limited previous imaging expertise to setup, maintain, and use the AO-TPLSM. Despite this, basic knowledge in optics, electronics, and programming is required for the primary user, who is responsive for assembling, aligning, and calibrating the system. Prior experience in constructing imaging systems can facilitate the project but is not required. The users that are involved in the in vivo imaging experiment should have the ability to perform the craniotomy or thin-skull surgery and operate basic imaging software.

MATERIALS

Hardware

  • Optical table (at least 4’ by 6’ in extent)

  • Tunable femtosecond laser (e.g., Coherent, Chameleon Discovery)

Critical: The wavelength of the laser must encompass 1250 nm, at least 1200 nm, with reasonable output power, i.e., at least 1000 mW, for wavefront sensing with Cy5.5. The imaging depth that can be achieved by AO-TPLSM is largely determined by the maximum depth of wavefront sensing, which is constrained by the laser power. The power efficiency of the AO-TPLSM at 1250 nm is about 10 – 15 % (power measured at the laser relative to power measured at the objective output. Previous studies reported that no photodamage was observed when using average incident laser powers of approximately 250 mW for in vivo imaging33,34. Therefore, ~2000 mW of laser output at 1250 nm should be ideal to generate 200 to 300 mW of excitation beam power for wavefront sensing without photodamaging.

  • Optical components including the microlens array (Edmund, #64–483) are listed in Table 1.

  • Optical electronics and opto-electronics including the DM (ALPAO, DM97–15) and EMCCD (Andor, DU-888U3-CS0-BV) are listed in Table 2.

Table 2 -.

Electronics and opto-electronics for AO-TPLSM

Item Description Vender Part Number Qty
EMCCD For SHWS Andor DU-888U3-CS0-BV 1
Deformable Mirror DM97–15; High speed DM option; Trigger option Alpao DM97–15 1
Translation Stage 50 mm (1.97") TravelMax Translation Stage, 1/4"-20 Taps Thorlabs LNR502 3
Translation Stage Controller Three-Channel Controller and Knob Box for 2" Stages with Stepper Motor Thorlabs MCM3003 1
Resonant scanner 5mm, 8kHz, 26 OPT degree, silver Cambridge Technology CRS8K 1
Galvo scanner 6mm,40 OPT DEG, sliver Cambridge Technology 8315K 1
E-O Modulator (Optional) Pockel cell for excitation laser power control ConOptics 350–105-02 1
E-O Modulator driver ConOptics 302RM 1
MPPC Optical measurement modules for low-level-light detection, Analog output Hamamatsu C13366–3050GA 3
MPPC Amplifier 350 MHz preamplifier Stanford research system SR445A 2
Laser Shutter LS6 6mm Laser Shutter Vincent Associates LS6 1
Laser Shutter driver VCM-D1 Shutter Driver Vincent Associates VCM-D1 1
PXIe-1073 PXI Chassis National Instruments 781163–01 1
NI PCIe-8361: 1 Port MXI-Express Interface National Instruments 779504–01 1
MXI-Express Cable National Instruments 779500–03 1
PXIe-7961 PXI FPGA Module for FlexRIO National Instruments 781205–01 1
NI-5734 Digitizer Adapter Module for FlexRIO National Instruments 781659–04 1
PXIe-6341 PXI Multifunction I/O Module National Instruments 781052–01 2
Terminal Block, Model: BNC-2090A National Instruments 779556–01 2
SHC68–68-EPM Shielded Cable, 68-D-Type to 68 VHDCI, Offset, 2 m National Instruments 192061–02 2

Critical: The trigger-option of the deformable mirror controller is required for synchronization between the DM and the ScanImage. We use the High-speed option of the DM97–15 in our implementation, which has quick settling time but less stroke (dynamic range) as the trade-off. The High-stability option should be more suitable for general users.

  • Commercial opto-mechanics are listed in Table 3.

The price and link for the commercial parts in Table 13 are provided in Supplementary Table 1.

  • Custom opto-mechanics for AO-TPLSM are listed in Table 4. The computer aided design models and ancillary drawings for the customized parts are shared in Supplementary Data 2.

  • Computer

Critical: The computer should have an extra PCI-e slot, x1 or more, for the deformable mirror controller, besides meeting the requirement for the ScanImage PXI-based system (https://archive.scanimage.org/SI2019/Supported-Microscope-Hardware_28377190.html#SupportedMicroscopeHardware-ComputerHardware).

Software

  • MATLAB (Version 2017b)

  • NI DAQmx (Version 19.5.x)

  • ScanImage (Version 2018b)

  • ALPAO SDK (Version 3.08.08)

  • Andor SOLIS

  • Customized AO-TPLSM software (Supplementary Software)

Chemicals

These are used as 0.2 to 0.5 % (w/v) aqueous fluorescent solutions captured between a glass slide and a #1 cover slip.

The fluorescent beads are used for measuring the point spread function.

These are used to conjugate cyanine 5.5 to 2000 kDa dextran as the in vivo fluorescent agent to form the guide star.

Biologicals

PROCEDURE

I. Assembly of the AO two photon microscope with direct wavefront sensing

Timing. 5 to 10 days.

This section describes the assembly of the microscope (Steps 1 to 22), as shown in Figure 4. Steps 1 to 16 describe the procedure to build a conventional two-photon microscope with a 4-f scanning system. Steps 17 to 19 and 20 and 21 emphasize the assembly for the DM module and SHWS module, respectively. Step 22 describes the wiring for the electronics. All the assembly drawings referenced in the instructions are provided in Supplementary Data 1. The system should be assembled in the order shown in the assembly drawings, denoted “AD”, and in Figure 3a.

  • 1

    Mount the customized main breadboard (Thorlabs, PBG3048F, part drawing PD-01) onto the optical table (e.g., Newport, RS2000–56-12, 5’ by 6’ in extent), via four attached rails (Thorlabs, XT95–500 and XT95P3). Mount the center rail (Thorlabs, XT95–500 and XT95P3) vertically on the optical table as shown in assembly drawing AD-01.

  • 2

    Assemble the Z-motor unit (AD-02) and XY-sample stage (AD-03). Mount these components on the center rail and the optical table respectively, as shown in AD-04.

  • 3

    Assemble the lens pair L5 and L6, both of which consist of two achromatic doublets (Thorlabs, AC508–150-B), as shown in AD-05.

  • 4

    Insert the galvo scanner (Cambridge Technology, 6-mm 8315K X-galvo) and the resonant scanner (Cambridge Technology, CRS 8 kHz) into their holders (PD-05 and PD-07, respectively), as shown in AD-06 and AD-07. If a galvo-galvo scanning system is used instead of the resonant scanner, use the alternate holder (PD-05-backup) for the Y-galvo (Cambridge Technology, 6-mm 8315K Y-galvo).

  • 5

    Mount the lens pair L5 and L6, as well as the scanners, on the 4-f scanner module. Adjust the distance among each component as shown in AD-08.

  • 6

    Assemble the scan lens L7 (Newport, KPC070AR.16; Thorlabs, LB1199-B, and two of AC508–150-B; AD-09) and the tube lens L8 (Thorlabs, two of ACT508–500-B; AD-10). Mount theses assemblies on the scan module, as shown in AD-11.

  • 7

    Mount the scanning module on the main breadboard, aligning the cutout hole on the custom vertical mounting plate (Thorlabs, CPVMP, PD-09) with the cutout hole on the main breadboard. Attach a mirror (M11, Thorlabs, PF10–03-P01) to the scanning module as the entrance for the excitation beam, as shown in AD-12.

  • 8

    Mount the microscope objective (Olympus, XLPLN25XSVMP2, X25, 1.0 NA, and 4-mm working distance) to the Z-motor via an objective mounting module (AD-13), as shown in AD-14.

  • 9

    Mount a 100-femtosecond pulsed laser with tunable wavelength, e.g., Coherent, Chameleon Discovery with a wavelength range of 680 to 1300 nm, on the optical table. The main output port is followed by a shutter (Uniblitz, Shutter: LS6; Driver: VCM-D1), as shown in AD-15. Reserve the space on the optical table between the laser and the main breadboard as shown in AD-15, for a potential Pockels cell power control unit, the excitation beam expander, and the periscope.

  • 10

    Depending on whether the laser has an internal laser power control, an external power control unit such as Pockels cell (ConOptics, Cell: 350–105-02; Driver: 302RM) may be required for modulation of the excitation power. Mount the Pockels cell on the optical table (ConOptics, Mount: 102A Adjustable Mount) and align with the laser output (AD-15).

  • 11

    Assemble a telescope, formed by a pair of plano-concave lenses (L1: Thorlabs, LA1805-B, AD-16; L2: Thorlabs, LA1484-B, AD-17), as shown in AD-18. This telescope is used to expand the laser beam to fill, or slightly overfill, the aperture of the deformable mirror (ALPAO, DM75–15, pupil diameter: 13.5 mm).

    Critical step. The beam size varies according to the specific model of laser. Thus, the user should choose the L1 and L2 lens pair according to:
    FocalLengthL2FocalLengthL1=BeamsizeoutBeamsizein
    where the Beamsizeout represents the diameter of collimated beam output from telescope, which should match the pupil size of the deformable mirror, and the Beamsizein represents the size of collimated beam input to the telescope, which could be approximated by diameter of the beam at the output of the power control. It is best to measure the beam diameter at the entrance of the beam expander with a beam profiler, e.g., Thorlabs, BP209IR1, and select the lens pair accordingly. For our specific realization, the beam is expanded ten-fold by lens pair L1 and L2, which are chosen to have 30- and 300-mm focal lengths, respectively.

    Trouble shooting. The expanded beam may be larger than expected. We assume the laser output is collimated in the previous discussion. However, as a Gaussian beam, the laser output naturally has a slight divergence. This is compensated by adjusting the distance between lenses L1 and L2 to achieve a collimated beam at the output of the beam expander (step 25). This procedure may slightly change the magnification of the telescope, which can likely be ignored since this application does not require a precise output beam size. Another consequence of the divergence is that Beamsizein is underestimated if it is taken as the same diameter as the laser output. The optical path from the laser output to the telescope should be minimized to reduce the effect.

  • 12

    Mount a pair of mirrors, M1 and M2 (Thorlabs, PF10–03-P01), on the optical table followed by the telescope, as shown in AD-15. The mirror pair will be used for telescope alignment.

  • 13

    Assemble the periscope, formed by a pair of mirrors, M3 and M4, as shown in AD-19. Mount M4 on the edge of the main breadboard (AD-15) and mount M3 on the optical table vertically aligned with M4.

  • 14
    Assemble the emitted photon detection unit with the following steps (AD-20).
    1. Attach a custom mounting plate (LINOS Microbench, G061010000, PD-13) to the modified the cover of MPPCs (three of Hamamatsu, C13366–3050GA, PD-12).
    2. Affix an aspheric lens (L15: Thorlabs, A240-A) to the center hole of the MPPC cover with glue (Momentive, RTV103).
    3. Insert the bandpass filter (Semrock, FF01–530/55–25 for the green/yellow channel, Semrock FF01–593/46–25 for the red channel, or Semrock FF01–708/75–25 for the far-red channel) followed by a short pass filter (Semrock, FF01–790-SP-25) into the MPPC mounting plate.
    4. Fix the position of the filters with set screws.

    Critical step. Keep some space between the aspheric lens and the filter, as shown in AD-20. Recall that the arrow on the edge of the bandpass filter indicates the direction for the light path. Block the unused thread hole with black RTV silicone cement (Momentive, RTV103) to prevent stray photons from leaking into the MPPCs.

  • 15

    Mount the dichroic filters to the customized dichroic mount (D1: Semrock, FF665-Di02–35×37-EB, AD-21; D1’: Semrock, FF775-Di01–25×36, AD-22; D2: Semrock, FF552-Di02–25×36, AD-23; D3: FF662-FDi01–25×36, AD-23). Face the reflective coating side towards the midline of the dichroic mount; information about how to orient the dichroic filter is found at https://www.semrock.com/technical-faq.aspx.

  • 16

    Assemble the acquisition module, consisting of lenses L11 (Thorlabs, LA1765-A, AD-24), L12 (Thorlabs, LA1027-A, AD-25), L13 and L14 (Thorlabs, LA1805-A, AD-26), as shown in AD-27. Mount the acquisition block to the Z-motor. Plug in the main dichroic (D1) and three MPPC modules, as shown in AD-28.

    Critical step. Fill the corners and small gaps between the plates with black RTV cement to prevent stray photons from leaking to the MPPCs.

  • 17

    Assemble the deformable mirror translation stages (TS1 and TS2) on the main breadboard. Mount the deformable mirror (ALPAO, DM97–15) as well as a pair of mirrors M6 and M7 on the stage, as shown in AD-29. Depending on the placement of the periscope, one extra mirror (M5) may be required to feed the excitation beam from the periscope to the deformable mirror module.

    Critical step. To minimize the alignment effort when moving the TS1 (step 38), mirrors M5 and M6 should be located such that the beam between M5 and M6 is near parallel to the direction of travel of TS1. Similarly, locate mirrors M6 and M7 such that the beam is parallel to the direction of travel of TS2. To avoid mirror M7 blocking the reflected light from deformable mirror, a small incident angle, i.e., < 5°, is introduced at the deformable mirror by adjusting the position of mirror M7 on the stage TS2 (Figure 3a; AD-29).

  • 18

    Mount lens L3 (Newport, KPX117AR.18, f = 450 mm, AD-31) on the main breadboard and attach L4 (Newport, KPX100AR.18, f = 150 mm, AD-32) to the 4-f scanner module (AD-33), as shown in AD-30. Lens pair L3 and L4 form a telescope that demagnifies the beam, three-fold, from the DM to fit the aperture of the scan mirrors.

  • 19

    Mount a mirror M8 followed by a translation stage (TS3) for the mirror pair M9 and M10 (Thorlabs, PF10–03-P01, AD-34) on the main breadboard. These are used for fine adjustment of the optical path between lenses L3 and L4, as shown in AD-30.

    Critical step. To minimize the alignment effort, the mirror pair M9 and M10 should be placed so that the beam between M10 on the TS3 and M11 in the scanning module is about parallel to the direction of travel of TS3. One means to achieve this is to temporarily link the M10 and M11 mirror mounts with long rods and locate the position for the M9 and M10 mirror pair before mounting them on the TS3. Similarly, place M8 in a way such that the incident beam to the M9 travels parallel to the direction of travel of TS3.

  • 20

    Attach a dichroic (D4: Semrock, FF775-Di01–25×36, AD-35) to the scanning module followed by a 4-f relay for wavefront sensing (AD-36), formed by a pair of achromatic doublet lenses (L9: Thorlabs, AC254–125-A, f = 125 mm, and L10: Thorlabs, AC254–200-A, f = 200 mm) and a pair of reflective mirrors (M12 and M13), as shown in AD-38.

  • 21

    Mount the SHWS module, consisting of an EMCCD (Andor, iXon Ultra 888) and a microlens array (Edmund, #64–483), on the main breadboard via a translation stage (TS4), as shown in AD-37 and AD-38.

  • 22

    Connect the electronics and setup the computer data file for the ScanImage; information about wiring and machine data file for the ScanImage PXI-based system is found at https://archive.scanimage.org/SI2019/28377185.html.

Critical step. The frame clock of ScanImage (Primary DAQ, Port: PFI6) will be used as the trigger signal for the deformable mirror. A NOT-gate is required since the PCI-E interface of the DM controller (PEX-292144) supports trigger on falling edge only.

II. Alignment for the AO two photon microscope

This section describes the alignment for process for the microscope (steps 23–42). Steps 23–37 describe the basic alignment for the microscope while steps 38 and 39–41 emphasize the fine adjustment on the excitation path and direct wavefront sensing path respectively, to conjugate scanners, DM and SHWS to the pupil plane of the objective.

For the basic alignment and the DM conjugation (steps 23–36 and 38), we recommend tuning the laser to the most used wavelength for your application, e.g., 930 nm for excitation of GCaMP, and visualize the beam with an infrared viewer (e.g., Newport, IRV2–1300). An infrared detector card (e.g., Thorlabs, VRC4) is handy to localize the beam during alignment. We recommend you use low output power, e.g., ~100 mW, during the alignment for safety and to minimize accidental damage to the Pockels cell.

Timing. 2 – 5 days

  • 23

    Open ScanImage. Click the “Direct Mode” checkbox and adjust the power on the Power Controls Panel. Click the “Point” button on the Main Controls Panel. Flatten the DM by clicking the “Flatten DM” bottom on the AOGUI.

    Critical step. After starting the ScanImage, the scanners will be oriented towards the park angles, as set in the machine data file. Clicking the “Point” button will bring them back to zero degrees and open the shutter for the alignment; information about the “Point” button is at https://archive.scanImage.org/SI2019/Main-Controls_28377140.html.

  • 24

    Align the laser output with the center of the beam expander. An alignment plate with a pinhole (Thorlabs, CPA1) can be used to indicate the center of the beam expander. Adjust the positioning knobs on mirrors M1 and M2 so that the beam is centered at the pinhole on the alignment plate while moving the plate back and forth along the rail to check for parallel alignment.

    Critical step. We recommend you temporarily remove lenses L1 and L2 from the cage system during the alignment to make the beam path more intuitive.

  • 25

    Adjust the distance between lenses L2 and L1 to collimate the output from the beam expander.

    Critical step. Introduce a temporary mirror after the telescope to project the expanded beam to a distant location and visualize the beam by the infrared detector card. You should not see significant changes in beam size along the beam path if the beam is well collimated. If the beam size increases along the projection, you should move lens L2 away from L1 along the cage system, and vice versa.

  • 26

    Adjust the directions of mirrors M3 and M4 to align the beam to the center of the periscope cage system, as indicated by the iris (Thorlabs, CP20D) that moves along the rail.

  • 27

    Adjust the orientation of mirrors M5, M6, and M7 to align the periscope output beam to the deformable mirror. Tune the orientation of the DM rotation stage (Thorlabs, PR01) and TS2 to align the DM output beam to the lens L3 cage system.

    Critical step. Like the case in step 24, we recommend that you temporarily remove lens L3 off from the cage system and use the alignment plate (Thorlabs, CPA1). Ensure that the beam is not blocked by M7, as discussed in step 17.

  • 28

    Adjust the distance between the DM and lens L3 to be around 450 mm by moving lens L3 along the cage rails.

  • 29

    Align the incident beam to the M9 mirror by tuning the direction the beam reflecting from mirror M8.

    Critical step. As we discussed in step 19, the ideal direction of the incident beam to the M9 mirror should be parallel to the direction of travel of TS3. Place an iris in front of the M9 mirror via temporary rods and adjust M8 until the beam stays on the center of the iris while the iris is moved along the rods.

  • 30

    Orient mirrors M9 and M10 to align the reflective beam to the center of iris (Thorlabs, CP20S) sliding along the rods at the entrance of the scanning module.

  • 31

    Tune the orientation of mirror M11 to make the beam go up vertically at the center of the cage system. You may wish to temporally remove the X-galvo, as well as the caps on the X-galvo cube, and mount an iris (e.g., Thorlabs, SM2D25D) on the top of the cube via rods for the alignment procedure.

    Critical step. The dichroic mirror (D4), whose function is to reflect the emission light coming back from the sample to the SHWS, may slightly shift the excitation beam in this section of the beam path. We recommend you adjust the dichroic approximately towards the same direction as we shown in AD-38 during the alignment in this step. This will minimize the influence on the excitation path while aligning the SHWS path in step 39.

  • 32

    Rotate the galvo holder in the mount plate to align the excitation beam to the center of the 4-f cage system indicated by an alignment plate (Thorlabs, LCPA1) sliding along the rail.

    Critical step. We recommend you take lens pair L5 and L6 off from the cage system for the initial alignment. Without L5 and L6, this segment of beam path could also be used to check the collimation of the output from the beam compressor lens pair L3 and L4. Reduce the optical path between the L3 and L4 by moving the M9-M10 module along the rail if you find that the beam shrinks as it travels between the two scanners, and vice versa.

    Critical step. After you restore the lens pair L5 and L6, check whether the beam remains at the center of the cage system. If not, tune the L5 and L6 translation mounts (Thorlabs, CXY2) to be bring the beam back to the center of the cage system and the center of the resonant scanner, respectively.

  • 33

    Rotate the resonant scanner in the holder to align the beam to the center of the cage system between the scanner and the folding mirror.

    Critical step. We recommend you remove scan lens L7 for the initial alignment and tune the position of the translation mounts (Thorlabs, CXY2) of the lens tube to recenter the beam as needed.

  • 34

    Adjust the folding mirror (Thorlabs, PFE20-P01, Mount: KCB2EC) and the tube lens (L8) translation mounts (Thorlabs, CXY2) to align the beam to the center of lens L8.

    Critical step. Mount an iris (Thorlabs, SM2D25D) on the L8 lens tube temporarily to assist with the alignment.

  • 35

    Align the beam to the back aperture of the objective (pupil).

    Critical step. We recommend that you replace the objective by an iris (Thorlabs, CP20S) that is mounted at the pupil plane (AD-39), as shown in Figure 7. Adjust the non-axial position of the back aperture by sliding the objective module along the rail and changing the position of the Z-motor (Thorlabs, LNR502) horizontally on its mount (Thorlabs, XT95RC4). You can check this alignment using the EMCCD, as discussed later in step 44.

  • 36

    Check the conjugation between the scanners and the pupil.

    Trouble shooting. Ideally, the X-scanner, Y-scanner, and the back focal plane are conjugate, following the dimensions in the assembly drawing (AD-05, AD-08, AD-09, AD-10, AD-11, AD-14). However, we recommend that users verify the conjugation by observing the laser spot on the iris at the pupil level while scanning. You should observe little movement of the spot if the scanners and back focal plane are well conjugated. If you observe large movement of the spot, translate the pupil level along the axial direction by the Z-motor to the level where you see little movement of the spot during scanning.

  • 37

    Align the collection path. Adjust the main dichroic mirror (D1 or D1’) to maximize the image brightness while imaging the sulfo-Cy5.5 solution (excitation beam: 1250 nm) with the far-red channel. Similarly, adjust D2 and D3 while imaging the fluorescein solution (excitation wavelength: 930 nm) and the sulforhodamine B solution (excitation wavelength: 1030 nm) through the green-yellow channel and red channel, respectively.

  • 38

    Conjugate the deformable mirror to the back focal plane of the objective.

    Critical step. To find the conjugate plane for the DM, temporarily replace the deformable mirror by a scratched mirror (AD-41) and image it by a camera whose sensor is at the objective back focal plane (AD-40). Slide stage TS1 until the camera obtains the clear and sharp image of the scratched mirror, as shown in Figure 8. Put the DM back after you find the conjugate plane and adjust the alignment if necessary.

  • 39

    Excite the sulfo-Cy5.5 solution with the 1250 nm excitation beam and align the emission beam to the wavefront sensing path from dichroic mirror D4 to L10 by tuning the orientation of dichroic D4 and mirrors M12 and M13.

    Critical step. Mount a camera, the same one you used for the DM conjugation, in the cage system for the initial alignment if you find the emission light too dim to be visualized by the IR viewer or an IR card.

    Critical step. Use dichroic mirror D1, and not D1’, as the main dichroic so that most of the emitted light will go to the wavefront sensing path rather than the collection path.

  • 40

    Temporarily remove the microlens array from the SHWS. Open the Andor SOLIS software. Adjust the lateral and vertical position of the EMCCD to locate the emission beam at the center of the EMCCD. Adjust mirror M12 and M13 until the beam position on the EMCCD stays fixed as the stage TS4 travels along the axial direction (Figure 10a,b). Adjust the distance between lens pair L9 and L10 until the beam size does not change as the EMCCD travels axially.

    !Caution Always keep the short pass filter (Semrock, FF01–790-SP-25) in front of the highly sensitive EMCCD to protect it from scattered light from the excitation laser.

  • 41

    Mount the microlens array back in the SHWS and slide it along the rail until it focuses the emission light on the EMCCD.

    Critical step. Mount a stopper on the rail (Thorlabs, ERCPS) to mark the relative position for the microlens array, as the array will be removed and replaced several times for testing of conjugation and for calibration. Measure and calculate the distance between to lens array and the EMCCD sensor (AD-37), marked as Dist1.

  • 42

    Find the plane that conjugates to the objective back focal plane on the SHWS path.

    Critical step. Mount a paper target at the level of the objective back focal plane (AD-42) and illuminate it with a flashlight, with the laser off, as shown in Figure 9. Remove the microlens array and move the EMCCD axially to the conjugate plane, where it obtains the sharp image of the paper target. Read the micrometer on stage TS4 and mark this position as P1. Restore the lens array and move stage TS4 axially for Dist1 to bring the lens array to the conjugate plane (marked as P2).

Figure 8 |. Conjugating the DM to the pupil plane.

Figure 8 |

a, Schematics for finding the DM location along the optical axis that conjugates to the pupil plane. The objective is replaced by a camera with its sensor at the pupil plane. The deformable mirror is replaced by a mirror with scratch for the camera to image. b, Real item image of the scratched mirror we used to replace the DM. c, Image of the scratched mirror taken by the camera at the pupil plane. The sharp grid pattern indicates that the mirror is at the conjugates plane of the pupil.

IIIa. AO calibration

This section describes the calibration of the AO-TPLSM system (steps 43 to 49). The purpose for the AO calibration is to map the phase shifts for each Zernike mode at 1-μm root-mean-square amplitude on the DM to the spot shifts on the SHWS, which will be used to calibrate and calculate the command signals to the DM module to correct for sample aberration.

Timing. 1 day.

  • 23
    Map the DM to the field of the SHWS as follows:
    1. Remove the microlens array from the SHWS, keeping the short pass filter, and move the EMCCD to P1.
    2. Replace the objective by a mirror mounted at the back focal plane (AD-43).
    3. Mount an ND filter at the end of the lens pair L1 and L2 beam expander (e.g., Thorlabs, ND30A, Optical Density: 3.0) to protect EMCCD by reducing the laser power.
    4. Flatten the DM.
    5. Tune the laser wavelength to 740 – 750 nm.
    6. The calibration beam incident on the DM will be reflected by the pupil mirror and project to the EMCCD, where the DM will be seen as a bright disk with sharp edge in the SOLIS software after adjusting the contrast and brightness, as shown in Figure 10d.
    7. Use the ROI tool in SOLIS to draw circle on the edge of the DM.

    !Caution Always double-check the positioning of the ND filter for the steps that directly reflect the laser to the EMCCD.

    Trouble shooting. The sharp edge of bright disk is the edge of the DM because the DM is conjugated to the EMCCD in this setting.

    1. If you cannot see the sharp edge, it is likely that the incident beam to the DM is not sufficiently expanded or the DM, pupil, and EMCCD are not conjugated to each other.

    2. If the edge is not circular, it means the beam was cropped by something in the optical path, often the pupil mirror or the scanners. Move the pupil mirror horizontally to test if this fixes the problem before checking the alignment of the system.

    3. If the brightest part of the laser is not centered at the disk, it means the incident beam to the DM is not well aligned. Readjust mirrors M6 and M7 to center the laser to the DM.

  • 24
    It is critical for the AO calibration to map the DM and the objective back aperture at the same location on the SHWS. These steps describe a process:
    1. Temporarily remove the lens array and keep the EMCCD at P1. Remove the ND filter and put the objective back in the system.
    2. Excite the sulfo-Cy5.5 solution with the 1250 nm excitation beam, as shown in Figure 10a. The emission light collected by the objective will appear as a disk with sharp edge (back aperture disk) in the SOLIS software.
    3. Adjust the objective mounting module non-axially until the back aperture disk is concentric with the DM edge, as shown in Figure 10a,d.
    4. Double check the alignment after the adjustment by moving the EMCCD to P2 to confirm whether the beam position on the EMCCD the remains motionless (Figure 10a,b). If not, adjust the system as described in step 40.
    5. Replace the microlens array and obtain an image with the SOLIS software as a sample reference pattern (Figure 10c).
  • 25

    Set up the system in the same manner as in step 43. Move the EMCCD to P2 and tune the direction of the pupil mirror to fit the calibration beam into the edge you have drawn at P1, as shown in Figure 10e. Remount the microlens array. Finely tune the pupil mirror to overlap the current pattern on the EMCCD (calibration reference pattern, Figure 10f) to the sample reference pattern as much as possible (Figure 10g).

    Trouble shooting. The mismatch of the calibration reference pattern with the sample reference pattern will reduce the dynamic range for wavefront sensing. Use the following sequence if the patterns cannot be overlapped.
    1. Adjust the correction ring on the objective while acquiring the sample reference pattern until the new pattern best matches the calibration reference pattern. Fix the correction ring at this position for the rest of the procedure.
    2. If mismatch still occurs, it may indicate that the excitation beam is not collimated, especially if you see the grid size differs in the two-reference patterns. Move stage TS3 along the rail to change the divergence of the emitted light. Then recollimate the wavefront sensing beam as described in step 40.
  • 26

    Close the SOLIS software to release control of the EMCCD and initialize the DM and SHWS from MATLAB by clicking “initialize DM” and “initialize SH” bottom on the AOGUI. Click “Camera config” to set the temperature as −60 °C for the EMCCD and turn on the chiller.

    Critical step. Acquire images before the calibration to find a laser power and exposure time for clear images after the EMCCD reaches its target temperature.

  • 27

    Run the first section of the code “DM_SHWS_calibration_Ctr.m”, which will display each of the 60 individual Zernike modes on the DM and acquire an image of the deflected spots on the SHWS (Figure 11). The code will also download a flat pattern to the DM to acquire a wavefront spot pattern for calibration reference. After the first section of the code is complete, turn off the shutter and run the second section of “DM_SHWS_calibration_Ctr.m” to obtain a background image. Save “DM_calibration_shdata”, “DM_calibration_shdata_ref” and “DM_calibration_shdata_ref_bg” for the analysis in next step.

  • 28

    Run “DM_SHWS_calibration.m”, which will analyze the deflection of the spots on the SHWS relative to the calibration reference for each Zernike mode.

    Critical step. Before running the code, adjust the parameter for the center and the radius of the field-of-view (FOV) (lines 65 to 67) based on the back aperture disk on EMCCD, as previously obtained in step 44.

    Trouble shooting. If random dots and/or small objects are detected as focused spots on the EMCCD image, the detection threshold can be adjusted (shstruct.thresh_course_img, line 133) to exclude these spots.

    Trouble shooting. This part of the code will show the putative pattern of the DM versus the ideal Zernike modes. The putative pattern should look like the ideal one, except that it may be rotated or inverted. If it appears very different from the ideal pattern and there is nothing wrong with the calibration, i.e., no extra spots, perfect overlap of the pupil and DM, and well-aligned wavefront sensing pathway, you should contact the DM manufacturer to calibrate the DM influence function.

  • 29

    Click “Camera config” to set the temperature as 20 °C for the EMCCD and release control of the EMCCD from MATLAB by clicking “deinitialize SH” after it reaches 20 °C. The temperature of the EMCCD can be checked by click “check temp”.

!Caution. Always use the temperature control to return EMCCD back to the room temperature before turning it off.

IIIb. System aberration calibration

The purpose for the system aberration calibration is to find a pattern on the DM that compensates for the aberration introduced by the imaging system itself, which includes the imperfections of the microscope as well as aberrations induced by the cover glass of the cranial window (steps 50 to 52). We suggest the system aberration should be corrected for the all the wavelengths that are commonly used during experiments, as some components of the aberration, e.g., spherical aberration, vary with the wavelength (Figure 13). We recommend the use of aqueous solutions of the fluorescent dyes fluorescein, sulforhodamine B, and sulfo-Cy5.5 to correct the system aberration for 930, 1030, and 1250 nm excitation, respectively.

Timing. 2–3 hours.

  • 23

    Flatten the DM by clicking the “Flatten DM” bottom on the AOGUI. Image the central 100 μm × 100 μm field of the fluorescent sample at the depth of 50 μm under the cover glass (thickness number 1).

    Critical step. Use dichroic mirror D1 as the main dichroic for fluorescein and sulforhodamine B imaging and use the D1’ for sulfo-Cy5.5 imaging.

  • 24

    Run “sensorlessWF_sys_abr_descend.m” to implement a gradient-descent algorithm that optimizes the amplitude of each Zernike mode to maximize the average intensity (Figure 12). In each iteration, the increments of the Zernike mode coefficients are computed based on the gradient of mean intensity changes to update the pattern on the DM. Tip, tilt, and defocus are excluded. The coefficients of the Zernike modes usually became stable after 30 to 50 cycles of optimization (Figure 13); you can set the number of iterations at line 18 of the code. The resulting Zernike coefficients will be referred as system aberration correction coefficients.

  • 25

    Validate the system aberration correction coefficients by measuring the point spread function of the 200-nm fluorescent beads after loading the system aberration correction pattern on the DM (Figure 14).

  • 26

    Image the aqueous solution of sulfo-Cy5.5 after system aberration correction (main dichroic: D1’, 100 μm × 100 μm field, 50 μm under the cover glass). Switch the main dichroic to D1 to obtain a sample reference pattern on the SHWS that will be used for sample aberration correction.

IIIc. System verification

Improper calibration is a common cause for poor performance with AO in actual experiments. It can even lead to image degradation after aberration correction. To avoid this problem, we recommend evaluating the performance of the AO-TPLSM system on a fiber test sample (steps 54 and 55 and the associated sub-steps) before use of AO-TPLSM with living preparations.

Timing. 2–3 hours.

  • 23
    Prepare a double-layer cover glass sample.
    1. Glue two number 1 cover glasses with optical adhesive (Norland optical adhesive 61).
    2. Cut a 5 mm × 5 mm piece of Kimwipe, place it on a slide.
    3. Add a drop of the 0.5 % (w/v) sulforhodamine B and a drop of the 0.5 % (w/v) sulfo-Cy5.5 solutions, wait till the solutions dry, add a drop of instant adhesive (Loctite 4014), and close with the double-layer cover glass.
  • 24
    Perform verification.
    1. Start ScanImage. Turn on the EMCCD and SOLIS software. Set the CCD temperature to −60 °C.
    2. Initialize the DM and flatten it. Acquire a 50 μm × 50 μm FOV image of a branch of a fiber (Figure 15a).
    3. Load the system aberration correction coefficients for acquisition at 1030 nm to the DM.
    4. Acquire an image for the same branch of the fiber with the same laser power as step 55.ii (Figure 15b).
    5. Use dichroic mirror D1’ as the main dichroic. Tune the laser to 1250 nm for Cy5.5 and load the system aberration correction coefficients for acquisition at 1250 nm.
    6. Image the same FOV as in step 54.iv with the far-red channel to confirm the existence of Cy5.5 in the FOV.
    7. Replace dichroic mirror D1’ with mirror D1 to transmit the far-red emission light of Cy5.5 to the wavefront sensing path.
    8. Obtain the sample aberration pattern on the SHWS with the SOLIS software by a long exposure, i.e., 0.5 s, during scanning.
    9. Save the sample aberration pattern (Figure 15e). Run “sample aberration correction” to compute the coefficients for sample aberration correction (Figure 15f). The spherical aberration (Noll index 11) should dominate the correction pattern for the double-layer cover glass in a well calibrated system (Figure 15g).
    10. Add the sample aberration correction coefficients to the system aberration correction coefficients for 1030 nm and send it to the DM.
    11. Acquire an image for the fiber using the same FOV and same power, as in steps 55.ii and 55.iv (Figure 15c).
    12. Compare the three images. A good calibration should give you about a two-fold increase in the SNR at this setting (Figure 15d).

Figure 15 |. System verification by correcting the aberration of the double-layer cover glass.

Figure 15 |

a to c, Images of a fiber stained with rhodamine B. Scale bar, 10 μm. a, Images taken without any AO correction. b, Images taken after correcting the system aberration. c, Images taken with both system aberration and sample aberration corrected. d, Signal profiles along the line in a to c. Scale bar, 2 μm. e, Spot patterns formed by the SHWS from the descanned guide star signal for inferring the sample aberration. f, Reconstructed wavefront that applied to the DM. g, Zernike coefficients of the reconstructed wavefront.

IV. Synthesis of Guide Star (2000 kDa Cy5.5-dextran)

This section (steps 56 to 68) describes the procedure to synthesize 3 % (w/v) 2000 kDa Cy5.5-dextran which will be used for generating the guide star signal for sample aberration correction in vivo.

Timing. 2 days.

  • 23

    Prepare 50 mM bicine buffer at pH 8.5; adjust with NaOH. Store at 4 °C.

  • 24

    Dissolve 166.3 mg of amino-dextran in 1040 μL bicine buffer; add up to an extra 200 μL buffer if it does not dissolve well as the solution is close to the saturation limit. Use a 50 ml Falcon tube for this process.

  • 25

    Dissolve 5 mg Cy5.5 NHS ester in anhydrous DMSO by adding 650 μL of DMSO to the 5 mg Cy5.5 NHS ester in the Falcon tube. Gently swirl and then centrifuge down for 30 s.

    !Caution. Thus solution is unstable and should be used immediately after preparation.

  • 26

    Mix dextran and Cy5.5 NHS ester, vortex, and incubate for 2 h at room temperature. The solution should get a little warm from the reaction.

  • 27

    Dissolve 30.7 mg of N-succinimidyl-acetate (quencher) in 130 μL of anhydrous DMSO in a 1.5 mL tube.

    !Caution. Thus solution is unstable and should be used immediately after preparation. N-succinimidyl-acetate reacts with H2O, so always store N-succinimidyl-acetate in N2 and work quickly after opening.

  • 28

    Add N-succinimidyl-acetate solution to the reaction and incubate overnight at 4 °C.

  • 29

    Suspend Sephadex G25 (in the separation column box) in PBS pH 7.4; for one batch use either 2 g or 3 g Sephadex and add PBS to reach 50 mL. Allow some time to equilibrate, e.g., overnight at 4 °C.

  • 30

    Decant the PBS to leave 5 mL PBS on top of the Sephadex, vortex, and add to chromatography columns; wait for the Sephadex to compact and add the top frit. Slowly push it down until it just touches the Sephadex. Pour off the remaining top layer of PBS and equilibrate the column with 10 mL fresh PBS.

    Critical step. Never let the Sephadex column run dry.

  • 31

    Add 2–3 mL of PBS pH 7.4 to the reaction mixture and load onto the Sephadex chromatography column.

  • 32

    Wait for the dye to completely enter the Sephadex.

  • 33

    Add some PBS, i.e., fill the column, and collect ‘blue’ fraction from the column into a 50 mL Falcon tube. Stop collecting when the bottom of the column becomes transparent.

  • 34

    Load ‘blue’ fraction into spin column(s) and centrifuge for 4 h at 4 °C @ 4000 g (swinging bucket rotor) or 5000 g (fixed rotor).

  • 35

    Collect the supernatant, which is Cy5.5-dextran; dilute it to 5 mL with saline, sterile filter, and store at −20 °C.

V. AO-2P Imaging with microvessels based guide-star

This section (steps 69 to 75) describes the process (Figure 16) to imaging structure (Figure 17) and function (Figure 18) of the mouse brain with AO-TPLSM. The animals should be prepared in the same manner as for conventional TPLSM, including the viral injection, craniotomy, or other special treatment that may be performed for a specific experiment25,35. To prevent the incident light cone from being blocked by the edge of the optical window, for deep layer imaging, we recommend use of a cover glass that is larger than the area of interest.

Figure 16 |. In vivo experiment workflow.

Figure 16 |

a, Schematics of the guide star (Cy5.5-dextran) delivery by retro-orbital injection. b, Schematic diagram of the AO correction. Spot patterns formed by the SHWS from the descanned guide star signal in the capillary, together with the sample reference pattern and AO calibration results of the DM Zernike modes, are used for calculating the DM pattern for correcting the sample aberration. The sample aberration correction pattern is added to the system aberration pattern for full AO correction.

Figure 17 |. Morphological imaging with AO correction.

Figure 17 |

a,b, SST+ neurons in mouse somatosensory cortex. Images were acquired at 675 – 690 μm below the pia with system (a) or full AO correction (b) using excitation wavelength λ = 1030 nm. The SST+ neurons were labeled with tdTomato. Scale bar, 20 μm. c, Signals profiles along the lines in a and b. Scale bar, 1 μm. d and e, Spectral power as a function of spatial frequency k for the images in a and b. f, |k|-space plot of the spatial frequency with system AO and full AO correction. g,h, Spot patterns on the SHWS (g) and reconstructed wavefront phase map on DM (h) for correcting the sample aberration in the a. g, Zernike coefficients of the reconstructed wavefront.

Figure 18 |. Functional imaging AO correction.

Figure 18 |

a, In vivo two-photon imaging of the layer 5 neurons of vS1 cortex which were labelled with jRGECO1a. Data were obtained at 630 μm below the pia with full AO correction using excitation wavelength λ = 1030 nm. b, Calcium signal in the ROIs defined by the dashed circles in panel a. c, In vivo two-photon imaging of the thalamocortical boutons which were labelled with iGluSnFR3. Data were obtained at layer 4 of vS1 cortex with full AO correction using excitation wavelength λ = 970 nm. d, Glutamate dynamics responding to 5 Hz air puff in the ROIs defined by the dashed circles in panel c. The trace is averaged from 60-s recording.

Timing. 1 day.

  • 23

    Briefly anesthetize the mice with isoflurane and deliver 50 μL of 3 % (w/v) solution in saline of Cy5.5-dextran (Procedure IV) into the lumen of blood vessels via retro-orbital intravenous injection23. The Cy5.5-dextran can circulate for more than 4 hours in the blood35 and provide a stable guide star signal during this period.

  • 24

    Start ScanImage. Initialize the DM and load the system aberration correction coefficients to the DM based on your imaging wavelength. Turn on the EMCCD and SOLIS software. Set the temperature as −60 °C. Find the FOV within the window formed by a craniotomy25 or thinned bone24,36.

    Critical step. Make sure the cranial window is horizontal, i.e., perpendicular to the optical axis. A tilted window will alter the sample aberration correction such that the FOV is shifted after sample aberration correction.

  • 25

    Use dichroic mirror D1’ as the main dichroic. Tune the laser to 1250 nm for Cy5.5 and load the system aberration correction coefficients for 1250 nm. Image the microvessels in the region of interest with the far-red channel.

    Critical step. As the tissue aberration varies gradually with changes in the location of the FOV, we recommend the user to perform the sample aberration correction for individual 100 μm × 100 μm FOVs, or 50 μm × 50 μm FOVs; the latter area is a phenomenological limit to the isoplanatic region16,27.

  • 26

    Replace dichroic mirror D1’ with dichroic D1 so that the far-red emission light of Cy5.5 is mainly directed to the wavefront sensing path rather than the collection path. Obtain the sample aberration pattern on the SHWS by a long exposure, i.e., 1 to 30 s depending on the SNR (Figure 17g). Adjust the EMCCD gain to achieve a good signal of the sample aberration pattern. Save the sample aberration pattern.

    Critical step. The SNR of the sample aberration pattern is fundamental to the AO correction. To improve the signal for deep tissue, we recommend use of the ScanImage “microROI” function. By selecting ROIs on the microvessel, the galvo mirrors will only scan on the vessel during the period of exposure and avoid collecting at times devoid of a signal.

  • 27

    Run “sample aberration correction”, which computes the shifts of the center of individual spots in the sample aberration pattern from the reference pattern and decomposes the shifts to the Zernike mode pattern. This determines the coefficients for sample aberration correction (Figure 17h,i).

  • 28

    Add the sample aberration correction coefficients to the system aberration correction coefficients for wavelength that you plan to use and send them to the DM. At this point, both the system aberration as well as the sample aberration for that FOV are corrected. Start the recording (Figure 17ac).

    Critical step. In a successful sample correction, the user should see a significant increase in SNR (Figure 17ac) and spatial resolution, which can be quantified by a 2-D FFT of images in polar coordinates (Figure 17df).

    Trouble shooting. If the image is not improved by the correction, it is usually caused by the low SNR of the sample aberration pattern. The following checklist can help:

    1. Increase the excitation beam power up to 250 mW.

    2. Extend the exposure time during wavefront sensing.

    3. Increase the EMCCD gain in SOLIS; typically, 2 to 80.

    4. Use ScanImage “microROI” function to select ROIs on the microvessel.

    5. Reduce the FOV to 50 μm × 50 μm.

    6. Use a Zernike mode pattern in which the defected spots are weighted by their SNR when calculating the Zernike coefficients.

    7. Check the AO calibration (Procedures IIIa and IIIc).

  • 29

    If you have another FOV to record, center at the new FOV, and repeat steps 69 to 74.

Supplementary Material

Supplemental Data 1
Supplemental Data 2
Supplemental Data 3
Supplemental Table 1
Supplemental Code 1

Acknowledgments:

We thank Stephen Adams for assistance with Cy5.5-dextran synthesis and Beth Friedman for assistance with animal preparations. This work was funded by the National Science Foundation, grant PHY153264, and the National Institutes of Health, grants U24 EB028942, R35 NS097265, and U19 NS107466.

Footnotes

Competing interests: None

REFERENCES

  • 1.Denk W, Strickler JH & Webb WW Two-photon laser scanning fluorescence microscopy. Science 248, 73–6 (1990). [DOI] [PubMed] [Google Scholar]
  • 2.Kleinfeld D, Mitra PP, Helmchen F & Denk W Fluctuations and stimulus-induced changes in blood flow observed in individual capillaries in layers 2 through 4 of rat neocortex. Proceedings of the National Academy of Sciences USA 95, 15741–15746 (1998). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Svoboda K, Denk W, Kleinfeld D & Tank DW In vivo dendritic calcium dynamics in neocortical pyramidal neurons. Nature 385, 161–5 (1997). [DOI] [PubMed] [Google Scholar]
  • 4.Dong C et al. Fluorescence Imaging of Neural Activity, Neurochemical Dynamics, and Drug-Specific Receptor Conformation with Genetically Encoded Sensors. Annu Rev Neurosci 45, 273–294 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Chen TW et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499, 295–300 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Marvin JS et al. Stability, affinity, and chromatic variants of the glutamate sensor iGluSnFR. Nat Methods 15, 936–939 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Aggarwal A et al. Glutamate indicators with improved activation kinetics and localization for imaging synaptic transmission. Nature Methods, in press (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Villette V et al. Ultrafast Two-Photon Imaging of a High-Gain Voltage Indicator in Awake Behaving Mice. Cell 179, 1590–1608 e23 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Kleinfeld D et al. Can one concurrently record electrical spikes from every neuron in a mammalian brain? Neuron 103, 1005–1015 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Jun JJ et al. Fully integrated silicon probes for high-density recording of neural activity. Nature 551, 232–236 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Ohki K, Chung S, Ch’ng YH, Kara P & Reid RC Functional imaging with cellular resolution reveals precise micro-architecture in visual cortex. Nature 433, 597–603 (2005). [DOI] [PubMed] [Google Scholar]
  • 12.Xu S et al. Behavioral state coding by molecularly defined paraventricular hypothalamic cell type ensembles. Science 370(2020). [DOI] [PubMed] [Google Scholar]
  • 13.Hampson KM et al. Adaptive optics for high-resolution imaging. Nat Rev Methods Primers 1(2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Wang K et al. Direct wavefront sensing for high-resolution in vivo imaging in scattering tissue. Nat Commun 6, 7276 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Wang K et al. Rapid adaptive optical recovery of optimal resolution over large volumes. Nat Methods 11, 625–8 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Liu R, Li Z, Marvin JS & Kleinfeld D Direct wavefront sensing enables functional imaging of infragranular axons and spines. Nat Methods 16, 615–618 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Debarre D et al. Image-based adaptive optics for two-photon microscopy. Opt Lett 34, 2495–7 (2009). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Tang J, Germain RN & Cui M Superpenetration optical microscopy by iterative multiphoton adaptive compensation technique. Proc Natl Acad Sci U S A 109, 8434–9 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Ji N, Milkie DE & Betzig E Adaptive optics via pupil segmentation for high-resolution imaging in biological tissues. Nat Methods 7, 141–7 (2010). [DOI] [PubMed] [Google Scholar]
  • 20.Streich L et al. High-resolution structural and functional deep brain imaging using adaptive optics three-photon microscopy. Nat Methods 18, 1253–1258 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Rodriguez C et al. An adaptive optics module for deep tissue multiphoton imaging in vivo. Nat Methods 18, 1259–1264 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Aviles-Espinosa R et al. Measurement and correction of in vivo sample aberrations employing a nonlinear guide-star in two-photon excited fluorescence microscopy. Biomed Opt Express 2, 313–549 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Yardeni T, Eckhaus M, Morris HD, Huizing M & Hoogstraten-Miller S Retro-orbital injections in mice. Lab Anim (NY) 40, 155–60 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Drew PJ et al. Chronic optical access through a polished and reinforced thinned skull. Nat Methods 7, 981–4 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Holtmaat A et al. Long-term, high-resolution imaging in the mouse neocortex through a chronic cranial window. Nat Protoc 4, 1128–44 (2009). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Ji N, Sato TR & Betzig E Characterization and adaptive optical correction of aberrations during in vivo imaging in the mouse cortex. Proc Natl Acad Sci U S A 109, 22–7 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Ji N Adaptive optical fluorescence microscopy. Nat Methods 14, 374–380 (2017). [DOI] [PubMed] [Google Scholar]
  • 28.Wang C et al. Multiplexed aberration measurement for deep tissue imaging in vivo. Nat Methods 11, 1037–40 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Qin Z et al. Adaptive optics two-photon microscopy enables near-diffraction-limited and functional retinal imaging in vivo. Light Sci Appl 9, 79 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Meng G et al. High-throughput synapse-resolving two-photon fluorescence microendoscopy for deep-brain volumetric imaging in vivo. Elife 8(2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Resendez SL et al. Visualization of cortical, subcortical and deep brain neural circuit dynamics during naturalistic mammalian behavior with head-mounted microscopes and chronically implanted lenses. Nat Protoc 11, 566–97 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Qin Z et al. Adaptive optics two-photon endomicroscopy enables deep-brain imaging at synaptic resolution over large volumes. Sci Adv 6(2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Podgorski K & Ranganathan G Brain heating induced by near-infrared lasers during multiphoton microscopy. J Neurophysiol 116, 1012–23 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Prevedel R et al. Fast volumetric calcium imaging across multiple cortical layers using sculpted light. Nat Methods 13, 1021–1028 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Shih AY et al. Two-photon microscopy as a tool to study blood flow and neurovascular coupling in the rodent brain. Journal of Cerebral Blood Flow & Metabolism 32, 1277–1309 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Yang G, Pan F, Parkhurst CN, Grutzendler J & Gan WB Thinned-skull cranial window technique for long-term imaging of the cortex in live mice. Nat Protoc 5, 201–8 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplemental Data 1
Supplemental Data 2
Supplemental Data 3
Supplemental Table 1
Supplemental Code 1

RESOURCES