Remote z-scanning with a macroscopic voice coil motor for fast 3D multiphoton laser scanning microscopy

There is a high demand for 3D multiphoton imaging in neuroscience and other fields but scanning in axial direction presents technical challenges. We developed a focusing technique based on a remote movable mirror that is conjugate to the specimen plane and translated by a voice coil motor. We constructed cost-effective z-scanning modules from off-the-shelf components that can be mounted onto standard multiphoton laser scanning microscopes to extend scan patterns from 2D to 3D. Systems were designed for large objectives and provide high resolution, high speed and a large z-scan range (>300 μm). We used these systems for 3D multiphoton calcium imaging in the adult zebrafish brain and measured odor-evoked activity patterns across >1500 neurons with single-neuron resolution and high signal-to-noise ratio.


Introduction
Fast 3D imaging of large volumes at micrometer resolution is of high interest in the life sciences. In neuroscience, multiphoton laser scanning microscopy [1] is widely used for imaging of fluorescent calcium indicators to measure the activity of many neurons simultaneously in the intact brain [2][3][4][5]. However, large-amplitude scanning in the z-direction remains a challenge due to trade-offs between technical constraints and optical performance.
The most widely used methods for z-scanning are based on physical movements of the objective by piezo elements [6]. This approach is, however, limited by the inertia of the objective, may cause vibrations, and may exert pressure onto the sample through the immersion medium, particularly when the z-scan range is large. Movements of elements near the specimen can be circumvented by pre-focusing the laser beam with an electro-tunable lens [7] but this approach usually reduces the effective numerical aperture (NA) and strongly modulates the field of view (FOV). Alternatively, the beam can be manipulated with acousto-optical deflectors (AODs) [8][9][10], which allows for fast random-access scanning in 3D. However, AODs introduce aberrations and require elaborated techniques to compensate for optical and temporal dispersion. Acoustic gradient index lenses operating at a fixed kHz frequency induce aberrations and have disadvantages for conventional plane scanning [11,12].
A promising strategy for z-scanning is to insert a movable z-scan mirror into a conjugate focal plane of the specimen plane [13,14]. Axial movements of the remote z-scan mirror change the divergence of the excitation beam, resulting in axial movements of the focus ( Fig.  1(a)). High scan speeds can be achieved because the inertia of the mirror is minimal. When the optical magnification between the z-scan mirror and the sample is unity, the system can be aberration-free [14]. This strategy has been used successfully in a 3D multiphoton LSM [15] but the system has not been widely adopted, possibly because the beam path is complex and substantially different from that of a standard LSM. Moreover, for deep multiphoton imaging in the brain and other scattering media it is advantageous to use objectives with large back apertures (⌀ ≥18 mm) to maximize photon collection and the FOV [16][17][18]. Such objectives require an expansion of the excitation beam by a high-magnification telescope after the lateral scanning unit, which complicates the implementation of unity magnification.
We explored strategies for 3D multiphoton microscopy with a remote z-scan mirror that do not maintain unity magnification. We reasoned that effects of aberrations may be minor because multiphoton microscopy does not rely on the formation of an image on the detector. Moreover, aberrations caused by non-unity magnification may be small compared to other aberrations of the system and to resolution limitations due to scattering. The deviation from unity magnification enabled simple designs that do not require the use of a second high NAobjective for remote scanning. However, these designs required fast and accurate displacements of the z-scan mirror over large distances (>>1 mm). We found that this problem can be solved using a voice coil motor, an inexpensive device that is commonly used in low-to-mid frequency loudspeakers but also in industrial applications. Key features of voice coil motors are high positioning repeatability and high accelerations at low friction. Using this approach, a large axial scan range and high scan speeds could be achieved with minor loss of resolution.
The opto-mechanics of our z-scanning units (ZSUs) was contained in external modules that can be added onto a standard 2D multiphoton LSM. A compact z-scanning unit consisting of a single lens achieved an axial range of approximately 150 μm with an axial PSF of 2.6 -7 μm full width at half maximum (FWHM) using a high-NA objective (20x; NA 1.0) with a large back aperture (⌀ 18 mm). By extending the ZSU with a telescope, the z-scan range was increased to >300 μm at the same resolution. Effective volumetric flyback times were between 5 and 15 ms, depending on the desired axial scanning amplitude. Using a multiphoton LSM with 8 kHz resonant scanners, 9 planes with 256 lines each could be scanned at a volume rate of 6 Hz. Using this approach, we measured activity patterns across >1500 neurons in the adult zebrafish brain by multiphoton calcium imaging.

