Single-cell resolution calcium imaging of the hindbrain during active visuomotor behavior. (a) The experimental set up consists of an in vivo 2-photon laser scanning microscope imaging at 980 nm and acquiring at 5.81 Hz while optomotor gratings are projected on a screen on the left or right side of the larva, which is embedded dorsal side up in agarose with the tail freed. A high-speed camera captures the tail movements from below at 250 Hz. The red box indicates the imaging region comprising the majority of the hindbrain. (b) Z-projection stack of several optical sections imaged from the dorsal view in Tg(HuC:GCaMP5G;glyt2:loxP-mCherry-loxP-Gal4; mifta/) transgenic larvae reveals the localization of GCaMP5G (left) in most neurons and mCherry (center) in glycinergic neurons (right, merge with GCaMP5G in green and mCherry in magenta). (c) Trials during which a single plane is imaged for 315 s with sequential presentations of moving optomotor stimuli for 10 s in open-loop (grey bars). Larvae initiate locomotion more frequently during the periods of stimulus motion than when the stimulus is stationary. (d) Single image extracted from a high-speed behavioral movie showing the larva under IR illumination with its head embedded in agarose and the tail cut free. Offline tracking of the tail in eight sections between the caudal end of the swim bladder and end of the tail. (e) Tail-bend angle (degrees) defined between the swim bladder and the end of the tail can be plotted and bouts of swimming are automatically extracted (red boxes). Tracking failures and obvious struggles were excluded from the dataset. Example swim bout expanded below (1) and example struggles expanded below (2,3). Red points mark automatically detected tail deflections. Each detected bout is bounded by a red box. Scale bars are 40 µm in (b).

Automatic extraction of calcium signals and clustering analysis reveal different responses to the stimulus presentation as well as recruitment during locomotion. (a) Standard deviation of time series obtained from an example plane of calcium imaging data. (b) Spatial map of a subset of active regions extracted from that plane. (c) Red outlines are borders of automatically detected functional ROIs. (d) Zoom on some example regions of interest (ROIs) from the same plane as (a–c). (e) Six different example ROIs (colors match locations in panel (d)) plotted for the full length of the trial. Periods of optomotor stimulus motion are indicated by grey bars. Tail trace is plotted below in black. (f) Sample functional ROIs that show activity during visuomotor behavior. From top to bottom: tail-bend angle, swim-triggered average calcium activity, stimulus-triggered average calcium activity, GCaMP5G ΔF/F trace. Individual bout starts are marked with a vertical dotted line. This functional ROI (1) correlates better with swim-events than with the visual stimulus. (f ’) Same as (f ) but for a different functional ROI (2) which correlates better with the stimulus than with swim events. Periods of optomotor stimulus motion are indicated by grey bars. (g) Cluster mean from clustering swimming-related activity. Dotted line indicates bout start. Red shaded area around solid black line (mean) indicates +/−  S.E.M (n = 144 ROIs from 7 larvae). (h) Cluster means from clustering stimulus related activity. Grey shaded area indicates when stimulus is moving. Red shaded area around black line (mean) indicates +/− S.E.M (swim cluster 1: n = 466 ROIs from 10 larvae, swim cluster 2: n = 161 ROIs from 10 larvae, swim cluster 3: n = 76 ROIs from 8 larvae). Scale bars are 40 µm in (a–c), and 20 µm in (d).

