Dynamic conjugate F-SHARP microscopy

Optical microscopy is an indispensable tool in biomedical sciences, but its reach in deep tissues is limited due to aberrations and scattering. This problem can be overcome by wavefront-shaping techniques, albeit at limited fields of view (FOVs). Inspired by astronomical imaging, conjugate wavefront shaping can lead to an increased field of view in microscopy, but this correction is limited to a set depth and cannot be dynamically adapted. Here, we present a conjugate wavefront-shaping scheme based on focus scanning holographic aberration probing (F-SHARP). We combine it with a compact implementation that can be readily adapted to a variety of commercial and home-built two-photon microscopes. We demonstrate the power of the method by imaging with high resolution over extended FOV (>80 µm) deeper than 400 μm inside a mouse brain through a thinned skull.


Detailed description of conjugate F-SHARP module
In this section we present a detailed technical description of the conjugate F-SHARP module. The goal of such an implementation is to be easily applicable to a wide range of different 2P microscope. The only prerequisite for the installation of the module in a 2P microscope is optical access to its entrance pupil, which in scanning microscopes usually coincides with the location of the galvanometric scanning mirrors.
As has been presented in 1 , F-SHARP is based upon the following concept. We split the excitation beam into two beams, one which stays stationary within the field of view (FOV) while the second gets scanned against it. We step the relative phase between the two beams and can therefore infer the complex amplitude inside the turbid medium. Based on the time-reversal property of light propagation, we can use the complex amplitude of the inferred E-PSF to calculate the appropriate wavefront correction that will undo the scattering and lead to the formation of a sharp focus spot inside the scattering medium. We repeat the above correction steps a limited number of times (usually 3), until the reconstructed wavefront converges.
After the wavefront correction has been identified, the correction pattern is applied onto the SLM, the secondary beam is blocked and we can acquire images similar to any other scanning microscopy technique.
We designed the conjugate F-SHARP system presented here with the intent of placing all the optical components into a module with a single input and output beam. For a simpler description we can conceptually split the optical implementation of the module in 3 separate parts. As shown in Fig. S1, the light blue box on the top, contains all the components responsible for the control of the power ratio and the phase modulation between the two beams. The optical elements within the green box take care of the splitting, relative scanning, wavefront corrections and subsequent recombination of the two beams. Finally, the dark blue box contains the optomechanical components that implement the conjugate functionality. We adjust the beam diameter between the different submodules to the appropriate size needed by the optical components used. Having provided a general picture about the implementation we proceed below in a more detailed description.
The output of a femtosecond laser source, (Spectra Physics MaiTai, central wavelength λ = 920 nm, pulse duration < 100 fs, and corresponding bandwidth of 12nm) passes through a λ/2 waveplate (AHWP05M-980 Thorlabs) that controls the power ratio between the vertical (stationary) and horizontal (scanning) polarization of the input beam. The beam goes through an amplitude EOM (Thorlabs EOM-AM-NR-C2) which in this case is used to change the relative phase between the two polarizations depending on the voltage applied (detailed information on the phase stepping scheme can be found in Section 2 of the Supplementary Material). We set the beam diameter of the input beam to 1 mm so that it does not suffer clipping from the EOM aperture. We then magnify the beam to a diameter of 5 mm using the 4F telescope To aid the alignment of the system and the correct placement of the SLM plane onto the primary scan mirrors of the 2P microscope we implement a double mirror piston that allows us to change the optical path between the last lens and the plane of the primary galvos. The magnification of the telescope comprised by lenses L3-L4 is set to one while the L5-L6 telescope is set to 1.25. The final beam size on the primary galvo mirrors of the microscope is therefore ~ 6 mm.
Finally, the beams go through a linear polarizer that projects the two orthogonal polarizations into a single one causing them to interfere. We can control the final power ratio between the scanning and stationary beam by the combination of the first waveplate and the linear polarizer.
For all the experiments presented in the main manuscript, we used the Nikon CFI 16x, NA = 0.8, water immersion objective. We set the beam diameter equal to the size of the back aperture of the microscope objective therefore utilizing the full NA of the objective for the imaging experiments. One of the crucial steps in F-SHARP is the phase-stepping between the scanning (weak) and the stationary (strong) beams. We achieve that by separating the input light into two polarizations, each one associated with one of the scanning (horizontal) and the stationary (vertical) beams. We use an amplitude electro-optic modulator as a phase stepping device between the two beams of F-SHARP. In particular we used a

Phase stepping using an AM-EOM
Thorlabs EOM (Thorlabs EOM-AM-NR-C2) where the ordinary and extraordinary axes are rotated by 45° relative to the horizontal plane. To achieve a pure phase modulation, we first direct the beams through a half waveplate that rotates the input polarization so that each one of the scanning and stationary beams are aligned with one of the axes of the EOM. Changing the voltage that is applied on the EOM we can assign a phase difference between the two beams. The two polarizations then propagate through another half waveplate that restores their rotation to the original frame of reference. The two polarizations finally pass through a polarizing beam-splitter cube that splits them. The horizontal polarization is reflected off of the MEMS mirror -therefore being the scanning beam during the estimation of E-PSF, while the vertical one bounces off the wavefront shaping device. After their respective reflection, the two beams recombine through the same polarizing beam-splitter cube.
In order to separate the incoming beam from the outgoing one, we assign a small angle on both the MEMS mirror and the SLM so that the two beams end up spatially separated at a distance away from the reflection.
Finally, similar to the previous implementation of F-SHARP, to enforce the interference of the two beams, they propagate through a polarizer. The two orthogonal polarization thus project on the same axis of the polarizer and interfere.

