Abstract
Two-photon calcium imaging in awake, head-fixed animals enables the measurement of neuronal activity during behaviour. Often, licking for the retrieval of water reward is used as a measurable report of the animal's decision during reward-driven behaviour. However, licking behaviour can induce severe motion artifacts that interfere with two-photon imaging of cellular activity. Here, we describe a simple method for the online correction of licking-induced focus shifts for two-photon calcium imaging of neocortical neurons in the head-fixed mouse. We found that licking causes a stereotyped drop of neocortical tissue, shifting neurons up to 20 μm out of focus. Based on the measurement of licking with a piezo film sensor, we developed a feedback model, which provides a corrective signal for fast optical focus adjustments with an electrically tunable lens. Using online correction with this feedback model, we demonstrate a reduction of licking-related focus changes below 3 μm, minimizing motion artifact contamination of cellular calcium signals. Focus correction with a tunable lens is a simple and effective method to improve the ability to monitor neuronal activity during reward-based behaviour.
Key points
In order to understand the underlying behaviour of neuronal circuit dynamics, it is necessary to monitor brain activity in the awake, behaving animal.
Licking to obtain water reward is an approach that is often used to measure an animal's decision during reward-based behaviour tasks.
In head-fixed mice, licking produces stereotyped brain motion that interferes with two-photon calcium imaging of neuronal activity.
We describe a method to provide online optical correction of licking-induced brain motion during two-photon imaging using refocusing with an electrically tunable lens.
Online correction of licking-induced brain motion improves the measurement of neuronal activity during reward-based behaviour.
Introduction
In order to understand the neuronal circuits underlying behaviour, it is necessary to monitor brain activity in the behaving animal. In recent years, in vivo two-photon calcium imaging in the awake, head-fixed mouse has emerged as a paradigm in which activity from tens to hundreds of individual neurons can be measured during sensory processing, decision making and motor movement (Dombeck et al. 2007, 2009; Nimmerjahn et al. 2009; Andermann et al. 2010; O’Connor et al. 2010; Harvey et al. 2012; Huber et al. 2012; Petreanu et al. 2012; Xu et al. 2012; Chen et al. 2013). Two-photon imaging provides single-cell resolution to relate functional neuronal signals to the organization of anatomical circuits and identified cell types. With genetically encoded calcium indicators (GECIs) (Knopfel, 2012), single-cell activity can now be followed chronically during learning and plasticity (Huber et al. 2012; Margolis et al. 2012).
However, as a high-resolution imaging technique, two-photon microscopy is susceptible to motion artifacts arising from heartbeat, breathing and motor movements which can interfere with neuronal activity measurements (Dombeck et al. 2007; Laffray et al. 2011; Paukert & Bergles, 2012). A considerable effort has been made to reduce or correct for such motion artifacts either online or post hoc. Using various algorithms post hoc, progress has been made in correcting for motion in the x–y plane for two-dimensional (2-D) frame scan acquired data (Dombeck et al. 2007; Greenberg & Kerr, 2009; Bonin et al. 2011). Post hoc correction is possible partly as a result of the fact that motion within the focal plane typically does not lead to the loss of entire cells from the imaging frame, unless they are located near the edge of the frame. If motion is slow relative to the frame acquisition rate, simple image registration using affine transformations (Thevenaz et al. 1998) is sufficient to correct for lateral shifts. If faster movements occur during frame scanning, more sophisticated algorithms are required to account for within-frame distortions (Dombeck et al. 2007; Greenberg & Kerr, 2009). Motion correction along the z-axis (the optical axis) is, however, more difficult and remains a challenge. z-motion can produce large fluctuations in measured fluorescence intensity that can interfere with calcium signal measurements as cells move orthogonally to the focal plane. These fluctuations can be estimated, but with a limited ability for correction (Greenberg & Kerr, 2009; Bonin et al. 2011). More severely, given the optical sectioning provided by two-photon imaging (Helmchen & Denk, 2005), cells can intermittently move entirely out of the focal plane, rendering post hoc z-correction of 2-D data impossible.
Licking behaviour has been identified as a major source of z-axis motion in multiple species (Roe, 2007; Andermann et al. 2010; Petreanu et al. 2012). For rodents, licking upon a lick port sensor to retrieve water is an approach that is often used to measure the reporting of a decision during reward-based behaviour tasks (Andermann et al. 2010; Komiyama et al. 2010; O’Connor et al. 2010; Huber et al. 2012; Petreanu et al. 2012; Xu et al. 2012; Chen et al. 2013; Mayrhofer et al. 2013). Therefore, the reduction in motion artifacts during licking in such tasks is vital to ensure the correct measurement of neuronal activity in critical movements of decision making or reward reinforcement. One solution to account for z-motion during two-photon imaging is fast three-dimensional (3-D) scanning using a piezoelectric focusing element (Andermann et al. 2010). Such a device can rapidly move the microscope objective, enabling measurements of neuronal calcium signals in 3-D (Gobel et al. 2007; Katona et al. 2011). Alternative approaches for fast 3-D imaging have been based on the modulation of the divergence of the laser beam entering the microscope objective, using, for example, a remote galvanometric z-scanner (Botcherby et al. 2012), acousto-optic lenses (Kirkby et al. 2010; Katona et al. 2012) or an electrically tunable lens (ETL) (Grewe et al. 2011). The ETL approach, in which the surface curvature of a liquid lens is changed with a voice coil-actuated ring exerting pressure onto an outer reservoir zone, is particularly interesting because of its low cost and simplicity.
Post hoc correction of motion artifacts is, however, difficult for 3-D imaging implementations that employ 3-D line scans (Gobel et al. 2007; Katona et al. 2011, 2012) or random-access scanning (Kirkby et al. 2010; Grewe et al. 2011; Katona et al. 2012). Volume imaging using 3-D trapezoidal scanning, however, does enable z-motion correction, as a single 2-D plane in the centre of the volume containing the cells of interest can be preserved within an ∼50-μm-thick volume and hence recovered for each frame (Andermann et al. 2010, 2011; Kerlin et al. 2010). Nonetheless, 3-D volume scanning to account for z-motion is not ideal for two reasons. First, 3-D volume scanning typically lowers the effective sampling rate compared with 2-D frame scanning (given equivalent signal-to-noise levels; i.e. similar pixel dwell times). Thus, when imaging at higher speed is desired, one would prefer to correct for z-motion during 2-D frame scanning. The second problem is that the main advantage of 3-D volume scanning, the ability to monitor a larger number of neurons compared with 2-D scanning, is compromised in post hoc approaches because z-motion still may result in the loss of cells at the upper and lower borders of the imaging volume. Whenever possible, it is therefore desirable to correct z-motion online.
Thus far, strategies for online z-motion correction have been employed in only few in vivo two-photon imaging studies. Stereotyped brain motion arising from heart beat-induced tissue pulsations can be minimized using electrocardiogram signals to trigger image acquisition at defined periods in the heart beat cycle (Nimmerjahn et al. 2005; Paukert & Bergles, 2012). In another example, general z-motion of the spinal cord has been compensated for in a closed-loop manner by illuminating the tissue surface, analysing the reflected pattern by a second imaging system, and updating the objective's position to maintain a constant distance to the sample (Laffray et al. 2011). Here, we describe a novel approach for online correction of licking-related z-motion during two-photon imaging in the neocortex of awake mice, employing a behaviour-driven feedback system in which licking triggers fast, compensatory remote focus adjustments with an ETL.
Methods
Animal preparation
All experimental procedures followed the guidelines of the Veterinary Office of Switzerland and were approved by the Cantonal Veterinary Office in Zurich. Stereotaxic viral and tracer injections were performed on three young adult (P35-42) male wild-type C57Bl6 mice under anaesthesia (1.5% isofluorane/O2), as described previously (Margolis et al. 2012). AAV6-EF1α-YC-Nano140 (300 nl, ∼1 × 109 vg/μl) (Chen et al. 2013) was delivered into S1, targeting L2/3 (1.1 mm posterior to the bregma, 3.3 mm lateral, ∼300 μm below the pial surface). To allow the long-term visualization of in vivo neuronal activity, a cranial window was implanted over S1 under anaesthesia (1.5% isofluorane/O2) at 1 day post-injection, as described previously (Margolis et al. 2012). A metal post for head fixation was implanted on the skull, contralateral to the cranial window, using dental acrylic. One week following chronic window implantation, mice were handled daily for 1 week whilst being acclimated to a minimum of 15 min of head fixation (Chen et al. 2013). Mice were water restricted for the remainder of the experimental time course.
Animal behaviour
Behaviour was performed using a data acquisition interface (USB-6008, National Instruments, Austin, TX) and custom-written LabVIEW software (National Instruments) to control devices required for the task, including ETL focusing, and for the recording of trial and licking data. Licking behaviour was detected using a piezo film sensor (MSP1006-ND, Measurement Specialties, Hampton, VA) mounted to a water port, and triggered the delivery of water (5–6 μl) through a miniature rocker solenoid valve (0127, Buerkert, Ingelfingen, Germany). A trial consisted of a 5 s pre-stimulus period, followed by the presentation of a 2 s discontinuous 2093 Hz auditory cue tone. Licking during cue tone presentation resulted in immediate water delivery paired with a 2093 Hz/2793 Hz auditory reward tone. A standard infrared CCD camera (Monocor, Bremen, Germany) was used to monitor non-licking-related body movements. Measurements of false-positive and false-negative lick detection were performed by comparing video of licking behaviour acquired using a high-speed CMOS camera (A504k, Basler, Ahrensburg, Germany) at 100 Hz to visually identify licks with licks detected from the piezo film sensor.
Two-photon imaging
We used a custom-built two-photon microscope controlled by HelioScan (Langer et al. 2013), equipped with a Ti:sapphire laser system (∼100 fs laser pulses, Mai Tai HP, Newport Spectra Physics, Santa Clara, CA), a water immersion objective (40×LUMPlanFl/IR, 0.8 NA, Olympus, Tokyo, Japan), galvanometric scan mirrors (model 6210, Cambridge Technology, Bedford, MA) and a Pockel's Cell (Conoptics, Danbury, CT) for laser intensity modulation (Fig. 1A). An ETL (EL-C-10-30-VIS-LD, tuned to a focal length range of +50 to +200 mm, 10 mm clear aperture, Optotune AG, Dietikon, Switzerland) was installed at the rear aperture of the microscope objective, together with an offset lens (LC4232, −100 mm focal length fused silica lens, Thorlabs, Newton, NJ) (Grewe et al. 2011) (Fig. 1A and B). The ETL was controlled by a custom current controller delivering a stable current output from 0 to 200 mA at a maximum of 5 V. The behaviour data acquisition interface provided an analogue voltage signal (0–10 V) to the ETL controller for focusing. For calcium imaging, YC-Nano140 was excited at a wavelength of 840 nm and resolved with blue (480/60 nm) and yellow (542/50 nm) emission filters. Blocks of 10 trials (60–80 s long) were acquired at 15 Hz with 192 × 64 pixel resolution. To determine the z-positions of calcium imaging frames, a 3-D volume stack was acquired at 1 μm z-steps, 50 μm above and below the desired imaging plane, at the end of the imaging session, whilst mice were anaesthetized (1.5% isofluorane/O2). The point-spread function of the microscope with ETL installed was determined by the acquisition of a 3-D volume stack consisting of 0.1 μm fluorescent beads embedded in 1% agarose and analysed using the MetroloJ ImageJ plugin (Cole et al. 2011).
Figure 1. Licking-induced brain motion during two-photon imaging.
A, schematic diagram of behaviour and microscope set-up. PMTs, photomultiplier tubes. B, schematic diagram of electrically tunable lens (ETL) and negative offset lens placement on top of the objective (top) providing remote focusing (bottom). C, in vivo images of cortical neurons expressing YC-Nano140 at different imaging depths obtained from a reference z-stack during anaesthesia (left) and during behaviour at the equivalent depths (right, averages of clustered images). Scale bar, 20 μm. D, example trial of cued licking behaviour and z-motion during the imaging time course. The measured z-position is plotted together with the voltage signal acquired from the lick sensor. Coloured dotted lines indicate the z-position corresponding to the images shown in (C). Individual licks were detected by application of a threshold (shaded red area) to the lick sensor trace. Periods of licking are indicated (grey region) together with inter-lick intervals (bottom).
Online lick-based z-motion correction
Online z-motion correction was implemented as a modular component in LabVIEW and integrated into the behaviour software framework (see File S1). Lick-induced deflections of the piezo film sensor were recorded as analogue voltage signals, digitized at 100 Hz and converted in the software to binary signals corresponding to individual licks by thresholding at ±0.05 V from baseline. Lick signals were then used to trigger kernels representing the voltage signal applied to the ETL necessary to generate the appropriate corrective z-motion. We created two kernels (A and B) from a tooth-shaped function with a rise time of 0.06 s and a decay time of 1.5 s (see Fig. 3). Kernel A had an additional shoulder extending for 3 s after the peak of the tooth component. Both kernels were smoothed with a second-order low-pass Butterworth filter with a cut-off frequency of 1 Hz. The amplitudes of the initial peak (kernel A and B) and shoulder (kernel A) were manually adjusted online during imaging for each animal by selecting values that minimized z-motion according to visual inspection.
Figure 3. Online correction reduces lick-induced brain z-motion.
A, kernels used for motion correction. The original kernel (grey) is filtered into the resulting smoothed trace (blue) for electrically tunable lens (ETL) focusing. B, conditions during licking for triggering correction kernels. C, example of z-motion with online correction during imaging time course. Measured z-position plotted together with the applied z-correction from the resulting triggered kernels according to the detected licks. Periods of licking are indicated (grey region) with inter-lick intervals (bottom). D, average z-motion from one animal across several trials sorted according to one-bout (left) and two-bout (right) events. Trials are aligned to the first detected lick. Shaded region indicates SD. Blue trace represents kernels A and B superimposed over z-motion (n= 6 one-bout trials, n= 5 two-bout trials). E, z-correction in three different animals. Normalized histogram of z-positions during licking periods without (top) and with (bottom) online correction. Shaded region indicates ±3 μm.
Kernels were triggered on the basis of the following conditions. Kernel A was triggered by a single lick occurring >4 s after a previously triggered kernel A. A second lick (<0.5 s inter-lick interval) was required for kernel A to continue, otherwise the kernel was cancelled and the z-position returned to the original position. An additional kernel B was triggered by two licks (<0.5 s inter-lick interval) detected within 1.6–4 s after a previously triggered kernel A. The resulting voltage signal corresponding to the z-position was updated at a frequency of 50 Hz and delivered from the behaviour data acquisition interface to the ETL current controller for online focus adjustment.
Data analysis
Two-channel (cyan fluorescent protein/yellow fluorescent protein, CFP/YFP) calcium imaging data were imported into MATLAB (Mathworks, Natick, MA) for analysis. A time series for z-motion during behaviour imaging was obtained by summing the time series data from two channels into one in order to improve the signal-to-noise. With the resulting imaging frames, a pair-wise image correlation was performed across the time series. Frames were then clustered into 10–15 distinct groups, in which frames of the same group typically shared high correlation values (> 0.9), indicating near-identical z-position. For each group, a reference image was obtained by averaging across all clustered frames, and the relative z-position was manually determined with a precision of 1 μm by visual comparison with an image stack acquired at the end of the same session whilst the animals were anaesthetized. Through this method, the z-position for ∼95% of the imaging frames could be determined. The remaining frames with low correlation to all clustered groups usually exhibited image distortions, particularly shearing, as a result of the low frame acquisition rate. At these remaining time points, the z-position was calculated by interpolating across the time series.
For the analysis of calcium indicator fluorescence recordings, Hidden Markov Model line-by-line motion correction was first applied to both data channels (Dombeck et al. 2007). Background subtraction (bottom first percentile fluorescence signal across the entire movie) was then performed on each channel. Regions of interest corresponding to individual neurons were manually selected from the mean image of a single-trial time series using ImageJ (National Institutes of Health, Bethesda, MD, USA). For each region of interest, mean pixel values were calculated for the time series for both channels. Relative changes in single-channel fluorescence F for CFP and YFP, respectively, were expressed as ΔF/F= (F–F0)/F0. In order to account for slow changes in baseline fluorescence F0 as a result of photo-bleaching, a dynamic F0 was used, representing the bottom eighth percentile of F across a sliding window of 20 s. Ratiometric calcium signals were expressed as relative YFP/CFP ratio changes ΔR/R= (R–R0)/R0. In order to account for slow changes in R0 as a result of differential photo-bleaching of CFP and YFP, a dynamic R0 was used, representing the bottom eighth percentile of R across a sliding window of 20 s.
Results
Licking-induced brain motion is stereotyped
We first characterized the pattern of z-motion in the brain associated with goal-directed licking. Adult, wild-type mice were injected with adeno-associated virus (AAV) expressing the GECI YC-Nano140 (Horikawa et al. 2010) into layer 2/3 (L2/3) of whisker barrel cortex (S1). After implantation of a cranial window over the injection site and a small head post, mice were habituated to head fixation. Mice were water deprived and subsequently trained to lick a water port in order to obtain water reward in response to a 2 s auditory cue tone presented at 5 s intervals. Mice could learn to lick primarily during cue periods within two behaviour sessions (data not shown). Licking behaviour was recorded using a piezo film sensor sampled at 100 Hz. The lick sensor signal was subsequently thresholded above electronic noise levels to obtain a binary signal corresponding to forceful licks. High-speed video of licking behaviour aligned with the lick sensor signal indicated that licks were detected with a false-negative rate of 20.4 ± 2.8% (mean ± SEM) as a result of licking that did not directly or forcefully contact the lick port, and a false-positive rate of 15.9 ± 5.3% typically resulting from the recoil of the lick port immediately following a forceful lick (n= 54 trials). The lick signal was used to trigger valve opening for water delivery. In vivo two-photon calcium imaging of YC-Nano140-expressing neurons was performed during licking behaviour. We used a two-photon microscope equipped with galvanometric mirrors acquiring 2-D frame scan images at 15 Hz (Fig. 1A). An ETL was also installed for fast remote focusing (Fig. 1B), but was not used in the initial experiments so that z-motion could be measured during non-corrected conditions. z-motion during licking was quantified by clustering imaging frames with high cross-correlation into groups and assigning z-positions to these clusters based on a reference 3-D image stack (Fig. 1C and D; see Methods). In addition, video data of the mouse in the experimental set-up were acquired using a conventional CCD camera to visually confirm licking behaviour and to identify non-licking-related brain motion, such as from limb movement or changes in body posture. Trials with excessive non-licking-related brain motion were excluded from the analysis.
During cue-driven licking behaviour, animals typically displayed bouts of licking consisting of 5–10 rapid licks (0.35–5 Hz) occurring over a 1–2 s period (Figs 1D and 2A). For each cue presented, bouts occurred either as a single event or as two events occurring in quick succession (0.7–2.0 s between bouts). These two-bout events were observed more frequently in well-trained animals and probably occur such that the first bout serves to trigger water delivery, whereas the second bout is associated with drinking of the dispensed water. We examined whether individual animals displayed stereotyped brain z-motion during either one-bout or two-bout events. Licking was always accompanied by an upwards shift of the focal plane (5–20 μm) resulting from brain tissue sinking. This range was beyond the tolerable z-resolution of our two-photon microscope (point-spread function, full width at half-maximum, Δx= 0.45 ± 0.09, Δy= 0.45 ± 0.03, Δz= 2.66 ± 0.20 μm, n= 5 beads) (Fig. 2B). During one-bout events, displacement was typically observed about 0.40 ± 0.14 s prior to the detected first lick, reaching maximum displacement within 0.49 ± 0.12 s after the first lick and returning to the original focal plane 2.49 ± 0.20 s after the first lick depending on the duration of the lick bout. During two-bout events, the focal plane remained slightly displaced (∼70% of maximum displacement) during the period between the first and second bout, and then quickly returned to the original focal plane after the second bout. Although the amplitude of z-motion during licking bouts was largely consistent for a given animal, the overall maximum amplitude of z-motion varied (5–20 μm) from animal to animal.
Figure 2. Licking-induced brain z-motion is stereotyped.
A, average licking rate from one animal for one-bout (left) and two-bout (right) events aligned to the first detected lick. Shaded region indicates SD. B, average z-motion from one animal across several trials sorted according to one-bout (left) and two-bout (right) events. Trials are aligned to the first detected lick. Shaded region indicates SD (n= 15 one-bout trials, n= 26 two-bout trials).
Online correction of licking-induced brain motion
Based on the analysis of licking-induced brain motion, we derived an algorithm that would provide an online signal to instruct corrective ETL focusing during licking-related z-motion. Rather than applying a correction for each individual lick and to minimize the influence of rare false-positive and false-negative lick events, we corrected for bouts of licking by applying kernels emulating the general path of licking-induced z-motion. Licking bouts were identified online by measuring the inter-lick interval between the current and the immediately preceding lick, which was used to trigger one of two possible correction kernels: kernel A, correcting for one-bout events or the first bout of a two-bout event, and kernel B, correcting for the second bout of a two-bout event (Fig. 3A; see Methods). Kernel B shares the same initial shape as kernel A, but is shorter to account for the different z-motion occurring during the second of two-bout events. To provide an immediate response to licking-induced z-motion, a single detected lick is sufficient to trigger kernel A, but a second lick (<0.5 s inter-lick interval) is required to allow the kernel to continue. To account for random, sparse licks producing little or no z-motion, a single first lick without any additional rapid licks signals a false start and the immediate cancellation of the kernel event (Fig. 3B). If multiple additional licks (<0.5 s inter-lick interval) are detected within 1.6–4 s of the initial trigger for kernel A, indicating the presence of a two-bout event, kernel B is triggered to correct for the second bout (Fig. 3B).
We compared the degree of licking-induced z-motion in animals with or without this correction algorithm (Video S1). Online z-motion correction reduced licking-induced z-movement to less than ± 3μm for both one- and two-bout events (Fig. 3C and D). To account for animal-to-animal variability in the degree of licking-induced z-motion, we manually adjusted the amplitude of the kernels for each animal, such that z-motion was reduced to similar ranges across all animals during online correction (Fig. 3E).
Finally, we compared the effect of z-motion correction on fluorescence-based calcium measurements. As a fluorescence resonance energy transfer-based indicator, YC-Nano140 enables ratiometric measurements that are less susceptible to motion artifacts compared with single-wavelength fluorescence measurements because motion-induced YFP and CFP fluorescence intensity changes cancel out in the YFP/CFP ratio. By analysing the YFP or CFP fluorescence intensity, either individually or as the YFP/CFP ratio, we could distinguish between signal fluctuations caused by motion or true calcium influx, respectively. The non-ratiometric analysis also provides us with an estimate for the degree of motion contamination expected for commonly used calcium indicators, such as Oregon Green BAPTA-1 or GCaMPs (Grienberger & Konnerth, 2012). We measured the fluorescence of single neurons during non-corrected and corrected trials following Hidden Markov Model line-by-line motion correction to correct for any xy-motion under both conditions (Dombeck et al. 2007). Licking events during non-corrected trials resulted in up to 50%ΔF/F changes for YFP or CFP signals between licking and non-licking periods, whereas online z-correction reduced such fluctuations to less than 10% (Fig. 4A and B). z-correction also reduced fluctuations in the YFP/CFP ΔR/R value, making calcium transients more readily identifiable. Accounting for animal-to-animal variability in the maximum amplitude of z-motion, online correction reduced the difference in YFP or CFP ΔF/F signals between licking and non-licking periods in all animals tested (Fig. 4C and D; P < 0.05, paired Student's t test).
Figure 4. z-correction improves measurements of calcium signals.
Example calcium traces from an imaged neuron: A, without correction; B, with correction. z-position (top) with coloured dotted lines indicating z-position corresponding to image of neuron (right). Periods of licking (raster plot and grey area) are shown, together with traces for changes in fluorescence intensity (ΔF/F) for cyan fluorescent protein (CFP) or yellow fluorescent protein (YFP), as well as the YFP/CFP ratio (ΔR/R) representing calcium signals. Histograms comparing the distribution of ΔF/F for CFP or YFP between licking (grey) and non-licking (red) periods are indicated. Asterisks indicate putative calcium transients. C, licking-related fluorescence changes expressed as the absolute difference in mean CFP intensity between licking and non-licking periods for trials with or without correction in three different animals. Black circles indicate the mean of individual cells shown in grey. A similar analysis for YFP intensity is shown in D (error bars = SEM) (*P < 0.05, **P < 0.01).
Discussion
We have introduced a method for online correction of licking-induced z-motion during two-photon imaging. We find that licking produces stereotyped brain motion, which can be corrected for by dynamic ETL focusing controlled by the activation of a lick sensor and an empirically derived feedback model.
Although the mechanism underlying licking-induced brain motion is unclear, we speculate that it could result from displacement of the brain relative to the cranial window produced by the lowering of the jaw during licking. The amplitude of z-motion can vary by animal, but the degree of z-motion can be determined in initial measurements to adjust the amplitude of the correction kernels accordingly. Application of online motion correction has thus far been validated here for motion within cortical L2/3 (<250 μm below the pial surface). Animal-to-animal variability in the amplitude of z-motion might be dependent on the imaging depth, although this has not been tested, and is also likely to be partly dependent on the cranial window preparation. Flush contact of the cover slip with the brain's surface seems to be critical for keeping motion low. Multiple, stacked cover glasses have been used to help stabilize brain tissue and to dampen licking-related z-motion (Andermann et al. 2010; Huber et al. 2012; Petreanu et al. 2012). Our online correction method may alleviate the need for multiple cover glasses, which can produce optical aberrations during imaging, reducing image and signal quality.
Our method for online motion correction uses behaviour-based feedback, expanding on previous approaches for the correction of other body-related movements, such as heart beat-triggered imaging acquisition (Paukert & Bergles, 2012). Recently, an optical-based adaptive movement compensation, using a piezoelectric focusing element, has been demonstrated in the spinal cord to provide a general solution for online motion correction (Laffray et al. 2011). However, this approach requires additional costly equipment and the effectiveness has yet to be demonstrated in brain tissue in vivo where it is likely to be dependent upon the imaging depth. Although geared for a specific source of motion, our approach is comparatively simpler and more cost-effective to implement, taking advantage of existing components normally implemented during reward-driven behaviour paradigms.
The ETL produces axial focus shifts by modulating the laser beam divergence. When positioned directly at the objective's rear opening, as here, it produces changes in the field-of-view size during focusing (Grewe et al. 2011). However, for focus shifts of 10–20 μm, as required in our application, this magnification change is only in the range of ∼1–2% and thus has negligible effect on the acquired images. Given the relatively slow velocity (∼75 mm/ms) and small range of the observed z-motion, the ETL could also be substituted by other focusing devices, such as a piezo-scanning element (Gobel et al. 2007; Katona et al. 2011) or a remote focusing mirror (Botcherby et al. 2012). Vice versa, the ETL could be used as an alternative focusing element in an optical closed-loop correction system (Laffray et al. 2011).
The key significance of online motion correction lies in the minimization of data loss for structures of interest. In our application, this particularly improves the continuous collection of functional calcium signals from individual cells. Clearly, the additional application of a post hoc registration algorithm is possible. In general, the reduction in motion-associated fluctuations in fluorescence intensity should aid in the detection and inference of action potential firing from calcium signal measurements (Yaksi & Friedrich, 2006; Greenberg et al. 2008; Vogelstein et al. 2009, 2010; Grewe et al. 2010; Cheng et al. 2011). Although not demonstrated here, this should also improve calcium signal measurements in subcellular structures, such as axons and dendrites, which are thin and often extend horizontally along the imaging plane (Petreanu et al. 2012; Xu et al. 2012; Glickfeld et al. 2013). In addition, our approach could be combined with 3-D volume scanning to provide z-correction of 3-D volume data, ensuring that no intermittent data loss occurs for structures at the upper and lower planes of the volume.
Finally, our correction of licking-induced brain motion suggests that other behaviours producing stereotyped brain motion can potentially be corrected for using behaviour feedback from appropriate motion or force sensors. This could aid in the collection of imaging data during behavioural tasks involving locomotion, reaching, grasping and other motor movements.
Acknowledgments
We thank B. L. Schneider for viral reagents and M. Blum and M. Aschwanden (Optotune AG) for providing the ETL for the experiments.
Glossary
- 2-D
two-dimensional/two dimensions
- 3-D
three-dimensional/three dimensions
- AAV
adeno- associated virus
- CFP
cyan fluorescent protein
- ETL
electrically tunable lens
- GECI
genetically encoded calcium indicator
- YFP
yellow fluorescent protein
Additional information
Competing interests
None.
Author contributions
J.L.C. and O.A.P. conceived of the study; J.L.C. and D.J.M prepared the animals; J.L.C, D.J.M. and O.A.P. performed imaging experiments; O.A.P. developed and implemented online motion correction; F.F.V. built the two-photon microscope and provided technical assistance; J.L.C. and O.A.P. analysed and interpreted the data; J.L.C. and F.H. supervised the study; J.L.C. and O.A.P. wrote the manuscript with input from all authors. All authors approved the final version of the manuscript.
Funding
This work was supported by grants from the Swiss National Science Foundation (310030–127091; F.H.), the Swiss SystemsX.ch initiative (project 2008/2011-Neurochoice, F.H), an AMBIZIONE grant from the Swiss National Science Foundation (D.J.M.), Forschungskredit of the University of Zurich (grant 541541808, J.L.C.) and a fellowship from the US National Science Foundation, International Research Fellowship Program (grant 1158914, J.L.C.).
Author's present address
D. J. Margolis: Department of Cell Biology and Neuroscience, Rutgers University, New Brunswick, NJ 08854, USA.
References
- Andermann ML, Kerlin AM, Reid RC. Chronic cellular imaging of mouse visual cortex during operant behaviour and passive viewing. Front Cell Neurosci. 2010;4:3. doi: 10.3389/fncel.2010.00003. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Andermann ML, Kerlin AM, Roumis DK, Glickfeld LL, Reid RC. Functional specialization of mouse higher visual cortical areas. Neuron. 2011;72:1025–1039. doi: 10.1016/j.neuron.2011.11.013. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bonin V, Histed MH, Yurgenson S, Reid RC. Local diversity and fine-scale organization of receptive fields in mouse visual cortex. J Neurosci. 2011;31:18506–18521. doi: 10.1523/JNEUROSCI.2974-11.2011. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Botcherby EJ, Smith CW, Kohl MM, Debarre D, Booth MJ, Juskaitis R, Paulsen O, Wilson T. Aberration-free three-dimensional multiphoton imaging of neuronal activity at kHz rates. Proc Natl Acad Sci U S A. 2012;109:2919–2924. doi: 10.1073/pnas.1111662109. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chen JL, Carta S, Soldado-Magraner J, Schneider BL, Helmchen F. Behaviour-dependent recruitment of long-range projection neurons in somatosensory cortex. Nature. 2013;499:336–340. doi: 10.1038/nature12236. [DOI] [PubMed] [Google Scholar]
- Cheng A, Goncalves JT, Golshani P, Arisaka K, Portera-Cailliau C. Simultaneous two-photon calcium imaging at different depths with spatiotemporal multiplexing. Nat Methods. 2011;8:139–142. doi: 10.1038/nmeth.1552. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Cole RW, Jinadasa T, Brown CM. Measuring and interpreting point spread functions to determine confocal microscope resolution and ensure quality control. Nat Protocols. 2011;6:1929–1941. doi: 10.1038/nprot.2011.407. [DOI] [PubMed] [Google Scholar]
- Dombeck DA, Graziano MS, Tank DW. Functional clustering of neurons in motor cortex determined by cellular resolution imaging in awake behaving mice. J Neurosci. 2009;29:13751–13760. doi: 10.1523/JNEUROSCI.2985-09.2009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Dombeck DA, Khabbaz AN, Collman F, Adelman TL, Tank DW. Imaging large-scale neural activity with cellular resolution in awake, mobile mice. Neuron. 2007;56:43–57. doi: 10.1016/j.neuron.2007.08.003. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Glickfeld LL, Andermann ML, Bonin V, Reid RC. Cortico-cortical projections in mouse visual cortex are functionally target specific. Nat Neurosci. 2013;16:219–226. doi: 10.1038/nn.3300. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gobel W, Kampa BM, Helmchen F. Imaging cellular network dynamics in three dimensions using fast 3D laser scanning. Nat Methods. 2007;4:73–79. doi: 10.1038/nmeth989. [DOI] [PubMed] [Google Scholar]
- Greenberg DS, Houweling AR, Kerr JN. Population imaging of ongoing neuronal activity in the visual cortex of awake rats. Nat Neurosci. 2008;11:749–751. doi: 10.1038/nn.2140. [DOI] [PubMed] [Google Scholar]
- Greenberg DS, Kerr JN. Automated correction of fast motion artifacts for two-photon imaging of awake animals. J Neurosci Methods. 2009;176:1–15. doi: 10.1016/j.jneumeth.2008.08.020. [DOI] [PubMed] [Google Scholar]
- Grewe BF, Langer D, Kasper H, Kampa BM, Helmchen F. High-speed in vivo calcium imaging reveals neuronal network activity with near-millisecond precision. Nat Methods. 2010;7:399–405. doi: 10.1038/nmeth.1453. [DOI] [PubMed] [Google Scholar]
- Grewe BF, Voigt FF, van't Hoff M, Helmchen F. Fast two-layer two-photon imaging of neuronal cell populations using an electrically tunable lens. Biomed Opt Express. 2011;2:2035–2046. doi: 10.1364/BOE.2.002035. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Grienberger C, Konnerth A. Imaging calcium in neurons. Neuron. 2012;73:862–885. doi: 10.1016/j.neuron.2012.02.011. [DOI] [PubMed] [Google Scholar]
- Harvey CD, Coen P, Tank DW. Choice-specific sequences in parietal cortex during a virtual-navigation decision task. Nature. 2012;484:62–68. doi: 10.1038/nature10918. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Helmchen F, Denk W. Deep tissue two-photon microscopy. Nat Methods. 2005;2:932–940. doi: 10.1038/nmeth818. [DOI] [PubMed] [Google Scholar]
- Horikawa K, Yamada Y, Matsuda T, Kobayashi K, Hashimoto M, Matsu-ura T, Miyawaki A, Michikawa T, Mikoshiba K, Nagai T. Spontaneous network activity visualized by ultrasensitive Ca(2+) indicators, yellow Cameleon-Nano. Nat Methods. 2010;7:729–732. doi: 10.1038/nmeth.1488. [DOI] [PubMed] [Google Scholar]
- Huber D, Gutnisky DA, Peron S, O’Connor DH, Wiegert JS, Tian L, Oertner TG, Looger LL, Svoboda K. Multiple dynamic representations in the motor cortex during sensorimotor learning. Nature. 2012;484:473–478. doi: 10.1038/nature11039. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Katona G, Kaszas A, Turi GF, Hajos N, Tamas G, Vizi ES, Rozsa B. Roller Coaster Scanning reveals spontaneous triggering of dendritic spikes in CA1 interneurons. Proc Natl Acad Sci U S A. 2011;108:2148–2153. doi: 10.1073/pnas.1009270108. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Katona G, Szalay G, Maak P, Kaszas A, Veress M, Hillier D, Chiovini B, Vizi ES, Roska B, Rozsa B. Fast two-photon in vivo imaging with three-dimensional random-access scanning in large tissue volumes. Nat Methods. 2012;9:201–208. doi: 10.1038/nmeth.1851. [DOI] [PubMed] [Google Scholar]
- Kerlin AM, Andermann ML, Berezovskii VK, Reid RC. Broadly tuned response properties of diverse inhibitory neuron subtypes in mouse visual cortex. Neuron. 2010;67:858–871. doi: 10.1016/j.neuron.2010.08.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kirkby PA, Srinivas Nadella KM, Silver RA. A compact Acousto-Optic Lens for 2D and 3D femtosecond based 2-photon microscopy. Opt Express. 2010;18:13721–13745. doi: 10.1364/OE.18.013720. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Knopfel T. Genetically encoded optical indicators for the analysis of neuronal circuits. Nat Rev Neurosci. 2012;13:687–700. doi: 10.1038/nrn3293. [DOI] [PubMed] [Google Scholar]
- Komiyama T, Sato TR, O’Connor DH, Zhang YX, Huber D, Hooks BM, Gabitto M, Svoboda K. Learning-related fine-scale specificity imaged in motor cortex circuits of behaving mice. Nature. 2010;464:1182–1186. doi: 10.1038/nature08897. [DOI] [PubMed] [Google Scholar]
- Laffray S, Pages S, Dufour H, De Koninck P, De Koninck Y, Cote D. Adaptive movement compensation for in vivo imaging of fast cellular dynamics within a moving tissue. PLoS One. 2011;6:e19928. doi: 10.1371/journal.pone.0019928. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Langer D, van't Hoff M, Keller AJ, Nagaraja C, Pfaffli OA, Goldi M, Kasper H, Helmchen F. HelioScan: A software framework for controlling in vivo microscopy setups with high hardware flexibility, functional diversity and extendibility. J Neurosci Methods. 2013;215:38–52. doi: 10.1016/j.jneumeth.2013.02.006. [DOI] [PubMed] [Google Scholar]
- Margolis DJ, Lutcke H, Schulz K, Haiss F, Weber B, Kugler S, Hasan MT, Helmchen F. Reorganization of cortical population activity imaged throughout long-term sensory deprivation. Nat Neurosci. 2012;15:1539–1546. doi: 10.1038/nn.3240. [DOI] [PubMed] [Google Scholar]
- Mayrhofer JM, Skreb V, von der Behrens W, Musall S, Weber B, Haiss F. Novel two-alternative forced choice paradigm for bilateral vibrotactile whisker frequency discrimination in head-fixed mice and rats. J Neurophysiol. 2013;109:273–284. doi: 10.1152/jn.00488.2012. [DOI] [PubMed] [Google Scholar]
- Nimmerjahn A, Kirchhoff F, Helmchen F. Resting microglial cells are highly dynamic surveillants of brain parenchyma in vivo. Science. 2005;308:1314–1318. doi: 10.1126/science.1110647. [DOI] [PubMed] [Google Scholar]
- Nimmerjahn A, Mukamel EA, Schnitzer MJ. Motor behaviour activates Bergmann glial networks. Neuron. 2009;62:400–412. doi: 10.1016/j.neuron.2009.03.019. [DOI] [PMC free article] [PubMed] [Google Scholar]
- O’Connor DH, Peron SP, Huber D, Svoboda K. Neural activity in barrel cortex underlying vibrissa-based object localization in mice. Neuron. 2010;67:1048–1061. doi: 10.1016/j.neuron.2010.08.026. [DOI] [PubMed] [Google Scholar]
- Paukert M, Bergles DE. Reduction of motion artifacts during in vivo two-photon imaging of brain through heartbeat triggered scanning. J Physiol. 2012;590:2955–2963. doi: 10.1113/jphysiol.2012.228114. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Petreanu L, Gutnisky DA, Huber D, Xu NL, O’Connor DH, Tian L, Looger L, Svoboda K. Activity in motor-sensory projections reveals distributed coding in somatosensation. Nature. 2012;489:299–303. doi: 10.1038/nature11321. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Roe AW. Long-term optical imaging of intrinsic signals in anaesthetized and awake monkeys. Appl Opt. 2007;46:1872–1880. doi: 10.1364/ao.46.001872. [DOI] [PubMed] [Google Scholar]
- Thevenaz P, Ruttimann UE, Unser M. A pyramid approach to subpixel registration based on intensity. IEEE Trans Image Process. 1998;7:27–41. doi: 10.1109/83.650848. [DOI] [PubMed] [Google Scholar]
- Vogelstein JT, Packer AM, Machado TA, Sippy T, Babadi B, Yuste R, Paninski L. Fast nonnegative deconvolution for spike train inference from population calcium imaging. J Neurophysiol. 2010;104:3691–3704. doi: 10.1152/jn.01073.2009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Vogelstein JT, Watson BO, Packer AM, Yuste R, Jedynak B, Paninski L. Spike inference from calcium imaging using sequential Monte Carlo methods. Biophys J. 2009;97:636–655. doi: 10.1016/j.bpj.2008.08.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Xu NL, Harnett MT, Williams SR, Huber D, O’Connor DH, Svoboda K, Magee JC. Nonlinear dendritic integration of sensory and motor input during an active sensing task. Nature. 2012;492:247–251. doi: 10.1038/nature11601. [DOI] [PubMed] [Google Scholar]
- Yaksi E, Friedrich RW. Reconstruction of firing rate changes across neuronal populations by temporally deconvolved Ca2+ imaging. Nat Methods. 2006;3:377–383. doi: 10.1038/nmeth874. [DOI] [PubMed] [Google Scholar]