Optical simulations of long corrected microendoscopes.

A) Ray-trace simulation for the microendoscope based on the 6.4 mm-long GRIN rod. Left: rays of 920 nm light are relayed from the objective focal plane to the imaging plane. Labels indicate geometrical parameters of the microendoscope components. Right: profile of the corrective aspherical lens that maximizes the microendoscope FOV in the optical simulation shown on the left. B) Same as (A) for the microendoscope based on the 8.8 mm-long GRIN rod. C, D) Optical performance of simulated microendoscope based on the 6.4 mm-long GRIN rod. C) Strehl ratio as a function of the field radial distance (zero indicates the optical axis) for the corrected (blue) and the uncorrected (red) microendoscope. The black horizontal dashed line indicates the diffraction-limited threshold according to the Maréchal criterion 23. The black vertical dashed lines mark the abscissa values of the intersections between the curves and the diffraction-limited threshold. D) Lateral (x, y) and axial (x, z and y, z) intensity profiles of simulated PSFs on-axis (distance from the center of the FOV d = 0 µm) and off-axis (at the indicated distance d) for the uncorrected (left) and the corrected microendoscope (right). Horizontal scale bars: 1 µm; vertical scale bars: 10 µm. E, F) Same as (C, D) for the microendoscope based on the 8.8 mm-long GRIN rod.

Fabrication of corrective lenses using 3D microprinting and assembly of long microendoscopes.

A) Scanning electron microscopy image of the 3D microprinted replica of the corrective lens for the 6.4 mm-long corrected microendoscope. Scale bar: 100 µm. B) Same as (A) for the 8.8 mm-long microendoscope. C) Molding procedure for the generation of corrective lens replica. Freshly prepared PDMS is casted onto a corrective aspherical lens printed with 2P lithography (1). After 48 hours, the solidified PDMS provides a negative mold for the generation of lens replica (2). A small drop of optical UV-curable glue is deposited onto the mold (3). The mold filled by glue is covered with a glass coverslip, which is gently pressed against the mold (4). The optical glue is polymerized with UV light (5). The coverslip with the attached polymeric lens replica is detached from the negative mold (6). Object dimensions are not to scale. D) Exploded view of the corrected microendoscope assembly.

Optical characterization of long corrected microendoscopes shows improved spatial resolution over an enlarged FOV.

A) Representative x (horizontal), z (vertical) projection of a z-stack of a subresolved fluorescent layer acquired with the uncorrected (top) or corrected (bottom) microendoscope based on the 6.4 mm-long GRIN rod. λexc = 920 nm; scale bars: 50 pixels. B) Thickness (mean values ± standard error of the mean (s.e.m.)) of the layer as a function of the distance from the center of the FOV for uncorrected (red, n = 4) or corrected (blue, n = 4) microendoscopes. The thickness of the film is measured as the FWHM of the Gaussian fit of the fluorescence intensity along segments orthogonal to the tangential line to the section of the film and located at different distances from the center of the FOV (see yellow labels on the bottom image). C, D) Same as (A, B) for the microendoscope based on the 8.8 mm-long GRIN rod. E) The distortion of the FOV in uncorrected and corrected microendoscopes is evaluated using a calibration ruler. The magnification factor is defined as the ratio between the nominal and the real pixel size of the image and shown as a function of the radial distance for uncorrected (red, n = 3) or corrected (blue, n = 3) microendoscopes. Data are shown as mean values ± s.e.m.. Fitting curves are quartic functions f(x) = ax4 + bx2 + c (see also Supplementary Table 3 for details). F) Same as (E) for the microendoscope based on the 8.8 mm-long GRIN rod. G-J) The spatial resolution of microendoscopes was measured acquiring z-stacks of subresolved fluorescent beads (bead diameter: 100 nm) located at different radial distances using 2PLSM (λexc = 920 nm). G) Representative x, y and x, z projections of a fluorescent bead located at a radial distance of 75 µm, imaged through an uncorrected (left) or a corrected (right) 6.4 mm-long microendoscope. Horizontal scale bars, 2 µm; vertical scale bars, 5 µm. H) Same as G) for the microendoscope based on the 8.8 mm-long GRIN rod. I) Axial (left) and lateral (right) resolution (i.e. average size of the x, z and x, y projections of imaged beads, respectively) as a function of the radial distance from the center of the FOV for uncorrected (red) and corrected (blue) probes. Each data point represents the mean value ± s.e.m. of n = 4-24 beads imaged using at least m = 3 different 6.4 mm-long microendoscopes. Fitting curves are quartic functions f(x) = ax4 + bx2 + c (see Supplementary Table 4 for details). The horizontal black dash-dotted line indicates the axial resolution threshold of 10 µm. The black triangles indicate the intersections between the threshold and the curves fitting the data and mark the estimated radius of the effective FOV of the probes. J) Same as (I) for the microendoscopes based on the 8.8 mm-long GRIN rod.