Concept and trade-offs
Remote z-scanning can be achieved by inserting a movable z-scan mirror into a conjugate focal plane of the specimen plane ( Fig. 1(a)) [14,15,19]. To implement this strategy in a laser scanning microscope (LSM) the excitation beam is passed through a ZSU containing an optional telescope with magnification M' = f 1 '/f 2 ' and a z-scan lens with focal length f z ( Fig.  1(b), 1(d)). Passage of the beam through the ZSU with minimal loss is achieved using a polarizing beam splitter (PBS) and a quarter-wave plate (QWP). When the distance between each pair of lenses is equal to the sum of their focal lengths (telecentric or 4f configuration [20]) and the magnification is unity (f o /M = f z /M', neglecting possible immersion media), the system is, in theory, aberration-free [14] and the axial position of the focus changes linearly with the axial position of the z-scan mirror. In the absence of a telescope in the ZSU (configuration 1, Fig. 1(b)) the displacement of the focus d relative to the focal plane f o of the objective L o is given by where D is the displacement of the z-scan mirror position relative to the focal plane of the zscan lens, L z . We analyzed the optical path using a linear propagation of Gaussian beams scheme. The underlying analytical derivations for this relation and all other equations in this paper have been documented and implemented in Mathematica (Wolfram), as we show in Code 1 (Ref [21].). In the presence of a telescope (configuration 2, Fig. 1(d)), the relation d(D) becomes Note that the telescope increases the axial scan range by a factor (f 1 '/f 2 ') 2 = M' 2 .  (1) is passed through the ZSU consisting of a single z-scan lens L z with focal length f z and the z-scan mirror (2) before reaching the xy scanners and the xy-scan lens L 2 (3). Directed passage of the beam is accomplished using a polarizing beam splitter (PBS) and a quarter-wave plate (QWP). The LSM consists of a scan lens (L 2 ) and a tube lens (L 1 ), which form a telescope with magnification M = f 1 /f 2 , and the objective (L o ). The minimum distance between the z-scan lens L z and the xy-scanners is x ZSU = 75 mm. (c) Experimental realization of configuration 1 (single-lens). The ZSU mounted onto the xy-scan unit is shown with correct relative scaling of the components. The discance x ZSU between the zscan lens and the xy-scanners is x ZSU = f z + x z = 75 mm. This distance is required to insert the polarizing beam splitter, contained inside the cube, and the quarter-wave plate into the beam path. The voice coil motor is shown in a cross-sectional view, illustrating the working principle based on the coil inside a mostly homogeneous magnetic field. The z-scan mirror is attached to the coil by a rod and a scaffold. The Hall position sensor is glued to the top of the voice coil motor (not shown). (d) ZSU configuration 2 (with telescope). A second telescope with magnification M' = f 1 '/f 2 ' is inserted into the beam path of the ZSU. This permits to maintain telecentric distances between the intermediate optics system and to increase the focal shift d by a factor M' 2 .
For previous implementations of this remote scanning strategy, a ZSU has been integrated into a LSM between the xy-scan mirrors and the xy-scan lens [15] or after the tube lens [19]. These implementations required relay beam paths that cannot be obtained by straightforward modifications of a standard LSM. We therefore considered integration of the ZSU in front of the xy-scan mirrors of a conventional 2D LSM ( Fig. 1(b), 1(c)). Ideally, the ZSU should be contained in an external module to permit simple "upgrading" of existing 2D LSMs to 3D. As our target application was multiphoton calcium imaging in the brain, our main requirements were (1) single-neuron resolution, (2) efficient filling of objectives with a large back aperture (⌀ ≥18 mm), (3) high axial scan speed, and (4) a large z-scan range (>100 μm; ideally >200 μm).
We assumed that a ZSU is added in front of a standard LSM with an objective (L o ; f o = 10 mm), tube lens (L 1 ; f 1 = 200 mm), xy-scan lens (L 2 ; f 2 = 50 mm), and xy-scan mirrors approximately in the focal plane of L2 ( Fig. 1(b), 1(d)). To accommodate the PBS and QWP, the distance x ZSU between the xy-scan mirrors and the first lens of the ZSU was assumed to be ≥75 mm ( Fig. 1(a)).

