Abstract
The last few years have seen an explosion in the number of tools available to measure neuronal activity using fluorescence imaging (Chen et al., 2013; Feng et al., 2019; Jing et al., 2019; Sun et al., 2018; Wan et al., 2021). When performed in vivo, these measurements are invariably contaminated by hemodynamic occlusion artifacts. In widefield calcium imaging, this problem is well recognized. For two-photon imaging, however, the effects of hemodynamic occlusion have only been sparsely characterized. Here we perform a quantification of hemodynamic occlusion effects using measurements of fluorescence changes observed with GFP expression using both widefield and two-photon imaging. We find that in many instances the magnitude of signal changes attributable to hemodynamic occlusion is comparable to that observed with activity sensors. Moreover, we find that hemodynamic occlusion effects were spatially heterogeneous, both over cortical regions and across cortical depth, and exhibited a complex relationship with behavior. Thus, hemodynamic occlusion is an important caveat to consider when analyzing and interpreting not just widefield but also two-photon imaging data.
Introduction
Optical imaging of neuronal activity and neuromodulator concentration often involves recording the changes in fluorescence intensity of calcium or neuromodulator sensors expressed in neurons. In vivo, the hemodynamic changes in tissue around at the imaging location can modulate light transmission. Changes in blood volume through vasodilation and vasoconstriction as well as hemoglobin oxygenation change the transmission properties of the tissue. This is referred to as hemodynamic occlusion. Often, these hemodynamic changes are driven by local neuronal activity, a phenomenon known as neurovascular coupling (Attwell et al., 2010; Iadecola and Nedergaard, 2007). Hemodynamic changes are known to contribute significantly to activity measurements in techniques like fiber photometry (Zhang et al., 2022) and widefield microscopy (Ma et al., 2016; Waters, 2020). For these techniques, several methods have been proposed to control for the hemodynamic contribution to these activity measurements (Lohani et al., 2022; Valley et al., 2020; Zhang et al., 2022). However, the potential contribution of hemodynamic signals to activity measurements acquired using two-photon imaging remains largely unexplored.
Here, we characterized hemodynamic signals in two-photon imaging of mouse cortex. We expressed an activity independent marker (GFP) in mouse cortical neurons and measured fluorescence changes using two-photon imaging while mice were interacting with a virtual environment. We found changes in GFP fluorescence in response to locomotion and visual stimuli of a magnitude comparable to that measured with common activity sensors like GCaMP and GRAB variants. GFP signals were apparent both in population average responses and at individual neuron level. Moreover, these signals were heterogeneous over dorsal cortex and cortical layers. We compared the size of GFP signals to the calcium responses reported by GCaMP6 sensors, and to the neuromodulator signals reported by the GRAB sensors for dopamine (GRAB-DA1m), serotonin (GRAB-5HT1.0), acetylcholine (GRAB-ACh3.0), and norepinephrine (GRAB-NE1m). We found that a large fraction of the GRAB response to the different neuromodulators was explained by the GFP signal, consistent with an earlier study characterizing this relationship for GRAB-5HT1.0 and GRAB-5HT3.0 (Ocana-Santero et al., 2024). Based on our findings, we speculate that the primary driver of the hemodynamic signals in two-photon imaging is hemodynamic occlusion. If so, then this problem is likely primarily mitigated by using high dynamic range sensors with low baseline fluorescence, and best controlled for using activity independent fluorescence measurements.
Results
To quantify hemodynamic occlusion in two-photon microscopy we imaged GFP in mouse cortex during behavior. We used an AAV vector (AAV2/1-Ef1α-eGFP-WPRE) injected in primary visual cortex (V1) and anterior cingulate cortex (ACC) to express GFP in cortical neurons. Given that the Ef1α promoter biases expression to excitatory neurons, we estimate that most (95%) of the GFP-expressing neurons were excitatory (Attinger et al., 2017). We then used a two-photon microscope to record GFP signals while mice explored a virtual tunnel. Mice were head-fixed on a spherical treadmill surrounded by a toroidal screen and exposed to a set of visuomotor conditions known to activate neurons in V1 and ACC (Attinger et al., 2017; Keller et al., 2012; Leinweber et al., 2017; Zmarz and Keller, 2016). First, mice were exposed to a closed loop condition during which running speed was coupled to visual flow speed in a virtual tunnel. Mice were also exposed to an open loop condition, during which locomotion and visual flow in the virtual tunnel were not coupled, to darkness, and to the presentation of full-field drifting gratings. Throughout all experimental conditions, mice were free to locomote on the spherical treadmill and did so voluntarily. Unless stated otherwise, we will use ‘response’ to refer to the observed change in GFP fluorescence.
Locomotion onset and visual stimuli resulted in strong changes in GFP population responses
At the onset of locomotion, we found a transient increase in apparent GFP fluorescence in the population response of layer 2/3 (L2/3) neurons in V1 (Figure 1A). This increase in fluorescence of approximately 1% ΔF/F0 was only marginally smaller than the fluorescence changes typically observed at locomotion onset with genetically encoded calcium indicators (approximately 2% ΔF/F0 for GCaMP6f (Widmer et al., 2022; Yogesh and Keller, 2023), approximately 1.5% ΔF/F0 for GCaMP3 (Keller et al., 2012), etc.). By contrast, presentation of full-field drifting gratings resulted in a decrease of the GFP population signal (Figure 1B). We observed a similar decrease in GFP population signal on the presentation of an optogenetic stimulation light (637 nm, 10mW after the objective) directed at V1 with either the virtual reality turned on or in the dark (Figure 1C). This response was likely visually driven as the decrease was twice as strong in dark than when the virtual reality was on, in line with the stimulation light being more visually salient in dark. Visuomotor mismatches (pauses in the visual flow feedback during locomotion), resulted in an average increase of apparent GFP fluorescence (Figure 1D). By design, visuomotor mismatch only occurs during times of locomotion. Because apparent GFP fluorescence increases during locomotion, we estimated the increase expected by chance using random triggers during locomotion to compute the 95% confidence interval in Figures 1D, 1H, and 1L. GFP responses to mismatch were only briefly outside these 95% confidence intervals.
To test whether stimulus triggered GFP responses depend on imaging depth and cortical area, we repeated these experiments in layer 5 (L5) of V1 and in L2/3 of ACC. In L5, we found that apparent fluorescence changes at locomotion onset were smaller than those observed in L2/3 (Figure 1E). As in L2/3, full-field drifting grating stimuli (Figure 1F) and optogenetic stimulation light (Figure 1G) both resulted in a significant decrease in apparent GFP fluorescence, while visuomotor mismatch responses were only barely above chance (Figure 1H). In L2/3 of ACC, locomotion onset resulted in a strong increase of apparent GFP fluorescence (Figure 1I), while we found only small grating responses (Figure 1J) and a positive response to optogenetic stimulation light (Figure 1K). We again found no evidence of visuomotor mismatch responses (Figure 1L). Thus, apparent GFP fluorescence changes can vary both as a function of recording depth and cortical area.
The observation that average population responses of GFP and calcium indicators are similar does not mean that the dynamic range of individual neurons is similar. When comparing the distribution of peak ΔF/F0 responses, it is evident that peak responses are much larger for calcium indicators (Figures 2A and 2B). This is still the case when comparing trial averaged responses (Figures 2C-2E), but the difference between GFP and calcium indicator response distributions is smaller, in particular for locomotion onsets (Figure 2C). The main driver for this effect is likely the highly variable stimulus triggered calcium responses of many neurons.
Individual neurons showed significant GFP responses to different stimuli
Next, we tested whether GFP signals are strong enough to result in significant responses when looking at individual neurons. Raw GFP traces exhibited fluctuations reminiscent of calcium responses but tended to be of lower peak amplitude (Figure 2A). It is possible that small, correlated changes in GFP signal, when averaged over the population, result in a significant response indistinguishable from calcium signals reported with GCaMP but are negligible at the level of individual neurons. Thus, we quantified the fraction of neurons that are significantly responsive to different stimuli. Commensurate with the population averages (Figure 1), we found a surprisingly large fraction of neurons in V1, in both L2/3 (Figure 3A) and L5 (Figure 3B) responsive to locomotion onset and grating stimuli. In both locations, the fraction of neurons responsive to visuomotor mismatch was not different from chance. In ACC L2/3 (Figure 3C), a significant fraction of GFP labelled neurons was responsive to locomotion onset, while the fraction of neurons responsive to gratings and visuomotor mismatch was not different from chance. Thus, even at the single neuron level, hemodynamic influence on GFP remains measurable.
Changes in GFP fluorescence correlated with blood vessel dilation
We speculated that the dominant change in GFP fluorescence is driven by hemodynamic occlusion. As blood vessels dilate and constrict, they influence the transmission of both excitation and emission light. One testable prediction of this hypothesis is that the cross section of blood vessels visible in a given field of view should correlate inversely with the apparent GFP fluorescence of surrounding cells. This makes the simplifying assumption that the cross section of surface blood vessels, which likely have the strongest contribution to occlusion, correlates with that of blood vessels in the imaging plane. To quantify the correlation between blood vessel cross section and apparent GFP fluorescence, we first estimated the cross section of selected blood vessels in the imaging plane (Figures 4A and 4B). Blood vessels in V1 dilated systematically, for example upon light stimulation (Figures 4A1 and 4B1). The estimation of blood vessel cross section worked well for high contrast boundaries but failed in many instances of low contrast boundaries due to noise in the boundary estimates in single imaging frames. A proxy for blood vessel cross section that does not rely on thresholding is the average fluorescence of a region of interest of fixed size and fully contained within the blood vessel (Figures 4A2 and 4B2). Comparing both metrics to the average apparent GFP fluorescence changes of the surrounding cells (Figures 4A3 and 4B3), we found that both blood vessel area and fluorescence explain approximately 80% of the variance of apparent GFP fluorescence changes (Figures 4A4 and 4B4) in these example data. Quantifying this for all data, we found that the fraction of variance explained was 50% or higher for most event triggered averages (Figure 4C) as well as across the entire recording duration (Figures 4D and S2). The variance explained tended to be lower in ACC than in V1; we suspect that this is caused by the superior sagittal sinus contributing more strongly to hemodynamic occlusion in ACC, and that the diameters of local blood vessels are less well correlated with that of this large blood vessel.
GFP responses were visuomotor context sensitive and could not be explained by a linear combination of responses to constituent stimuli
Next, we investigated how stereotypical GFP responses are across different visuomotor conditions and cortical regions, and whether GFP responses can be explained by a linear combination of a locomotion driven component and a visually driven component. We found that in V1 L2/3, locomotion onset responses were similar in closed loop and open loop, but different in the dark (Figure 5A). During a closed loop locomotion onset, there is concurrent onset of visual flow with the locomotion onset. During open loop and dark locomotion onsets there is no concurrent onset of visual flow, and they only differ in the average visual input. The similarity between open and closed loop running onsets could be explained by a dominant locomotion related signal and a negligible visual onset response. If so, the smaller GFP responses in dark locomotion would need to be the consequence of the lower average visual input. This demonstrates that GFP responses, similar to neuronal calcium responses, can be non-linear combinations of component responses. This is perhaps not surprising, assuming local blood flow is primarily related to local neuronal activity. In L5 of V1, locomotion onset responses in open loop and dark conditions were comparable, while those in closed loop conditions had a delayed transient dip (Figure 5B). Thus, hemodynamic responses can exhibit a strong depth dependence. In ACC L2/3 neurons all three types of locomotion onsets resulted in increases of apparent fluorescence (Figure 5C). Thus, hemodynamic responses are difficult to predict from component signals (Figure S1), and do not generalize across depth or cortical areas. Finally, while there appears to be some correspondence to local neuronal activity in that locomotion onsets are more strongly modulated by visual context in V1 than in ACC, it is not immediately obvious how the GFP signals relate to responses measured with calcium indicators.
Locomotion increased correlation in GFP signals
Another metric frequently used in the analysis of two-photon data are correlation-based analyses. Locomotion, for example, has been shown to decorrelate the activity of excitatory neurons in cortex (Aydın et al., 2018; Dadarlat and Stryker, 2017; Erisken et al., 2014; Yogesh and Keller, 2023). Given the sizable fraction of neurons significantly responsive to locomotion, we speculated that correlations between neurons likely are influenced by hemodynamic responses. We tested this by quantifying the effect of locomotion on the pairwise correlations of GFP signals between individual neurons. We found that pairwise correlations were systematically increased during locomotion (Figure 6). This was true for neurons in V1 L2/3 (Figure 6A), V1 L5 (Figure 6B), and ACC L2/3 (Figure 6C). Thus, hemodynamic responses can have a strong influence on pairwise correlations, and in the case of locomotion, this effect is opposite to that observed with calcium indicators (Aydın et al., 2018; Dadarlat and Stryker, 2017; Erisken et al., 2014; Yogesh and Keller, 2023). This is consistent with the interpretation that hemodynamic changes on locomotion occur at a larger spatial scale than changes in neuronal activity patterns and thus tend to increase correlations between neurons.
GFP responses in widefield imaging were similar in magnitude to those in two-photon imaging
In widefield calcium imaging, hemodynamic responses are better characterized and widely recognized as a confounding problem (Allen et al., 2017; Ma et al., 2016; Valley et al., 2020). To directly contrast hemodynamic widefield signals with those observed in two-photon imaging, we repeated our experiments by performing widefield imaging of GFP responses. We expressed GFP pan-neuronally across dorsal cortex using either a retro-orbital injection of AAV-PHP.eB-EF1α-eGFP, or transgenic mice that express GFP under a c-fos promoter (Table S2). As with two-photon imaging (Figure 1), and consistent with previous work (Allen et al., 2017; Valley et al., 2020), we found strong GFP responses across dorsal cortex (Figure 7). Locomotion and grating onsets resulted in GFP responses in both V1 (Figures 7A and 7B) and ACC (Figures 7D and 7E). During visuomotor mismatch, we found no significant response in either of these regions (Figures 7C and 7F). All these responses were greatly attenuated or absent when we imaged the cortex without expressing a fluorescent indicator (Figure S3), arguing in favor of hemodynamic occlusion of fluorescence from the genetically expressed indicators as the underlying cause for most of these responses in the GFP signal.
GRAB sensors in cortex displayed similar responses to those recorded in GFP imaging
Finally, we compared the magnitude of hemodynamic responses to those recorded with the relatively low dynamic range GRAB sensors using both two-photon and widefield imaging. For this we used the GRAB-DA1m dopamine sensor (Sun et al., 2018), the GRAB-5HT1.0 serotonin sensor (Wan et al., 2021), the GRAB-ACh3.0 acetylcholine sensor (Jing et al., 2019), and the GRAB-NE1m norepinephrine sensor (Feng et al., 2019). We first imaged GRAB-DA1m, GRAB-5HT1.0, and GRAB-ACh3.0 using two-photon imaging in L2/3 of V1. To estimate hemodynamic responses from GRAB sensors, we compared responses of regions of interest (ROI) selected in neuropil and those selected in blood vessels (Figures 8A, 8E and 8I). We reasoned that the signal in neuropil regions is a combination of a true GRAB signal and hemodynamic occlusion, while the signal in a ROI selected inside of a blood vessel should be dominated by the blood vessel diameter. We found that the GRAB-DA1m response to locomotion and full-field grating onsets (Figure 8B and 8C) was similar to GFP responses in V1 L2/3 (Figure 1). There were responses to locomotion and grating onset in the GRAB-DA1m signal (Figure 8B and 8C). In both cases neuropil and blood vessel ROI responses were similar. Also, similar to the GFP responses, we found no evidence of a response to visuomotor mismatch in the GRAB-DA1m signal (Figure 8D). We observed similar responses when imaging GRAB-5HT1.0 in V1 (Figures 8F-8H). However, these responses were smaller in amplitude, likely driven by the overall dimmer fluorescence of the GRAB-5HT1.0 sensor. Thus, it is likely that both GRAB-DA1m and GRAB-5HT1.0 responses recorded with two-photon imaging are dominated by hemodynamic occlusion.
A response that was distinct from GFP, GRAB-DA1m, and GRAB-5HT1.0 signals was the response in GRAB-ACh3.0 on locomotion onset (Figure 8J). Here we found a prominent increase in GRAB-ACh3.0 signal that was three-fold higher than either the GFP signal or the GRAB-ACh3.0 signals measured in blood vessel ROIs. This makes it more likely that the observed fluorescence changes are driven by a mixture of hemodynamic occlusion and GRAB-ACh3.0 responses. The GRAB-ACh3.0 response to grating onset (Figure 8K), however, was similar to GFP responses. And again, we found no response to visuomotor mismatch in GRAB-ACh3.0 (Figure 8L). To test whether the absence of response differences between GRAB-DA1m, GRAB-5HT1.0 and GFP signals was simply a result of imaging in V1, where both dopamine and serotonin release is weaker than in frontal areas of cortex (Berger et al., 1991; Hamada et al., 2023), we repeated these experiments in ACC. Also here, we found no evidence of GRAB responses that could not be explained by hemodynamic occlusion (Figure S4). A strong influence of hemodynamic signals was also apparent in widefield imaging of GRAB-NE1m. We found that the widefield GRAB-NE1m responses (Figure 9) were similar to GFP responses (Figure 7). Thus, in certain cases of low dynamic range sensors, one can readily measure responses, but these are not always easily distinguished from those driven by hemodynamic occlusion.
Discussion
Changes in neuronal activity in the cortex are associated with hemodynamic changes through neurovascular coupling (Ruff et al., 2024) that are layer specific (Mächler et al., 2021). Since blood absorbs light, hemodynamic occlusion can affect fluorescence intensity measurements. This complicates the interpretation of signals measured with fluorescent activity indicators as blood flow varies on similar time scales as those of neuronal activity indicators. We quantified the magnitude of hemodynamic occlusion by imaging GFP and found the responses to be comparable to those recorded with commonly used calcium and neuromodulator sensors in population averages. We further found that these signals are heterogenous across the cortex, present at single neuron level, and non-linearly related to behavioral events. All this calls for greater caution in interpreting imaging data, particularly when the signal-to-noise ratio of the sensor is not substantially higher than the hemodynamic occlusion artifact.
Hemodynamic influence on fiber photometry (Zhang et al., 2022) and widefield imaging (Ma et al., 2016; Scott et al., 2018; Valley et al., 2020) are well documented, and there are correction methods published (Allen et al., 2017; Ma et al., 2016). But hemodynamic influence on two-photon imaging is relatively unexplored. Here we show that not only is this influence substantial, but in certain cases it is nearly indistinguishable from signals acquired with calcium or neuromodulator fluorescent sensors. Both the excitation and the emission photons need to pass through intervening vascularized tissue between the objective lens and the imaging plane deep in brain. Thus, changes in blood vessel diameter will influence both stimulation and emission light. Given that the absorption of light is wavelength dependent, it is not entirely trivial to estimate hemodynamic effects concurrently with two-photon imaging. There are likely two approaches: estimate the hemodynamic contribution in a separate set of experiments using GFP, or use a second imaging channel for concurrent isosbestic illumination of the sensor. For the calcium indicator GCaMP, isosbestic imaging has been shown to work in widefield imaging (Allen et al., 2017; Couto et al., 2021). However, imaging concurrently with two-photon imaging would require a second two-photon laser, and a way to de-multiplex or spectrally filter the two emission signals that are spectrally very close.
Based on both the correlation between blood vessel diameter and hemodynamic signals as well as the overall strength of the signals, we have here assumed that the primary contribution to the effects we measured is from hemodynamic occlusion. Previous work has shown that imaging neurons singly electroporated with a structural marker (Alexa Fluor 594) in rat visual cortex show a decrease in fluorescence on the presentation of visual stimuli when the neuron is present under an arteriole, but not a venule (Shen et al., 2012). Thus, we suspect the primary contributor to hemodynamic occlusion are alterations in arteriolar diameter.
The similarity in response of many of the GRAB sensors to the GFP signal is a cause for concern and calls for careful distinction between responses driven by the sensor and those resulting from hemodynamic occlusion (Ocana-Santero et al., 2024). In the case of neuromodulator sensors, this problem is further complicated by the fact that norepinephrine and acetylcholine also directly influence the diameter of arterioles. With improvement in the signal-to-noise ratio of these sensors these problems will be reduced. However, given that even for very high dynamic range sensors like GCaMP, the population average responses of hemodynamic occlusion are comparable in magnitude to the sensor signals, it is unlikely that the problem will disappear anytime soon.
Methods
Mice
We used a total of 35 C57BL/6 mice, 4 fosGFP mice, 6 Tlx3-Cre mice, and 23 ChAT-IRES-Cre mice. Both male and female mice, 6 - 16 weeks old at the start of the experiment, were used. See Table S2 for details of mouse inclusion for different figures. Between experiments, mice were group-housed in a vivarium (light/dark cycle: 12/12 hours). All animal procedures were approved by and carried out in accordance with the guidelines laid by the Veterinary Department of the Canton of Basel-Stadt, Switzerland.
Surgery
For all surgical procedures, mice were anesthetized with a mixture of fentanyl (0.05 mg/kg; Actavis), midazolam (5.0 mg/kg; Dormicum, Roche), and medetomidine (0.5 mg/kg; Domitor, Orion) injected intraperitoneally. Analgesics were applied perioperatively (2% lidocaine gel, meloxicam 5 mg/kg) and postoperatively (buprenorphine 0.1 mg/kg, meloxicam 5 mg/kg). Eyes were covered with ophthalmic gel (Virbac Schweiz AG). Depending on the experiment, we either implanted a cranial window to perform two-photon imaging or used crystal skull (or clear skull preparation in case of GRAB-NE1m imaging) for widefield imaging. Cranial windows were implanted over V1 and ACC as previously described (Keller et al., 2012; Leinweber et al., 2014). Briefly, using a dental drill, a 4 mm craniotomy was made over the right V1, centered 2.5 mm lateral and 0.5 mm anterior to lambda. A second craniotomy was made over right ACC, centered at midline, 0.5 mm anterior to bregma. After injection of an AAV vector carrying the reporter (see Table S2 for details of virus), the exposed cortex was sealed with a 3 mm or 4 mm circular glass coverslip and glued in place using gel superglue (Ultra Gel, Pattex). The remaining exposed surface of the skull was covered with Histoacryl (B. Braun), and a titanium head bar was fixed to the skull using dental cement (Paladur, Heraeus Kulzer). For widefield experiments, we injected an AAV vector with PHP.eB capsid retro-orbitally (6 μl per eye of at least 1013 GC/ml) to drive expression throughout cortex, or imaged GFP expressed in a fosGFP mice, or imaged without any fluorophore. For crystal skull surgery, we surgically removed the skull plate overlying the dorsal cortex and superglued a crystal skull coverslip over the craniotomy. For clear skull preparation, the skull was cleared with a three-component polymer (C&B Metabond, Parkell), and the crystal skull coverslip was directly attached to the skull. An epifluorescence image was taken to mark reference points on cortical surface. As with 4mm cranial window implantation, a titanium head bar was fixed to the skull using dental cement. After surgery, anesthesia was antagonized by a mixture of flumazenil (0.5 mg/kg; Anexate, Roche) and atipamezole (2.5 mg/kg; Antisedan, Orion Pharma) injected intraperitoneally. Imaging commenced earliest 2 weeks after head bar implantation or 3 weeks after retro-orbital AAV injection.
Virtual reality environment
The virtual reality setup is based on the design of Dombeck and colleagues (Dombeck et al., 2007). Briefly, mice were head-fixed and free to run on an air-supported spherical treadmill. The rotation of the ball was restricted around the vertical axis with a pin. The virtual reality environment was projected onto a toroidal screen covering approximately 240 degrees horizontally and 100 degrees vertically of the mouse’s visual field, using a projector (Samsung SP-F10M) synchronized to the resonant scanner of the two-photon microscope. The virtual environment consisted of an infinite corridor with walls patterned with vertical sinusoidal gratings with a spatial frequency of approximately 0.04 cycles per degree (Leinweber et al., 2014). In closed loop sessions, the locomotion of the mouse was coupled to movement along a virtual tunnel. In open loop sessions, we uncoupled the two and replayed the visual flow from a preceding closed loop session. In grating sessions, we presented full-field drifting gratings (0°, 45°, 90°, 270°, moving in either direction) in a pseudo-random sequence. Grating stimuli were presented for between 1 s and 8 s depending on the experiment. In the inter-stimulus interval, mice were shown a gray screen with average luminance matched to that of the grating stimuli. For optogenetic light stimulation, we used 1 s pulses (10 mW after the objective) of a red laser (637 nm) directed at visual cortex through a cranial window.
Two-photon imaging
Two-photon calcium imaging was performed using custom-built microscopes (Leinweber et al. 2014). The illumination source was a tunable femtosecond laser (Insight, Spectra Physics or Chameleon, Coherent) tuned to 930 nm. Emission light was band-pass filtered using a 525/50 filter for GCaMP and a 607/70 filter for tdTomato/mCherry (Semrock) and detected using a GaAsP photomultiplier (H7422, Hamamatsu). Photomultiplier signals were amplified (DHPCA-100, Femto), digitized (NI5772, National Instruments) at 800 MHz, and band-pass filtered at 80 MHz using a digital Fourier-transform filter implemented in custom-written software on an FPGA (NI5772, National Instruments). The scanning system of the microscopes was based on a 12 kHz resonant scanner (Cambridge Technology). Images were acquired at a resolution of 750 x 400 pixels (60 Hz frame rate), and a piezo-electric linear actuator (P-726, Physik Instrumente) was used to move the objective (Nikon 16x, 0.8 NA) in steps of 15 µm between frames to acquire images at 4 different depths. This resulted in an effective frame rate of 15 Hz. The field of view was 375 µm x 300 µm.
Widefield imaging
Widefield imaging experiments were conducted on a custom-build macroscope with commercially available objectives mounted face-to-face (Nikon 85 mm/f1.8 sample side, Nikon 50 mm/f1.4 sensor side). A 470 nm LED (Thorlabs) powered by a custom-build LED driver was used to excite GFP through an excitation filter (SP490, Thorlabs) reflected off a dichroic mirror (LP490, Thorlabs) placed parfocal to the objectives. The fluorescence was collected through a 525/50 emission filter on a sCMOS camera (PCO edge 4.2). LED illumination was adjusted with a collimator (Thorlabs SM2F32-A) to homogenously illuminate cortical surface through the cranial window. An Arduino board (Arduino Mega 2560) was used to synchronize LED onset with frame trigger signal of the camera. The duty cycle of the 470 nm LED was 90%. Images were acquired at 50 Hz or 100 Hz effective frame rate. Raw images were cropped on the sensor and data was stored to disk with custom-written LabVIEW (National Instruments) software, resulting in an effective pixel size of 60 μm2 at a resolution of 1108 pixels x 1220 pixels (1.35 MP).
Extraction of neuronal activity
Calcium imaging data were processed as previously described (Keller et al., 2012) and all data analysis was done in MATLAB (MathWorks). Briefly, raw images were full-frame registered to correct for lateral brain motion. All data with visible z-motion were excluded. Raw fluorescence traces were corrected for slow drift in fluorescence using an 8th-percentile filtering with a 66 s (or 1000 frames) window (Dombeck et al., 2007). ΔF/F0 traces were calculated as mean fluorescence in a selected region of every imaging frame, subtracted and normalized by the median fluorescence of the trace. ROIs were placed relative to readily identifiable anatomical landmarks, resulting in two 20 pixels x 20 pixels ROIs per hemisphere. We calculated ΔF/F0 traces as for two-photon imaging.
Data analysis
All data analysis was done using custom scripts written in MATLAB (MathWorks). To quantify the average population response traces, we first calculated the average event-triggered fluorescence trace for each ROI. The responses of all ROIs were then averaged and baseline-subtracted.
Locomotion onset was defined as running speed crossing a threshold of 0.25 cm/s for at least 1 s, while having been below the threshold during the preceding 1 s. The same criteria were used to define visual flow onsets in the open loop condition using visual flow speed. Visuomotor mismatch responses were probed by presenting brief 1 s full-field visual flow halts in the closed loop condition. For a visuomotor mismatch event to be included in analysis, mice had to be locomoting uninterrupted above threshold (0.25 cm/s) from -0.5 s to +1 s after the event onset. Additionally, for a ROI to be included for analysis of the response to a particular event, it had to have at least 3 onsets to the event. The GFP response was baseline subtracted using a -0.5 s to 0 s window relative to onset. The same was -1 s to -0.5 s in case of locomotion onset to account for preparatory activity.
In Figures 2C-2E, to compare GFP and GCaMP responses, we trial averaged the response of individual neurons and used the mean response over a time-window of 0 s to +2.0 s relative to locomotion or visuomotor mismatch onset, with a baseline subtraction window of -1 s to -0.5 s. For grating responses, we used the mean of the trial averaged response over +0.5 s to +3.0 s relative to stimulus onset, with a baseline subtraction window of -0.5 s to 0 s.
In Figure 3, for each neuron, we averaged the response from +0.5 s to +1.5 s relative to onset for individual locomotion onset and visuomotor mismatch trials and tested if the mean of this distribution is significantly different from 0 using a t-test with a chance threshold of 5% . In a similar analysis, the response window for grating responsive neurons was set at +0.5 s to +2.5 s to account for the 2 s long grating stimuli.
In Figure 4, the blood vessel diameter and the average GFP signal from both blood vessel ROIs and neuropil ROIs were smoothed with a 0.5 s moving average and the variance explained was computed on the -2.0 s to +6.0 s window relative to stimulus onset. In Figure 4C, data points were drawn as outliers if they were larger than 75th percentile + 1.5*(75th percentile - 25th percentile) or smaller than 25th percentile - 1.5*(75th percentile - 25th percentile) of the distribution and were omitted from the figure.
In Figures 7 and S3, due to insufficient triggers, we relaxed the locomotion threshold for mismatch to 0.12 cm/s, and in Figure S3, we relaxed the sitting window before locomotion onset to -0.5 s to 0 s.
Statistical Analysis
All statistical information for the tests performed in the manuscript is provided in Table S1. Unless stated otherwise, the shading indicates the error in mean estimation to within 1 standard deviation. For analysis where the experimental unit was neurons (or ROIs), we used hierarchical bootstrap (Saravanan et al., 2020) for statistical testing due to the nested nature (neurons (or ROIs) and mice) of the data. Briefly, we trial averaged the data for the respective event per neuron (or ROI), and first resampled the data (with replacement) at the level of imaging sites, and then, from the selected sites, resampled for neurons. We then computed the mean of this bootstrap sample and repeated this N times to generate a bootstrap distribution of the mean estimate. For all statistical testing the number of bootstrap samples (N) was 10 000, for plotting bootstrap mean and standard error response curves it was 1000. The bootstrap standard error is the 68% confidence interval (1 SD, 15.8th percentile to 84.2nd percentile) in the bootstrap distribution of the mean.
Supplementary information
Supplementary tables
Supplementary figures
Acknowledgements
We thank all the members of the Keller lab for discussion and support. This project has received funding from the Swiss National Science Foundation (GBK), the Novartis Research Foundation (GBK), and the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 865617) (GBK).
Additional information
Author contributions
BY designed the experiments. BY performed the two-photon imaging experiments, RJ performed the widefield imaging of GRAB-NE1m experiments, and RJ and MH performed the widefield imaging of GFP and with no fluorophore experiments. BY analyzed the data. BY and GK wrote the manuscript.
Declaration of interests
The authors declare no competing financial interests.
References
- Global Representations of Goal-Directed Behavior in Distinct Cell Types of Mouse NeocortexNeuron 94:891–907https://doi.org/10.1016/j.neuron.2017.04.017
- Visuomotor Coupling Shapes the Functional Development of Mouse Visual CortexCell 169:1291–1302https://doi.org/10.1016/j.cell.2017.05.023
- Glial and neuronal control of brain blood flowNature 468:232–243https://doi.org/10.1038/nature09613
- Locomotion modulates specific functional cell types in the mouse visual thalamusNat. Commun 9https://doi.org/10.1038/s41467-018-06780-3
- Dopaminergic innervation of the cerebral cortex: unexpected differences between rodents and primatesTrends Neurosci 14:21–27https://doi.org/10.1016/0166-2236(91)90179-x
- Ultrasensitive fluorescent proteins for imaging neuronal activityNature 499:295–300https://doi.org/10.1038/nature12354
- Chronic, cortex-wide imaging of specific cell populations during behaviorNat. Protoc 16:3241–3263https://doi.org/10.1038/s41596-021-00527-z
- Locomotion enhances neural encoding of visual stimuli in mouse V1J. Neurosci 37:3764–3775https://doi.org/10.1523/JNEUROSCI.2728-16.2017
- Imaging Large-Scale Neural Activity with Cellular Resolution in Awake, Mobile MiceNeuron 56:43–57https://doi.org/10.1016/j.neuron.2007.08.003
- Effects of Locomotion Extend throughout the Mouse Early Visual SystemCurr. Biol 24:2899–2907https://doi.org/10.1016/j.cub.2014.10.045
- A Genetically Encoded Fluorescent Sensor for Rapid and Specific In Vivo Detection of NorepinephrineNeuron 102:745–761https://doi.org/10.1016/j.neuron.2019.02.037
- Optogenetic activation of dorsal raphe serotonin neurons induces brain-wide activationbioRxiv https://doi.org/10.1101/2022.08.07.503074
- Glial regulation of the cerebral microvasculatureNat. Neurosci 10:1369–1376https://doi.org/10.1038/nn2003
- An optimized acetylcholine sensor for monitoring in vivo cholinergic activityNature Methods 17:1139–1146
- Sensorimotor Mismatch Signals in Primary Visual Cortex of the Behaving MouseNeuron 74:809–815https://doi.org/10.1016/j.neuron.2012.03.040
- A Sensorimotor Circuit in Mouse Cortex for Visual Flow PredictionsNeuron 95:1420–1432https://doi.org/10.1016/j.neuron.2017.08.036
- Two- photon Calcium Imaging in Mice Navigating a Virtual Reality EnvironmentJ. Vis. Exp :1–6https://doi.org/10.3791/50885
- Spatiotemporally heterogeneous coordination of cholinergic and neocortical activityNat. Neurosci 25:1706–1713https://doi.org/10.1038/s41593-022-01202-6
- Wide-field optical mapping of neural activity and brain haemodynamics: considerations and novel approachesPhilos. Trans. R. Soc. B Biol. Sci 371https://doi.org/10.1098/rstb.2015.0360
- Microscopic Quantification of Oxygen Consumption across Cortical LayersbioRxiv https://doi.org/10.1101/2021.10.13.464176
- In Vivo Two-Photon Microscopy Reveals Sensory-Evoked Serotonin (5-HT) Release in Adult Mammalian NeocortexACS Chem. Neurosci 15:456–461https://doi.org/10.1021/acschemneuro.3c00725
- Long-range inhibitory neurons mediate cortical neurovascular couplingCell Rep 43https://doi.org/10.1016/j.celrep.2024.113970
- Application of the hierarchical bootstrap to multi-level data in neuroscienceNeurons Behav. Data Anal. Theory 3
- Imaging cortical dynamics in GCaMP transgenic rats with a head-mounted widefield macroscopeNeuron 100:1045–1058https://doi.org/10.1016/j.neuron.2018.09.050
- An artery-specific fluorescent dye for studying neurovascular couplingNat. Methods 9:273–276https://doi.org/10.1038/nmeth.1857
- A Genetically Encoded Fluorescent Sensor Enables Rapid and Specific Detection of Dopamine in Flies, Fish, and MiceCell 174:481–496https://doi.org/10.1016/j.cell.2018.06.042
- Separation of hemodynamic signals from GCaMP fluorescence measured with wide-field imagingJ. Neurophysiol 123:356–366https://doi.org/10.1152/jn.00304.2019
- A genetically encoded sensor for measuring serotonin dynamicsNat. Neurosci 24:746–752https://doi.org/10.1038/s41593-021-00823-7
- Sources of widefield fluorescence from the braineLife 9:1–13https://doi.org/10.7554/eLife.59841
- NMDA receptors in visual cortex are necessary for normal visuomotor integration and skill learningeLife 11https://doi.org/10.7554/eLife.71476
- Cholinergic input to mouse visual cortex signals a movement state and acutely enhances layer 5 responsivenesseLife 12https://doi.org/10.7554/eLife.89986
- Spectral fiber photometry derives hemoglobin concentration changes for accurate measurement of fluorescent sensor activity. Cell RepMethods 2https://doi.org/10.1016/j.crmeth.2022.100243
- Mismatch Receptive Fields in Mouse Visual CortexNeuron 92:766–772https://doi.org/10.1016/j.neuron.2016.09.057
Article and author information
Author information
Version history
- Preprint posted:
- Sent for peer review:
- Reviewed Preprint version 1:
Copyright
© 2025, Yogesh et al.
This article is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use and redistribution provided that the original author and source are credited.
Metrics
- views
- 4
- downloads
- 0
- citations
- 0
Views, downloads and citations are aggregated across all versions of this paper published by eLife.