Experimental measurement of enlarged effective FOV in long corrected microendoscopes.

The values of the effective FOV radius for uncorrected and corrected microendoscopes were estimated from the intersection between the arbitrary threshold of 10 µm on the axial resolution and the quartic function fitting the experimental data of Fig. 3I, J.

Aberration correction in long GRIN lens-based microendoscopes enables high-resolution imaging of biological structures over enlarged FOVs.

A) jGCaMP7f-stained neurons in a fixed mouse brain slice were imaged using 2PLSM (λexc = 920 nm) through an uncorrected (left) and a corrected (right) microendoscope based on the 6.4 mm-long GRIN rod. Images are maximum fluorescence intensity (F) projections of a z-stack acquired with a 5 µm step size. Scale bars: 50 µm. Left: the scale applies to the entire FOV. Right, the scale bar refers only to the center of the FOV; off-axis scale bar at any radial distance (x and y axes) is locally determined multiplying the length of the drawn scale bar on-axis by the corresponding normalized magnification factor shown in the horizontal color-coded bar placed below the image (see also Fig. 3, Supplementary Table 3, and Materials and Methods for more details). B) Same results for the microendoscope based on the 8.8 mm-long GRIN rod.

Long corrected microendoscopes sample more homogeneously simulated neuronal activity across the FOV.

A) Median fluorescence intensity (F) projections of representative synthetic t-series for the uncorrected (left) and the corrected (right) 6.4 mm-long microendoscope. Cell identities were detected using CITE-ON 30 in n = 13 simulated t-series for both the uncorrected and corrected microendoscopes and cellular activity traces were extracted. Green rectangular boxes mark cell identities that have peak SNR of the activity trace higher than a threshold set to peak SNR = 15. Scale bars: 50 µm. Left: the scale applies to the entire FOV. Right: the scale bar refers to the center of the FOV; off-axis scale bar at any radial distance (x and y axes) is locally determined multiplying the length of the drawn scale bar by the corresponding normalized magnification factor shown in the horizontal color-coded bar placed below the image. B) Number of detected cell identities in simulated FOV as a function of peak SNR threshold imposed on cellular activity traces. Data are mean values ± s.e.m. for both the uncorrected (red) or corrected (blue) case. Statistical significance is assessed with Mann-Whitney U test; *, p < 0.05; ***, p < 0.001. C) Maximal distance from the center of the FOV at which a cell is detected as a function of peak SNR threshold. Data are mean values ± s.e.m. for both the uncorrected (red) and corrected (blue) case. Statistical significance is assessed with Mann-Whitney U test; **, p < 0.01; ***, p < 0.001; n.s., non significant. D) Same as (A) for the 8.8 mm-long microendoscope. E, F) Same as (B, C) for n = 15 simulated t-series for both the uncorrected and corrected 8.8 mm-long microendoscope.

Long corrected microendoscopes enable more precise collection of simulated activity signals from individual cellular sources and decrease cross-contamination between adjacent cells.