Configuration 1: single-lens ZSU
For the single-lens configuration, telecentricity requires that x ZSU = f z and thus f z ≥ 75 mm. However, a z-scan range >200 μm in the sample would then require an unrealistically large displacement range of the z-scan mirror. We therefore considered a z-scan lens with f z = 30 mm, resulting in deviations from the telecentric configuration with x z = 45 mm. The axial displacement d of the beam focus in the sample as a function of the z-scan mirror displacement D is then given by ( ) is nonlinear unless x z = 0, i.e. f z = 75 mm ( Fig. 2(a)). Similar non-linear effects occur when an electro-tunable lens and a fixed mirror are used instead of a fixed lens and a movable mirror since telecentricity is not maintained (not shown). The nonlinearity has two important consequences. First, the z-scan range in the sample is expanded for positive displacements D (towards L z ) and compressed for negative displacements D (away from L z ; Fig. 2(a)). Second, displacements of the z-scan mirror change the beam diameter R BA at the back aperture of the objective: R BA decreases in the positive D-direction (towards L z ) which may result in underfilling of the objective's back aperture ( Fig. 2(c)) and loss of resolution. In addition, displacements of the z-scan mirror can strongly modulate the FOV, as observed with an electro-tunable lens [7].

Configuration 2: ZSU with telescope
We next analyzed a ZSU with a telescope (Fig. 1d), which can maintain the telecentric configuration because f 2 ' can be chosen to be ≥75 mm. The relation d(D) is therefore linear ( Fig. 2(b)) and the axial scan range increases quadratically with the magnification of the telescope M' = f 1 '/f 2 ' (Eq. (2)). In addition, we obtain Since the second term is very small, R BA is almost independent of the z-mirror displacement D and, thus, determined almost exclusively by the scan and tube lenses in the LSM (f 1 /f 2 ). Filling of the objective's back aperture can therefore be maintained ( Fig. 2(c)). For practical reasons we chose f 1 ' = 150, f 2 ' = 75 mm (M' = 2) and f z = 30 mm. A scan amplitude of 10 mm thus translates into an axial scan range of approximately 550 μm ( Fig. 2(b)). Ray tracing showed that the beam diameter in the relay lenses can reach 40 mm for the extreme values of the z-scan range ( Fig. 2(c)). We therefore used 2-inch lenses for L' 1 and L' 2 and a 1-inch zscan lens L z .
Remote focusing using a telecentric configuration does not affect the FOV under the idealized assumption that the x-and y-scan mirrors are both positioned in the focal points of the relay lens L' 2 and the xy-scan lens L 2 . In theory, such a configuration can be achieved with relay optics between the mirrors. In most LSMs, however, the mirrors are displaced from the focal points of L' 2 and L 2 by a distance w. We used the linear ABCD scheme to calculate the expected effects on the FOV based on the deflection angle β at the xy-scanners. The size of the FOV is given by where R is the diameter of the incident beam and β is the x-or y-scan angle. The first term arises from xy scanning. The second term includes linear contributions of z-scanning (D) and the distance w. Because w is different for the x-and y-scan mirrors, the modulation of the FOV is asymmetric. The asymmetry is given by the difference between the slopes of the relationship FOV(D) in x-and y-direction, which is determined by the distance Δw between the x-and yscan mirrors. Assuming a realistic distance Δw ≈7 mm and the lens parameters given above, Eq. (6) predicts that FOV modulation is modest ( Fig. 2(d)). Because the expected practical consequences are minor, we did not introduce complex relay optics between the x-and y-scan mirrors.