Reconstruction of correction patterns
In F-SHARP we reconstruct the amplitude and phase of the scattered E-PSF inside the turbid medium by spatially scanning a weak copy of the scattered PSF against a strong stationary version of the PSF in two dimensions. This two-dimensional raster scanning is performed in the same manner as in a regular laser scanning microscope. The spatial extent of the scanning (the FOV in imaging terms) is defined by the opening angle of the secondary scanning mirror. Each acquired image contains a number of lines (typically 100) with a number of samples within each line (typically 100). The acquired pixel size (given by the lateral field of view over the pixel number) defines the spatial resolution of the reconstructed PSF. The maximum size of the pixel needs to be equal to half the wavelength of the light so that no information is lost during acquisition. On the other hand, the lateral extent of the measured PSF will singularly define the sampling at the pupil plane. One needs to capture the full extent of the scattered PSF which in turn will provide a reconstruction with the maximum number of modes that can be corrected.
In the performed experiments we acquired a 100 x 100 pixels image of the complex PSF inside the medium.
The scanning angle of the secondary scanning mirror was set such that the captured FOV was 30.3 by 30.3 μm 2 for the experiments presented in Fig. 3 and 20.8 by 20.8 μm 2 for those in Fig. 4. We calculate the number of modes contained within each correction pattern by taking the ratio between the area of the back aperture and the mean mode area. The mean mode area is calculated from the full width to half maximum of the autocorrelation of the correction pattern. The correction pattern in Fig. 3 contains ~ 360 modes, while the correction pattern in Fig. 4 ~ 132  On the other hand, the "corrected FOV" or "isoplanatic patch" will depend on the properties of the scattering medium and the so-called memory effect. This memory effect can either be of a tilt-tilt or shift-shift nature. Based on the above, we can reach the conclusion that the correction pattern that will effectively undo the scattering for the measured position within the FOV is directly given by the Fourier transform of the measured E-PSF. This Fourier transform equivalence is a direct outcome of the principle of optical phase conjugate and the optical properties of lenses and does not depend of the properties of the scattering medium (thick or thin, weak or strong scattering). At the same time, imaging deeper inside the brain (through thicker scattering tissue) will cause this correction pattern to decorrelate faster as we attempt to image areas around the original correction position therefore reducing the memory effect and limiting the corrected FOV.

Illumination of the SLM and effects on image correction
Both in pupil and conjugate aberration compensation techniques, the correction pattern is calculated for a single position within the FOV. When the scattering can be attributed to a single dominant scattering layer at a distance away from the imaging plane, the calculated correction pattern corresponds to a probing of this scatterer within the cone of the original excitation beam. We demonstrate that in Supplementary Figure   S3, where the mapped region of the scatterer is the one contained within the initial excitation cone. No information about the scatterer can be inferred around this original position (gray region of scatterer in Fig.   S3 left). However, when we start imaging locations around the original position where the correction was calculated for, the excitation beam will start encountering areas of the scatterer that have not been mapped by the original calculation pattern. If the excitation beam overfills the back-aperture of the microscope objective, this portion of the illumination will encounter the scatterer without any correction and will lead to a scattered contribution to the PSF on top of the corrected one. This scattered contribution to the PSF will decrease the quality of the image by adding background noise. In conjugate F-SHARP we can set the size of the excitation beam to be equal to the correction pattern in the SLM (equal to the aperture of the back-aperture of the microscope objective). In this case, at a different scanning position within the FOV, the correction pattern will be correctly superimposed with the "mapped" region of the scatterer while at the same time, the "unmapped" region will not be illuminated at all.

5.
Focus spot translation at image plane vs translation of the correction pattern against the back aperture In a telecentric imaging system, translating a focus spot in the image plane implies that the cone of light that creates this focus spot is translated by an equal amount against the front element of the microscope objective. This in turn means that the cone of light will be shifted against the scattering sample by an equal translation of the focus spot within the FOV. For proper scattering compensation at the new position, the modulated wavefront that encounters the scattering layer needs to be shifted by an equal amount in the opposite direction ( Figure S4). The ratio between the shifted distance against the scatterer (ΔxS) and the size of the diameter of the illuminating cone on the scatterer (wS), is equal to the ratio between the translation of the correction at the back aperture over the diameter of the back aperture. Therefore, we have . From Figure S4, we can see that the diameter of the illumination beam on the scatterer is w S = 2 * d S * tan inc , and inc = sin () NA.
In a scanning microscope, the position of the excitation beam within the FOV is approximately proportional to the deflection angle of the galvo mirrors and therefore to the control voltage of the galvo mirrors, Δ * = α * galvo with α being a scaling factor. Similarly, the translation of the correction pattern against the backaperture of the microscope objective is proportional to the deflection angle (control voltage) of the x and y conjugate galvo mirrors, Δ BA = * conj. galvo . Putting all the above together we have, conj. galvo = * w BA 2 * d S * tan 5sin () NA n IM 6 galvo Ultimately the above relationship gives us the relative scaling that needs to be applied to the conjugate galvo voltage (dependent on the NA and the distance of the scattering layer to the image plane) as a function of the voltage control of the spot scanning voltage. This translation will enforce the correct overlap of the correction pattern with the scattering layer. The signal that controls the conjugate galvo deflection is therefore a scaled version of the scanning galvo signal.