A) Fraction of adjacent cell pairs (distance between detected cell centroids ≤ 25 µm) that are more correlated that expected (expected pair correlation was estimated as mean Pearson’s correlation between ground truth activity traces of any possible neuronal pairs plus 3 standard deviations) as a function of the peak SNR threshold imposed on extracted activity traces for n = 13 simulated experiments with the 6.4 mm-long uncorrected (red) and corrected (blue) microendoscope. B) 2D projection of the intersection between the 3D FOV and the 3D ground truth distribution of light sources for a representative uncorrected (left) and corrected (right) synthetic t-series obtained with a 6.4 mm-long microendoscope. The color scale shows the number of overlapping sources that are projected on the same pixel. White boxes mark cell identities detected using CITE-ON 30 without any threshold on the peak SNR of activity traces. Scale bars: 50 µm. Left: the scale applies to the entire FOV. Right: the scale bar refers to the center of the FOV; off-axis scale bar at any radial distance (x and y axes) is locally determined multiplying the length of the scale bar by the corresponding normalized magnification factor shown in the horizontal color-coded bar placed below the image. C) Purity index of extracted traces with peak SNR > 10 was estimated using a GLM of ground truth source contributions and plotted as a function of the radial distance of cell identities from the center of the FOV for the uncorrected and corrected microendoscopes. Black lines represent the linear regression of data ± 95% confidence intervals (shaded colored areas). Slopes ± standard error (s.e.): uncorrected, (-0.0020 ± 0.0002) µm-1; corrected, (-0.0006 ± 0.0001) µm-1. Uncorrected, n = 1365; corrected, n = 1156. Statistical comparison of slopes, p < 10-10, permutation test. D) Distribution of the Pearson’s correlation of extracted activity traces with the first (most correlated) ground truth source for n = 13 simulated experiments with the 6.4 mm-long uncorrected (red) and corrected (blue) microendoscope. Median values: uncorrected, 0.25; corrected, 0.73; the p is computed using the Mann-Whitney U test. E) Pearson’s correlation ± s.e.m. of extracted activity traces with the first (most correlated) ground truth emitter as a function of the radial distance for n = 13 simulated experiments with the 6.4 mm-long uncorrected (red) and corrected (blue) microendoscope. F-J) Same as (A-E) for n = 15 simulated experiments with the 8.8 mm-long uncorrected and corrected microendoscope. H) Slopes ± s.e.: uncorrected, (-0.0031 ± 0.0003) µm-1; corrected, (-0.0010 ± 0.0002) µm-1. Uncorrected, n = 808; corrected, n = 1328. Statistical comparison of slopes, p < 10-10, permutation test. I) Median values: uncorrected, 0.43; corrected, 0.46; the p is computed using the Mann-Whitney U test.

Enlarged FOV population imaging of ventral regions of the brain with long corrected microendoscopes in awake mice.

A) Schematic showing injection of the viral solution in the mouse piriform cortex. B) Representative section of fixed brain tissue showing the position of the GRIN lens implant. jGCaMP7f fluorescence is shown in red. NeuroTrace (Neurotrace) Nissl staining is shown in cyan. C) Schematic showing the experimental preparation for 2P corrected microendoscope imaging in awake mice. D) Top and bottom: example of FOV with excitatory neurons expressing the calcium sensor jGCaMP8f, obtained using the 8.8 mm-long corrected microendoscope in the mouse PC. The bottom image shows the rectangular boxes (green) indicating the position of detected neurons generated by CITE-ON (see Materials and Methods, 30). On-axis scale bar: 20 µm; for off-axis scale bar, refer to the magnification factor bar below the image (see Materials and Methods). E) Representative jGCaMP8f activity traces extracted from the recording shown in (D) through eight minute-long continuous 2P imaging recordings (λexc = 920 nm) in an awake head-fixed mouse.