Fast axial scanning using a voice coil motor
The ZSU configurations considered above require z-scan amplitudes on the order of 10 mm which is beyond the range of fast piezo elements. Typical step motors used for objective or stage positioning cannot achieve the desired speed because their settling times are usually >100 ms. We therefore explored voice coil motors for z-scanning, which can produce fast and repeatable movements in the centimeter range and short settling times.

LSM, ZSU and voice coil motor
For all parts in the described setup, only off-the-shelf components were used in order to facilitate adaptation of our design. We customized a multiphoton LSM (MOM; Sutter Instruments) with a 200 mm tube lens, a 50 mm scan lens and a 20x objective (NA 1.0, f o = 10 mm, Zeiss). The standard galvo xy-scanners were replaced by a galvo scanning/resonant scanning mirror pair (6215H and CRS 8 kHz, Cambridge Technology). The x-scan mirror was oval with a circular aperture of 5 mm and slightly smaller than the y-scan mirror. As a consequence, the maximum possible diameter of a non-divergent beam in the back focal plane of the objective was approximately 20 mm. xy-scanners were installed in a soundattenuating scan head (Thorlabs, MPM-SCAN4) that was fixed to the central rail of the MOM system by a clamp (Thorlabs). Data were acquired using a high speed board with up to four input channels (Alazartech, ATS9440). Acquisition was triggered by the 80 MHz sync signal of the pulsed laser (Mai Tai, Newport Spectra-Physics) to allow for time-locked sampling relative to the fluorescence emission. The acquired raw data (4096 data points per line) were binned to the desired lateral resolution using a multithreaded routine written in C and streamed to a solid-state disk (SSD). All other parts of the microscope control software were programmed in MATLAB, loosely based on an existing freely available software (Scanimage 4.2 [22]).
A polarizing beam splitter (PBS) and a λ/4-wave plate (QWP) were used to direct the beam through the ZSU [15]. The PBS was contained in a cube that was mounted directly onto the case of the xy scan unit (Fig. 1(c)). The PBS inside the cube could be replaced with a mirror to bypass the ZSU if desired. The cube accepted a standard adapter to a 2" cage system that contained the telescope for configuration 2 (Thorlabs). The scan mirror (protected gold mirror, ø 12.7 mm, Thorlabs) was glued to an M6 nut, which in turn was fixed to the shaft of a voice coil motor (VM6548, GeePlus, Fig. 1(c)). The voice coil motor type (VM6548, GeePlus) was chosen because it provides high accelerations and long strokes (up to 20 mm). Voice coil motors with less stroke length but lower coil mass and considerably faster dynamics are available but have not been tested here since the tested motor was already sufficiently fast. We compared two different servo drivers for the voice coil motor (DA4709, Electrocraft; Junus JSP-090-10, Copley Controls) and found that the DA4709 model provided better control and stability for our implementation. For positional feedback, we glued the pole of a lightweight hall sensor (LHK hall sensor, Megatron) to the back of the voice coil motor.