Recruitment of a glycinergic and engrailed1b-positive stripe during locomotion. (a) Z-projection stack of 30 frames from our processed dataset registered with the ZBB atlas. Left: ZBB atlas stack of Tg(glyt2:GFP) expression; right: pixels correlated with swim cluster 1 (weighted average across larvae). Area of interest bounded by white circles. (b) Overlap of the two images in (a) with Tg(glyt2:GFP) shown in magenta and swim cluster 1 shown in green. Area of interest bounded by white circles. Resliced image at right from position of white dotted line. (c) Z-projection stack of 30 frames from our processed dataset registered with the ZBB atlas. Left: ZBB atlas stack of Tg(engrailed1b:Gal4;UAS:Kaede) expression; right: pixels correlated with swim cluster 1 averaged across all larvae. Area of interest bounded by white circles. (d) Overlap of the two images in (c) with Tg(engrailed1b:Gal4;UAS:Kaede) shown in magenta and swim cluster 1 shown in green. Area of interest bounded by white circles. Resliced image at right from position of white dotted line. (e) Example traces from three different larvae showing calcium activity from a single, manually draw ROI located within the area of interest above on one side of the midline (left or right, indicated). ΔF/F trace shown above in blue and the accompanying tail trace in black for the example trial. Grey-shaded area indicates when stimulus is moving. Scale bars are 40 µm for (a–d).

Different GABAergic clusters in hindbrain and cerebellum show activity either positively or negatively correlated with the visual stimulus. (a) Z-projection stack of 20 optical sections imaged from the dorsal aspect of Tg(HuC:GCaMP5G) larvae compared with stimulus cluster 3. Panels left to right: Tg(HuC:GCaMP5G) larvae showing pan-neuronal localization of GCaMP5G; pixels correlated with stimulus cluster 3 averaged across all larvae; merge with HuC:GCaMP5G in grey and stimulus cluster 3 pixels in yellow. Area of interest is bounded by white circles. Colored dots represent ROIs plotted in (c). (b) Z-projection stack of 26 frames from stimulus cluster 3 correlated pixels registered with the ZBB atlas for the same area of interest as (a). Panels left to right: ZBB atlas stack of Tg (gad1b:GFP) expression; pixels correlated with stimulus cluster 3 averaged across all larvae; overlap of the two images with Tg(gad1b:GFP) shown in green and stimulus cluster 3 shown in magenta. Area of interest is bounded by white circles. Resliced image at right from position of white dotted line. (c) Example traces from three different larvae showing calcium activity from an ROI located within the area of interest outlined in white in panels (a,b). ΔF/F traces are shown in color matching the ROI centroid’s approximate location on panel (a, right). The accompanying tail traces for that individual trial are shown in black. Grey-shaded area indicates when stimulus is moving. (d) Z-projection stack of 25 optical sections imaged from the dorsal view in Tg(HuC:GCaMP5G) larvae compared with stimulus cluster 1. Panels left to right: Tg(HuC:GCaMP5G) larvae showing pan-neuronal localization of GCaMP5G; pixels correlated with stimulus cluster 3 averaged across all larvae; merge with HuC:GCaMP5G in grey and stimulus cluster 3 pixels in yellow. Area of interest is bounded by white circles. Colored dots represent ROIs plotted in (f). (e) Z-projection stack of 28 frames from stimulus cluster 3 correlated pixels registered with the ZBB atlas for the same area of interest as (d). Panels left to right: ZBB atlas stack of Tg (gad1b:GFP) expression; pixels correlated with stimulus cluster 3 averaged across all larvae; overlap of the two images Tg(gad1b:GFP) shown in green and stimulus cluster 3 shown in magenta. Area of interest is bounded by black or white circles. Resliced image at right from position of white dotted line. (f) Example traces from three different larvae showing calcium activity from an ROI located within the area of interest outlined in panels (d,e). ΔF/F traces are shown in color matching the ROI centroid’s approximate location on panel (d, right). The accompanying tail traces for that individual trial are shown in black. Below the average ΔF/F trace for pixels associate with stimulus cluster 3 with shading indicating +/− S.E.M (n = 76 ROIs from 8 larvae). Grey-shaded vertical bars indicate when visual stimulus is moving. Scale bars are 40 µm for (a,b) and (d,e).

Acknowledgments
This image is the copyrighted work of the attributed author or publisher, and ZFIN has permission only to display this image to its users. Additional permissions should be obtained from the applicable author or publisher of the image. Full text @ Sci. Rep.