Unbiased population imaging in the piriform cortex of awake mice using long corrected microendoscopes.

A) Left: schematic representation of trace parameters used to compute peak SNR. The red solid line marks the maximum value of the trace, while the red dashed line indicates the standard deviation of intensity values below the 25th percentile of the intensity distribution of the entire trace (see Materials and Methods). Right: peak SNR of calcium traces extracted from individual cells as a function of radial distance of the cell (n = 240 neurons from m = 6 FOV). The red line is the linear regression of data points: intercept ± s.e. = 19 ± 2; slope ± s.e. = (0.03 ± 0.02) µm-1. The slope is not significantly different from zero, p = 0.18, permutation test. B) Left: schematic representation showing pairs of neurons and distance definitions for the Pearson’s correlation analysis shown on the right (in red, distance between “adjacent neurons” dpair ≤ 25 µm). Right: Pearson’s correlation of calcium traces from “adjacent neurons” as a function of radial distance of the pair centroid from the center of the FOV (n = 195 adjacent neuron pairs from m = 6 FOV). The red line represents the linear regression of data points: intercept ± s.e. = 0.41 ± 0.03; slope ± s.e. = (-0.0006 ± 0.0004) µm-1. The slope is not significantly different from zero, p = 0.089, Wald test. C) Left: schematic representation of neuron pairs used for the analysis on the right (any possible dpair). Right: Pearson’s correlation of calcium traces from pairs of neurons as a function of the distance between them (n = 4767 pairs from m = 6 FOV). The red line is the linear regression of data points: intercept ± s.e. = 0.288 ± 0.005; slope ± s.e. = (-87 ± 4) · 10-5 µm-1. The slope is significantly different from zero, p = 2 · 10-5, permutation test.

Characteristics of commercially available (commercial) and customized (custom) GRIN rods used for simulation and fabrication of aberration corrected microendoscopes.

All GRIN rods were obtained from GRINTECH GmbH, Jena, DE.

Working distance of uncorrected and corrected microendoscopes based on long GRIN lenses obtained with ray-trace simulations shown in

Fig. 1.

Characterization of polymeric corrective lens replicas.

A) Stylus profilometer measurements were performed along the radius of the corrective polymer microlens replica for the 6.4 mm-long corrected microendoscope. Data are mean values (black solid line) ± s.e.m. (black dashed lines) obtained from n = 3 profile measurements on m = 3 different corrective lens replicas. The red dashed line indicates the profile of the simulated corrective lens (see Fig. 1). B) Same as (A) for the 8.8 mm-long microendoscope.

The total number of detected adjacent cell pairs decreases faster with peak SNR threshold than the number of adjacent cell pairs more correlated than expected does.

A) Number of adjacent cell pairs more correlated than expected (solid lines) and total number of detected adjacent cell pairs (dashed lines) as a function of the peak SNR threshold for the uncorrected (red, left) and the corrected (blue, right) 6.4 mm-long microendoscope (see also Fig. 6A). Values are normalized to their value at peak SNR threshold = 10. B) Same as (A) for the 8.8 mm-long microendoscope (see also Fig. 6F).

Aberration correction enables more accurate measurement of population activity.