Speed, precision and repeatability of the voice coil motor movements
To achieve spatially and temporally homogeneous volume sampling we used sawtooth-like zscanning patterns. Within each z-scan period, multiple xy-planes are acquired during the slow movement of the z-scan mirror but no useful data is acquired during the fast return ("flyback"), resulting in a stack of images that are slightly tilted relative to the xy plane. To minimize the dead time during flyback, speed and acceleration of the z-scan mirror need to be sufficiently high. Assuming a desired volume scan rate ≥5 Hz, flyback times are desired to be <100 ms.
We tested whether z-scan mirror displacements with sufficient speed, amplitude, accuracy and repeatability can be produced by the voice coil motor. In order to determine the minimum possible flyback times we applied current inputs to generate sawtooth-like displacements and measured the trajectory of the coil. The amplitude of the current pulse was kept at maximum while the duration was varied between 2.5 ms and 50 ms. Because the position changes smoothly around the turning points, useful image data can be acquired not only during the slow phase but also during initial and final portions of the flyback period. We therefore operationally defined the effective flyback time as the time between 10% and 90% of the flyback amplitude. As expected, the effective flyback time increased almost linearly with the flyback amplitude. Nevertheless, the effective flyback time was short even when scan amplitudes were large. At a z-scan amplitude of 10 mm, the effective flyback time was approximately 15 ms (Fig. 3(d)).
We observed that the position of the voice coil can exhibit a slow drift in the absence of a position-dependent feedback. In order to stabilize the position on long time scales we therefore installed a computer-based slow control loop that read in the analog position output of the hall sensor, averaged the signal over one z-scan cycle, and compared it to the desired position. The difference was then proportionally fed on top of the fast z-scan signal using a simple differential amplifier (Fig. 3(e)). Closing the loop on this slow time-scale allowed for reliable positioning over very long timescales. The same circuit was used to ensure that successive scans started from the same z-position.

Z-scanning and optical performance
Using a ZSU with configuration 2 (telescope; f 1 ' = 150 mm, f 2 ' = 75, f z = 30 mm), the relation d(D) was linear with a focal shift of 56 μm per mm displacement of the z-scan mirror, as predicted by Eq. (2) (Fig. 2(b)). We also observed a modest change in FOV size that depended linearly on D, as predicted by Eq. (6). Hence, the remote focusing performance of ZSUs in both configurations was in good agreement with analytical predictions.
Basic optical performance was assessed by the point spread function (PSF). Calcium imaging of neuronal population activity in the brain usually requires fluorescence measurements inside neuronal somata with a diameter of 7 -25 μm. We therefore considered a PSF acceptable when the FWHM is ≤7 μm, although even lower values are preferred when activity is dense. Without a ZSU, the PSF of the LSM had a lateral FWHM of approximately 0.4 μm and an axial FWHM of 2.5 -3 μm, consistent with an optimized system with a similar objective [10].
With a ZSU in configuration 1, the PSF was not noticeably different when the z-scan mirror was in the zero-position (D = 0; lateral and axial FWHM approximately 0.4 μm and 2.6 μm, respectively; Fig. 4(a), 4(b)). Displacements of the z-scan mirror broadened the PSF (Fig. 4(a), 4(b)). This effect was more pronounced in negative direction (D < 0), presumably because the objective became progressively more underfilled (Fig. 2(c)). Hence, displacements in negative direction can expand the z-scan range due to the nonlinear relationship d(D) but also compromise resolution when filling of the objective back aperture cannot be maintained. The axial FWHM of the PSF remained ≤7 μm within a z-scan range of approximately Δz = 150 μm ( Fig. 4(a)). This range required a displacement of the z-scan mirror by ca. 18 mm, resulting in an effective flyback time of 30 ms.
With a ZSU in configuration 2, the PSF was again not noticeably different from the control condition without ZSU when the z-scan mirror was in the zero-position (D = 0; lateral and axial FWHM approximately 0.4 μm and 2.6 μm, respectively; Fig. 4(c), 4(d)). Displacements of the z-scan mirror broadened the PSF but this effect was less pronounced than in configuration 1 (Fig. 4(c), 4(d)). A PSF with an axial FWHM between 2.6 and 7 μm could be maintained throughout a z-scan range Δz of 370 μm (Fig. 4(c)). As a consequence of the 2x magnification by the telescope, this z-scan range required a displacement D of the zscan mirror by only ca. 8 mm, resulting in an effective flyback time of ca. 12 ms (Fig. 3(d)). Displacements of the z-scan mirror (D ≠ 0) may broaden the PSF primarily because the deviation from unity magnification between the z-scanning mirror and the specimen plane introduces aberrations [14]. Alternatively, broadening of the PSF may be caused primarily by other factors, e.g. clipping of the beam at apertures such as the xy-scan mirrors, imperfect corrections of lenses, or effects of planar components such as the dichroic on strongly divergent beams. To examine whether deviations from non-unity magnification play a major role we replaced the 30 mm z-scan lens by a 20x objective identical to the objective of the LSM. The magnification from the z-scan mirror to the sample was therefore increased from ca. 0.17 to 0.5 while most of the beam path remained unchanged (Fig. 2(c)). Consistent with theoretical predictions Eq. (2), axial focus shifts d were more sensitive to displacements of the z-scan mirror D but the relationship remained linear (not shown). However, no obvious improvement of the PSF was observed compared to the configuration using a 30 mm z-scan lens (Fig. 4(c); dashed curve). We therefore hypothesize that the resolution was limited mainly by imperfections of optical components and/or by beam clipping at apertures, rather than by aberrations due to non-unity magnification.

Multiphoton calcium imaging in the adult zebrafish brain
The performance of ZSUs in practical applications was tested by 3D multiphoton calcium imaging of odor-evoked activity patterns in an ex-vivo preparation of the adult zebrafish brain [23]. Calcium signals were measured in stable transgenic lines expressing the genetically encoded fluorescent calcium sensor GCaMP6f [24] under the control of a fragment of the neurod promotor (Tg(NeuroD:GcaMP6F) icm05 ). To generate this line, the coding sequence of GCaMP6f was amplified by PCR from plasmid pGP-CMV-GCaMP6F (Addgene) and used to generate pME-GCaMP6F in a BP recombination reaction (Gateway system; Invitrogen). Subsequently, p5E-NeuroD [25], pME-GCaMP6F, p3E-poly(A), and pDest-pA2 were recombined in a 3-fragment LR reaction to generate NeuroD:GCaMP6f. This construct was injected into zebrafish embryos at the 1-cell stage in the following mixture: 35 ng/µL Tol2 transposase mRNA, 25 ng/µL NeuroD:GCaMP6F, 0.1 M KCl, 0.2% phenol red. F 0 larvae were screened for fluorescence, raised, and the transgenic insertion Tg(NeuroD:GcaMP6F) icm05 was identified in F 1 larvae. Imaging was performed in the olfactory bulb (OB) or in the posterior zone of the dorsal telencephalon (Dp), the teleost homolog of olfactory cortex. These brain areas contain small neurons (usually ≤10 μm) and have strongly curved surfaces.
Odors were applied to the nose using a custom-built odor delivery system. Figure 5 shows results obtained from the OB using a ZSU with configuration 1 (single-lens; f z = 30 mm). Four planes with 512 x 512 pixels each were sampled at a volume rate of 7.5 Hz (Fig. 5(a)). Spacing of the planes was not even because d(D) was nonlinear. The centers of the first and last planes were separated by Δz center = 75 μm. Because the planes were slightly tilted relative to the optical axis, the z-scan range between the extreme points was larger (Δz full = 105 μm). Individual neurons could be clearly resolved in all planes. Expression of GCaMP6f was observed in subsets of neurons including mitral cells, the projection neurons of the OB, and interneurons. Characteristic neuropil regions of the OB, the olfactory glomeruli, were identified based on the high density of neuronal processes.
Most previous studies analyzed responses of neurons in the zebrafish OB to short odor presentations (<3 s) [26,27]. Here we analyzed responses to longer stimuli, which are likely to be physiologically relevant [27,28]. Two odors (25 μM alanine [Ala] and food extract) were applied for 40 s each while data were acquired continuously for 200 s (see Visualization 1). During each stimulus application, changes in fluorescence intensity relative to the baseline before odor application (ΔF/F) were calculated for each pixel. In these activity maps, individual somata and neuronal processes could be clearly resolved (Fig. 5(b), 5(c)). In order to analyze the dynamics of odor responses we defined regions of interest (ROIs) corresponding to 182 somata and 33 glomeruli and determined the time course of fluorescence changes (ΔF/F) in each ROI over the full 200 s. We then extracted the first three principal components (PCs) from the time series of all ROIs (Fig. 5(d)). Each PC thus represents a fundamental component of the dynamics of the population activity. We then computed the correlation coefficient between the time course of the fluorescence in each pixel and each PC to obtain three correlation maps per image plane, one for each PC. The three correlation maps were then combined into single RGB images (Fig. 5(e)). The final RGB image thus represents the contribution of each PC to the dynamics of the fluorescence signal in each pixel. This analysis showed that PC1, which captured the time course of stimulus presentation, contributed strongly to responses of glomerular neuropil regions. The temporally more complex PCs 2 and 3, in contrast, were correlated mainly with responses of dispersed subsets of somata. Sharp morphological representations of individual neurons and even their processes could be resolved in correlation maps of all four image planes. Similar results were obtained in additional experiments in the OB and Dp (11 experiments in 3 fish). Together, these results demonstrate that volumetric multiphoton calcium imaging with high resolution and signal-to-noise ratio can be achieved using a ZSU with configuration 1 throughout a z-scan range of at least 100 μm. Figure 6 shows results obtained from anterior Dp using a ZSU with configuration 2 (telescope). Nine sagittal planes, each with 512 x 256 pixels, were imaged at a volume scan rate of 6 Hz. The z-scan range was Δz center = 238 μm and Δz full = 267 μm (Fig. 6(c), 6(d)), covering the full depth of anterior Dp. Homogeneous expression of GCaMP6f was observed throughout anterior Dp. Assuming a scattering length of l s = 200 μm [30], it is likely that scattering of the excitation light compromised image resolution in the deep planes. Consistent with this assumption, the apparent sharpness of images decreased slightly with depth. No obvious decrease in sharpness was observed in the most superficial planes even though the displacement of the z-scan mirror D was larger than for the deep planes. These observations indicate that scattering of the excitation light had a larger influence on resolution than remote focusing. Overall, however, resolution remained high throughout the full z-scan range because individual somata with diameters down to 5 μm could be clearly resolved in all planes.
Two odors (25 μM Ala and food extract) were applied twice for 40 s each during continuous data acquisition for 400 s (see Visualization 2). ROIs corresponding to 1507 somata ( Fig. 6(b)) were outlined manually and classified into four clusters by the k-means algorithm based on their fluorescence time courses. The first and second clusters showed different excitatory on-and off-responses to the two odors ( Fig. 6(e), red and blue) while the third cluster (green) was inhibited by both odors. Each ROI was RGB-coded as in Fig. 5(e) based on the Pearson correlation coefficient between its fluorescence time course and the mean time courses of the first three clusters. This analysis allowed us to map the modes of the population response that are represented by the first three clusters to somata throughout anterior Dp (Fig. 6(b)). While a band of neurons near the caudal end of anterior Dp was primarily associated with cluster 2, no obvious topographic organization was observed in other regions. Moreover, responses of individual ROIs were diverse and often not closely associated with a single cluster ( Fig. 6(f)). High spontaneous activity was observed at intermediate depths but odor responses occurred throughout all planes. Similar results were obtained in 64 experiments in 8 fish. These results demonstrate that ZSUs with configuration 2 allow for efficient multiphoton imaging of neuronal activity throughout large volumes.