A) Pearson’s correlation of adjacent cell pairs as a function of the radial distance from the center of the FOV in simulated calcium data. Pairs of cells were defined as adjacent if the distance between detected cell centroids was ≤ 25 µm. Pearson’s correlation is displayed only for cell pairs which are more correlated that expected (expected pair correlation was estimated as mean Pearson’s correlation between ground truth activity traces of any possible neuronal pairs plus 3 standard deviations, see Supplementary Table 5). Data are displayed only for cells with peak SNR > 15 from n = 13 simulated experiments with the 6.4 mm-long uncorrected (red) and corrected (blue) microendoscope. Black lines represent the linear regression of data ± 95% confidence intervals (shaded colored areas). Slopes ± s.e.: uncorrected, (0.003 ± 0.002) µm- 1, significantly different from zero, p = 0.00080, permutation test; corrected, (-0.00003 ± 0.00060) µm-1, not significantly different from zero, p = 0.88, permutation test. Uncorrected, n = 102; corrected, n = 172. Statistical comparison of slopes, < 10-10, permutation test. B) Mean purity index (see Materials and Methods for definition) of extracted traces as a function of the peak SNR threshold for n = 13 simulated experiments with the 6.4 mm-long uncorrected (red) and corrected (blue) microendoscope. Statistical differences of the means are assessed with the permutation test; **, p < 0.01; ***, p < 0.001. C) Same as (A) for n = 15 simulated experiments with the 8.8 mm-long uncorrected and corrected microendoscope. Slopes ± s.e.: uncorrected, (0.001 ± 0.002) µm-1, not significantly different from zero, p = 0.41, permutation test; corrected, (0.0008 ± 0.0013) µm- 1, not significantly different from zero, p = 0.20, permutation test. Uncorrected, n = 96; corrected, n = 152. Statistical comparison of slopes, p = 0.86, permutation test. D) Same as (B) for n = 15 simulated experiments with the 8.8 mm-long uncorrected and corrected microendoscope. *, p < 0.05; ***, p < 0.001; n.s., not significant.

Parameters of the polynomial function describing the aspherical surface of simulated corrective lenses.

Parameters of equation (1) (see Materials and Methods) for the simulated corrective lens designed to be applied to the GRIN rods of length 6.4 mm (top row) and 8.8 mm (bottom row).

Spatial resolution of simulated uncorrected and corrected microendoscopes.

Axial and lateral resolution of simulated microendoscopes were evaluated measuring the dimensions of simulated 2P PSF for each probe at different radial distances. x, z (Axial) and x, y (Lateral) intensity profiles of simulated PSFs were fitted with Gaussian curves and their FWHM was used to define the resolution, as done for experimental PSFs (see Materials and Methods).

Parameters used for the computation of the local pixel size and for distance calibration of images acquired with microendoscopes.

Coefficients of the quartic functions fitting the measurements performed on images acquired on the calibration ruler for uncorrected and corrected microendoscopes based on the 6.4 mm-long GRIN rod (left) and the 8.8 mm-long GRIN rod (right). The numbers in parenthesis indicate the 95% lower and upper confidence bounds (see Fig. 3E, F). R-square values are indicated for each fit.

Fitting parameters for PSF measurements of uncorrected and corrected microendoscopes.

Coefficient of quartic functions fitting experimental PSF data (axial, top; lateral, bottom) are presented for uncorrected and corrected microendoscopes based on the 6.4 mm-long GRIN rod (left) and the 8.8 mm-long GRIN rod length (right). Parentheses indicate the 95% lower and upper confidence bounds (see Fig. 3I, J). R-square values are indicated for each fit.

Expected Pearson’s correlation of cell pair in synthetic calcium data.

Numerical values used to estimate the expected correlation between cell pairs in synthetic calcium t-series are indicated for each microendoscope type. The table displays the mean and standard deviation of Pearson’s correlation between the activity traces of any possible ground truth source neuron pair obtained from n simulated FOV and the expected cell pair correlation (mean Pearson’s correlation plus three standard deviations). These parameters were used for the analysis in Fig. 6A, F and in Supplementary Fig. 3A, C.

Linear regression analysis for pairwise correlation of adjacent neurons as a function of the radial distance of pair centroid.

The values of the slope of the linear fits are indicated ± standard error for adjacent neurons with maximum centroid distance equal to 25 µm (top) or 30 µm (bottom). Results obtained with jGCaMP8f, jGCaMP7f, and with the merged dataset including both jGCaMP8f and jGCaMP7f are displayed. The number n of adjacent neuron pairs, the p value of the indicated statistical test for the normality of residuals, and the p value of the Wald test on the null hypothesis of slope = 0 are indicated for each condition.