Discussion
We developed simple and versatile methods for fast 3D multiphoton laser scanning microscopy by remote focusing with a movable z-scan mirror. Imaging the z-scan mirror into the specimen plane with unity magnification can prevent aberrations [14] but imposes technical constraints. We released the constraint of unity magnification and found that the resulting aberrations had only minor effects on resolution throughout a large z-range. This enabled the development of self-contained ZSUs that can be added onto standard LSMs. Using these ZSUs, the activity of large numbers of neurons was measured in the intact zebrafish brain with high speed and resolution. The use of a voice coil motor permitted fast and precise displacements of the z-scan mirror over large distances to produce focal shifts >500 μm. The speed allowed for axial sawtooth scanning with effective flyback times of 5 -15 ms, enabling highly efficient data collection. Using standard 8 kHz resonant scanners, 2D images with 256 or 512 lines can be acquired at ca. 60 or 30 Hz, respectively. At a volume scan rate of 6 Hz it is therefore possible to acquire data from 9 image planes with 256 lines or 4.5 image planes with 512 lines. The high speed and accuracy of voice coil motors may also be exploited for fast long-range positioning of optical components in a broad range of other applications [19,31,32].
Effects of remote focusing on the PSF were modest and appeared to be dominated by imperfections of optical components rather than by aberrations due to non-unity magnification. Using a ZSU in configuration 2 (with telescope), broadening of the PSF was minimal within a commonly used z-scan range of 100 -150 μm (50 -75 μm in each direction; Fig. 4(c), 4(d)). A PSF with an axial FWHM ≤7 μm was maintained throughout a zscan range of ~370 μm. Theoretically, broadening of the PSF may be further reduced by detailed simulations and optimizations of optical components in the ZSU. However, at high imaging depth, resolution is typically compromised by scattering of excitation light [30]. Further improvements of the PSF are therefore expected to produce only minor practical benefits unless other limiting effects are also compensated.
Compared to piezo-based movements of the objective [6], z-scanning with a remote mirror has the advantage that it is not limited by the inertia of the objective. This is particularly important when heavy objectives are used to image large FOVs [33]. Moreover, no pressure variations are transduced to the sample through the immersion medium. Unlike approaches using electro-tunable lenses or acoustic gradient index lenses [7,11], purely mechanical z-scanning avoids imperfections of tunable components. 3D multiphoton microscopy of large volumes with optical performance similar to ours can be achieved using AODs but this approach requires complex equipment to compensate for undesired optical effects [10].
Our ZSUs have been developed primarily for multiphoton imaging of somatic calcium signals throughout large volumes in the intact brain. To maximize photon collection in strongly scattering tissue we accommodated large objectives in order to maintain a high effective NA. Homogeneous sampling throughout a volume was achieved using sawtooth-like scan patterns but other scan patterns including 3D line trajectories could also be generated. The limiting scan frequency of voice coil motors with large stroke is ~100 Hz. In principle, frequencies in the kHz range could be achieved using voice coil motors with smaller stroke when an objective is used as a z-scan lens. However, such high frequencies are of interest mainly for line scanning, which can also be performed using other methods [9,10,15]. Other approaches for fast homogeneous sampling of large volumes are light sheet or light field microscopy [34,35]. However, multiphoton scanning microscopy is expected to provide higher resolution in a regime of strong scattering. Moreover, unlike light sheet microscopy, it does not require optical access from different directions, which is often difficult to achieve in vivo.
Besides optical performance and speed, important goals governing the design of our ZSUs were simplicity, versatility and cost-effectiveness. All components can be obtained off-theshelf at a total cost of <2,500 EUR. Importantly, ZSUs can be added onto standard LSMs without modifying the LSM itself, allowing for upgrades of existing instruments. We explored two possible configurations. Configuration 1 includes a single lens and is very compact. Because it does not maintain telecentricity, optical performance depends strongly on the z-scan range and z-scanning is not linear. However, these effects are modest within a zscan range up to approximately 150 μm. This design is therefore attractive for applications that require small z-scan ranges. Configuration 2 contains a telescope and is slightly more complex. Scanning behavior is linear, allowing for equal spacing of image planes, and optical performance is maintained over an extended z-scan range. This design is therefore useful for a wider range of applications including 3D scanning of large volumes.
Multiphoton calcium imaging of neuronal activity patterns in the intact brain is an important approach to analyze neuronal codes and information processing by neuronal circuits. ZSUs for remote focusing provide a simple solution to extend multiphoton calcium imaging to the third dimension without major compromises on optical performance or functionality. We measured odor-evoked calcium signals in the intact zebrafish brain in