Technical adaptations for dual-mount in vivo pan-cortical imaging with the Thorlabs 2p-RAM mesoscope.

a) Mesoscope behavioral apparatus for the dorsal mount preparation. Mouse is mounted upright on a running wheel with headpost fixed to dual adjustable support arms mounted on vertical posts (1” diameter). Behavior cameras are fixed at front left, front right, and center posterior, with ultraviolet and infrared light-emitting diodes aligned with goose-neck supports parallel to right and left cameras. b) Mesoscope behavioral apparatus for side mount preparation. Same as in (a), except that the mouse is rotated 22.5 degrees to its left so that the objective lens (at angle 0) is orthogonal to its center-of-mass of preparation in the right cortical hemisphere. The objective can rotate +/-20 degrees medio-laterally, if needed, to optimize imaging of any portion of the cortex under the cranial window. The right behavior camera is positioned more posterior and lower than in a), to allow for imaging of the eye under the acute angle formed with the horizontal light shield, shown in c). c) Mouse running on wheel with side mount preparation receiving visual stimulation from an LED screen positioned on the left side, with linear motor-positioned dual lick-spouts in place and 3D printed vertical light shield (wok 2) attached to rim of flat shield (wok 1) to block extraneous light from entering the objective. d) Overhead view of dorsal mount preparation with 3D printed titanium headpost, custom cranial window, and Allen CCF aligned to paraformaldehyde-fixed mouse brain. Motor region = light green, somatosensory = dark green, visual = dark blue, retrosplenial = light blue. Olfactory bulbs (anterior) at top, cerebellum (posterior) at bottom of image. Note ridge along perimeter of headpost for fitted horizontal light shield (wok 1) attachment. e) Rotated dorsal view (22.5 degrees right) of side mount preparation with 3D printed titanium headpost, custom cranial window, and Allen CCF aligned to paraformaldehyde-fixed mouse brain. Auditory region shown in light blue, ventral and anterior to visual areas, and ventral and posterior to somatosensory areas (right side of image is lateral/ventral, and left side of headpost perimeter is medial/dorsal). Other regions shown with the same color scheme as in d). UV = ultraviolet, IR = infrared, M2 = secondary motor cortex, S1b = primary somatosensory barrel cortex, V1 = primary visual cortex, A1 = primary auditory cortex.

Widefield-imaging based multimodal mapping (MMM) and CCF alignment, ROI detection, and areal assignment of GCaMP6s+ excitatory neurons for the dorsal mount preparation.

a) Mean projection of 30 s, 470 nm excitation epifluorescence widefield movie of vasculature performed through a dorsal mount cranial window. Midline indicated by a dashed white line. b) Mean 1 s baseline subtracted dF/F images of 1 s responses to ∼20-30 repetitions of left-side presentations of a 5-40 kHz auditory tone cloud (auditory TC; left), visual full field (FF) isoluminant Gaussian noise stimulation (center), and 100 ms × 5 Hz burst whisker deflection (right) in an awake dorsal mount preparation mouse. c) Example 2-step CCF alignment to dorsal mount preparation, performed in Python on MMM masked blood-vessel image (upper left), rotated outline CCF (upper right), and Suite2p region of interest (ROI) output image containing exact position of all 2p imaged neurons (lower right). Yellow outlines show the area of masks created from the thresholded mean dF/F image for, in this example, repeated full-field visual stimulation. In step 1 (top row), the CCF is transformed and aligned to the MMM image using a series of user-selected points (blue points with red numbered labels, set to matching locations on both left and right images) defining a bounding-box and known anatomical and functional locations. In step 2 (bottom row), the same process is applied to transformation and alignment of Suite2p ROIs onto the MMM using user-selected points defining a bounding box and corresponding to unique, identifiable blood-vessel positions and/or intersections. Finally, a unique CCF area name and number are assigned to each Suite2p ROI (i.e. neuron) by applying the double reverse-transformation from Suite2p cell center location coordinates, to MMM, to CCF. d) CCF-aligned Suite2p ROIs from an example dorsal mount preparation with 7328 neurons identified in a single 30 min session from a spontaneously behaving mouse. TC = tone cloud, FF = full-field, defl = deflection, dF/F = change in fluorescence over baseline fluorescence, CCF = Allen common coordinate framework version 3.0, M2 = secondary motor cortex, S1b = primary somatosensory barrel cortex, V1 = primary visual cortex, A = anterior, P = posterior, R = right, L = left.

Widefield-imaging based multimodal mapping (MMM) and CCF alignment, ROI detection, and areal assignment of GCaMP6s+ excitatory neurons for the side mount preparation.

a) Mean projection of 30 s, 470 nm excitation fluorescence widefield movie of vasculature performed through a side mount cranial window. Midline indicated by a dashed white line. b) Mean 1 s baseline subtracted dF/F images of 1 s responses to ∼20-30 repetitions of left-side presentations of a 5-40 kHz auditory tone cloud (auditory TC; left), visual full field (FF) isoluminant Gaussian noise stimulation (center), and 100 ms × 5 Hz burst whisker deflection (right) in an example side mount preparation mouse under 1.5% isoflurane anesthesia. c) Example 2-step CCF alignment to side mount preparation, performed in Python on MMM masked blood-vessel image (upper left), rotated outline CCF (upper right), and Suite2p region of interest (ROI) output image containing exact position of all 2p imaged neurons (bottom right). Yellow outlines show the area of masks from thresholded mean dF/F image for repeated auditory, full-field visual, and/or whisker stimulation. In step 1 (top row), the CCF is transformed and aligned to the MMM image using a series of user-selected points (blue points with red numbered labels, set to matching locations on both left and right images) defining a bounding-box and known anatomical and functional locations. In step 2 (bottom row), the same process is applied to transformation and alignment of Suite2p ROIs onto the MMM using user-selected points defining a bounding box and corresponding to unique, identifiable blood-vessel positions and/or intersections. Finally, a unique CCF area name and number are assigned to each Suite2p ROI (i.e. neuron) by applying the double reverse-transformation from Suite2p cell center location coordinates, to MMM, to CCF. d) CCF-aligned Suite2p ROIs from an example side mount preparation with 4782 neurons identified in a single 70 min session from a mouse performing our 2-alternative forced choice (2-AFC) auditory discrimination task. TC = tone cloud, FF = full-field, defl = deflection, dF/F = change in fluorescence over baseline fluorescence, CCF = Allen common coordinate framework version 3.0, M2 = secondary motor cortex, S1b = primary somatosensory barrel cortex, A1 = primary auditory cortex, V1 = primary visual cortex, A = anterior, P = posterior, R = right, L = left.

The relationship between spontaneous behavioral measures and neural activity across the dorsal cortex is globally heterogeneous.

a) Rastermap (top), first principal component (PC1; middle), and second principal component (PC2, bottom) sorting of normalized, rasterized, neuropil subtracted dF/F neural activity for 3096 cells from a single 20 min duration example dorsal mount 2p imaging session. Each row in the display corresponds to a “superneuron”, or average activity of 50 adjacent neurons in the Rastermap sort (Stringer et al, 2023, bioRxiv). Activity for each superneuron is separately z-scored, then displayed as low activity in blue, intermediate activity in green, and maximum activity level in yellow (standard viridis color look-up table). Red and blue arrowheads show alignment of walking and whisking bouts, respectively, to neural activity. White dashed box inserts indicate dual selections highlighted in panels c) and d). Scale bar shows color look-up map for each separately z-scored, individually displayed superneuron in the raster displays. b) Behavioral arousal primitives of walk speed, whisker motion energy, and pupil diameter shown temporally aligned to the rasterized neural activity traces in a), directly above. Horizontal black bar indicates time of expanded inset in Fig. S4. c) Expanded insets of top and bottom fifths of rasterized PC1 sorting from the middle segment of panel a), with mean dF/F activity traces shown above each. Red and blue arrowheads indicate the same walking and whisking bouts, respectively, as in a) and b). d) Normalized density of neurons in each CCF area belonging to two example Rastermap sorted groups (d1, left, red: MIN=0%, MAX=25%; d2, right, blue: MIN=0%, MAX=13%), with rasterized activities shown in corresponding labeled white dashed boxes in the top segment of panel a). The neurons present in selected Rastermap groups are shown as Suite2p footprint outlines. The type of behavioral arousal primitive activity typically concurrent with high neural activity for each Rastermap group is shown below each Rastermap group’s CCF density map (i.e. walk and whisk for group d1, left (red), and whisk for group d2, right (blue). e) Normalized mean correlations of neural activity and walk speed (left, red; mean: MIN=0.01, MAX=0.03) and whisker motion energy (right, blue; mean: MIN=0.02, MAX=0.08) per CCF area (i.e. average correlation of all neurons in each area) are shown for this example session. Mean walk speed correlations with neural activity (dF/F) were significantly more than zero (p<0.001, median t(3095)=3.7, single-sample t-test; python: scipy.stats.ttest_1samp) for 15 of the 19 CCF areas with at least 20 neurons present. The areas with mean correlations not significantly larger than zero were right VISam, right SSp_ll, left VIS_rl, and left AUDd. Mean whisker motion energy correlations with neural activity (dF/F) were significantly more than zero (p<0.001, median t(3095)=4.4, single-sample t-test) for 16 of the 19 CCF areas with at least 20 neurons present. The areas with mean correlations not significantly larger than zero were right VISam, left VISam, and left VISrl. PC = principal component, ME = motion energy, au = arbitrary units, M2 = secondary motor cortex, S1b = primary somatosensory barrel cortex, V1 = primary visual cortex.

The relationship between spontaneous behavioral measures and neural activity across the lateral cortex is regionally patterned.

a) Rastermap (top), first principal component (PC1; middle), and second principal component (PC2, bottom) sortings of normalized, rasterized, neuropil subtracted dF/F neural activity for 5678 cells from a single 90 min duration example side mount 2p imaging session. Each row in the display corresponds to a “superneuron”, or average of 50 adjacent neurons in the Rastermap sort (Stringer et al, 2023, bioRxiv). Low activity (z-scored) in blue, intermediate activity in green, maximum activity level in yellow. Red and blue arrowheads show alignment of walking and whisking bouts, respectively, to neural activity. White dashed box inserts indicate selections highlighted in panels c) and d). Scale bar shows color look-up map for each separately z-scored, individually displayed superneuron in the raster displays. b) Behavioral arousal primitives of walk speed, whisker motion energy, and pupil diameter shown temporally aligned to the rasterized neural activity traces in a), directly above. c) Expanded insets of top and bottom fifths of rasterized PC1 sorting from the middle segment of panel a), with mean activity traces shown above each. Red and blue arrowheads indicate the same walking and whisking bouts, respectively, as in a) and b). Horizontal black bar indicates time of expanded inset shown in Fig. S5. d) Normalized density of neurons in each CCF area belonging to two example Rastermap sorted groups (d1, left, red: MIN=0%, MAX=34%; d2, right, blue: MIN=0%, MAX=32%), with rasterized activities shown in corresponding labeled white dashed boxes in the top segment of panel a). Only cells in selected Rastermap groups are shown. The type of behavioral arousal primitive (i.e. walk and whisk, left, in red; whisk, right, in blue) that was typically concurrent with high neural activity is shown below each Rastermap group’s CCF density map. e) Normalized mean correlations of neural activity and walk speed (left, red; mean: MIN=0.01, MAX=0.06; standard deviation: MIN=0.000, MAX=0.029) and whisker motion energy (right, blue; mean: MIN=0.01, MAX=0.08; standard deviation: MIN=0.000, MAX=0.043) per CCF area for this example session. Mean walk speed correlations with neural activity (dF/F) were significantly more than zero (p<0.001, median t(5677)=4.4, single-sample t-test; python: scipy.stats.ttest_1samp) for 20 of the 24 CCF areas with at least 20 neurons present. The areas with mean correlations not significantly larger than zero were left VISp, right SSpn, right AUDpo, and right TEa. Mean whisker motion energy correlations with neural activity (dF/F) were significantly more than zero (p<0.001, median t(5677)=7.0, single-sample t-test) for 21 of the 24 CCF areas with at least 20 neurons present. The areas with mean correlations not significantly larger than zero were right SSpn, right AUDpo, and right TEa. PC = principal component, ME = motion energy, au = arbitrary units, M2 = secondary motor cortex, S1b = primary somatosensory barrel cortex, V1 = primary visual cortex, A1 = primary auditory cortex.

Alignment of activity sorted neural ensembles and spontaneous behavioral motifs reveals sparse, distributed encoding of arousal measures.

a) Manual identification of high-level, qualitative behaviors (twitch, green dashed box; whisk, blue dashed box; walk, red dashed box; pupil oscillate, gray dashed box), aligned to sets of raw, unfiltered behavioral motifs (B-SOiD) extracted from pose-estimates (DeepLabCut) for a single example session. Numbered B-SOiD motifs (trained on a set of 4 sessions from the same mouse, motif # indicated by the position of the thick blue line relative to the y-axis at each time point) are color-coded (horizontal bars) across the entire 90-minute session. b) High level behaviors (dashed colored boxes, i-iv) and BSOiD motifs from a) are vertically temporally aligned to the behavioral primitive movement and arousal measures of walk speed, whisker motion energy, and pupil diameter. Expanded alignments of high level behaviors ii (whisk) and iii (walk) are shown in Fig S7a, b. Red arrowheads indicate temporal alignment positions for multiple walk bouts across BSOiD motifs (a), behavioral arousal primitives (b), and Rastermap sorted neural data (c). c) Rastermap sorted, z-scored, rasterized, neuropil subtracted dF/F neural activity (10th percentile baseline, rolling 30 s window) from the same side mount session, temporally aligned to the behavioral data directly above. Numbers at left (R0-R7) indicate Rastermap motif numbers, selected manually “by-eye” for this session, and horizontal dashed white lines on raster indicate separation between neighboring Rastermap motifs. Each row in the display corresponds to a “superneuron”, or average of 50 adjacent neurons in the Rastermap sort (Stringer et al, 2023, bioRxiv). Colored, dashed boxes indicate alignment of high-level behaviors with neural activity epochs from the same example session. White dashed ovals indicate areas of Rastermap group-aligned active neural ensembles during periods of defined high-level behaviors. The 2p sampling rate for this session was 3.38 Hz. d) Normalized mean activity traces for all neurons in each neural ensemble indicated in (c) (white dashed ovals). Each trace also corresponds and is aligned to the indicated Rastermap groups. e) Color-coded neuron densities per CCF area corresponding to Rastermap groups shown in c), shown grouped by qualitative high-level behaviors, as indicated in a-b). Cross-indexing with neurobehavioral alignments (white dashed ovals) in c) allows for visualization of spatial distribution of neurons active during identified high-level behaviors (a) consisting of defined patterns of behavioral primitive movement and arousal measures (b). Corresponding maximum cell density percentages in each CCF area (white to red scale bar, top right) for each normalized Rastermap (0-7) heatmap color lookup table are 11.4, 31.8, 22.9, 24.1, 38.4, 33.2, and 24.0%, respectively (left to right: R3, R4, R5, R6, R7, R0, and R1). This list of cell density percentages, therefore, corresponds to that of the CCF area filled with the darkest shade of red in each Rastermap group. White CCF areas in each Rastermap group are areas where no cells of that group were found, or where the total number of cells was less than 20 and therefore the density estimate was deemed unreliable and not reported. ME = motion energy, au = arbitrary units, CCF = common coordinate framework.

Detailed technical adaptations for dual-mount in vivo pan-cortical imaging with 2p-RAM mesoscope. a) Photographs of widefield through-skull (top) and 2-photon cranial window (bottom) states of side mount preparation. Bregma (β) and lambda (λ) skull landmarks used in multimodal mapping alignment to common coordinate framework (CCF) map are indicated (top), along with their corresponding positions relative to cortical blood vessels visible through cranial window (bottom). Note that all visible tissue inside the perimeter of the headpost in the lower image is seen through curved, 210 µm thick borosilicate Schott D263 glass. b) Custom aluminum support arms for use with both dorsal mount and side mount preparations. Fixed arm (top) has flat proximal angle at bend near dual-screw headpost mounting slot (right red arrow), and can be mounted on a Thorlabs 1-inch diameter post mounted to a rotating ball-joint base (SL20, see suppl materials) to achieve leftward 22.5-degree rotation for side mount (not shown). Flexible positioning on wheel is possible due to ¼”-20 bolt accepting slot that allows support posts to be positioned closer or farther from headpost mounting slot (left red arrow). Custom adjustable arm (bottom) has rotating brass shaft attached to ball-and-socket joint with hexagonal tightening ring (top, long black arrow), stabilized by dual set screws on both ends (bottom, two short black arrows), at a bend proximal to the headpost mounting slot. This allows for rapid, fixable on-rig fine adjustment of the mounting angle in all directions, and eliminates the need for a Thorlabs rotating ball-joint base so that 1” diameter vertical posts can be used (instead of ½” diameter, which we used at first), thus enhancing overall stability for imaging. c) Examples of headpost mounting for dorsal mount (top, with cranial window) and side mount (bottom, headpost only). Both headposts are attached with two 82 degree countersunk 2-56 thread 1 ⁄ 4 ’’ stainless steel screws (McMaster-Carr, see Suppl Materials) and positioned in a custom machined slot within the support arm for enhanced stability. The headpost arm can easily be held within the support arm slot by thumb prior to screw affixation during mounting. d) Mounting of 3D printed light shields and application of objective to water meniscus. Flat shields (top left, bottom left) are attached with 1:1 rapid curing Sylgard (top right; 170 Fast Cure encapsulant, see Suppl Materials) to the perimeter of the headpost. Stable positioning during curing is enabled by attachment of dual 3-pronged lab clamps attached to left and right support arms with quick ties (not shown). Then, a tip-clipped transfer pipette is used to add deionized or Millipure water to the window, with the Sylgard acting as a dam, until the objective can be lowered far enough to raise a meniscus. Additional water can then be added from either side of the preparation under the objective. e) Side view 3D rendering (left, from AutoDesk Inventor; L = left, R = right, A = anterior, P = posterior, center-line = dashed-line) and top view photograph with cranial window placed on paraformaldehyde-fixed brain, for dorsal mount preparation. f) Same as in e), but for side mount preparation. g) Cumulative success rate “survivorship” diagram for dorsal and side mount preparations (note: survival rate is higher, but some preparations are not fully imageable, some mice fail to acquire the task, etc), loosely based on empirical data from mice both used to develop the preparations, those used in this study, and those used in pilot experiments for 2-alternative forced choice (2-AFC) behavior. Note that the standard full timeline involves around 100 days from headpost implantation to experiment completion. In our experience, successful cranial windows last between 100-150 days, or in some rare cases up to 300 days: https://github.com/vickerse1/mesoscope_spontaneous/blob/main/window_preparation_stability.pdf

Widefield-imaging based dual-mount multimodal CCF alignment, ROI detection, and areal assignment of GCaMP6s+ excitatory neurons. a) Example MMM to CCF alignment for dorsal mount, shown projected onto a through-the-skull vasculature image and including skull landmarks (top). The series of user-selected points used for alignment of the widefield image onto the CCF map are shown as blue points, with corresponding red points showing the actual mapping locations used by the affine transformation. 2p-RAM pseudo-widefield vasculature montage from the same mouse, with boundaries of example 2-photon imaging session FOV shown as red dashed line (bottom). View angle relative to orthogonal indicated at top of dashed black line indicating mid-line. b) Same as in a), but for example side mount preparation. c) Density of Suite2p-detected ROIs (density of 1 equal to one neuron per 25 × 25 µm square; total large FOV area generally 5000 × 4620 µm) for large field of view (FOV) 2-photon imaging sessions as a function of session duration for dorsal mount (blue) and side mount (red) preparations. d) Neural density as a function of imaging resolution for 2-photon imaging sessions where multiple smaller FOVs were imaged pseudo-simultaneously. Same density calculation used as in c), for multi-FOV sessions where the dimensions of each small FOV are generally between 660 × 660 and 1320 × 1320 µm. Here, a resolution of 0.2 pixels / µm would correspond to 5 µm per pixel resolution in both × and y dimensions (i.e. ⅕ = 0.2). e) Summary statistics for all 2-photon imaging sessions in the current study that passed quality control for all data modalities (i.e. MMM, 2-photon, behavior video, etc). The number of neurons per 2-photon imaging session is shown for both large-(two columns at left) and small-(two columns at right) FOV sessions, split by mount type (dorsal mount in blue, side mount in red). Numbers in parentheses indicate total session counts (“S”), “N” indicates number of mice with each mount type. FOV = field of view, V1 = primary visual cortex, A1 = primary auditory cortex, S1_b = primary somatosensory barrel cortex, ß = bregma, λ = lambda.

Comparison of neurobehavioral alignment in back-to-back mesoscope imaging sessions either without (a, “OFF”) and with (b, “ON”) GPU-enabled online z-motion correction enabled. a) Neural and behavioral data are shown temporally aligned for the first session. Rastermap sorted neural activity is shown at top, with a blue/green/yellow (min/mid/max) heatmap applied to activity from each individual neuron z-scored separately. Walk speed (red), whisker motion energy (blue), and pupil diameter (gray) are shown below. Red dashed vertical lines indicate times of two major walking bouts for the purpose of alignment visualization. Note that roughly the top ∼30% of neurons show strong activity time-locked to the identified walking bouts (red vertical line at right, labeled “walk”). b) Same as in a), except for a 2nd consecutive session in the same mouse. The only change was that, for this session, online GPU-enabled z-motion correction was enabled (“ON”) following acquisition of a 60 × 1 µm step anatomical z-stack for frame-by-frame comparison and adjustment (ScanImage/Vidrio). Note the similar percentage of cells aligned with each walking bout (top ∼30% in Rastermap sorts in both a) and b) (indicated by red vertical line at right labeled “walk”), and the overall qualitative similarity of Rastermap clustering and activity motifs compared to that of the immediately prior session shown in a), despite the fact that these back-to-back sessions contained different detailed patterns of spontaneous activity. ME=motion energy, au=arbitrary units, GPU = graphics processing unit.

Expanded insets of Fig 4 (d1), or walk and whisk Rastermap group (a, white dashed box) and Fig 4 (d2), or whisk Rastermap group (c, white dashed box), shown aligned to walk speed and whisker motion energy (b, top, red, and bottom, blue, respectively). A blue/green/yellow (low/mid/high) heat map was applied to individually z-scored neural activity (a), as indicated by scale bar (bottom right). Neural data is shown vertically temporally aligned to behavioral arousal and movement data (b). Walk speed (red) and whisker motion energy (blue) are shown for this example dorsal mount session. Red and blue arrowheads indicate temporal alignment of walk and whisk bouts, respectively, between neural and behavioral data. ME=motion energy.

Expanded insets of Fig 5 (d1), referred to here as the walk and whisk Rastermap group (a, white dashed box) and Fig 5 (d2), referred to here as the whisk Rastermap group (c, white dashed box), shown aligned to walk speed and whisker motion energy (b, top, red, and bottom, blue, respectively). A blue/green/yellow (low/mid/high) heat map was applied to individually z-scored neural activity (a), as indicated by scale bar (bottom right). Neural data is shown temporally aligned to behavioral arousal and movement data (b). Walk speed (red) and whisker motion energy (blue) are shown for this example side mount session. Red and blue arrowheads indicate temporal alignment of walk and whisk bouts between neural and behavioral data. ME=motion energy.

Heterogeneity of arousal and movement correlations with neural activity in the dorsal and side mount preparations. a) Color coded correlations of dF/F with whisker motion energy in individual neurons of the dorsal preparation in a different example session from the same mouse as in Fig. 4, with large positive correlations shown in blue, large negative correlations shown in red, and small correlations shown in white/light blue/light red. b) Histograms of whisk ME, pupil diameter, and walk speed (cm/s) for the same example session as in a). c) Normalized mean of mean correlations of neural activity with behavioral arousal primitives of whisker motion energy (blue; mean: MIN = 0.00, MAX = 0.05; standard deviation (STD): MIN = 0.002, MAX = 0.045), pupil diameter (gray; mean: MIN = 0.00, MAX = 0.06; STD: MIN = 0.004, MAX = 0.038), and walk speed (red; mean: MIN = 0.00, MAX = 0.02; STD: MIN = 0.004, MAX = 0.018) for each CCF area across eight sessions from the same dorsal mount mouse shown in Fig. 4. Mean whisker motion energy correlations with neural activity (dF/F) across these 8 sessions from the same mouse were significantly more than zero (p<0.05, median t(7)=3.0, single-sample t-test; python: scipy.stats.ttest_1samp) for 24 of the 27 CCF areas with at least 20 neurons present. The areas with mean correlations not significantly larger than zero were left SSp-m, SSp-n, and SSp-un. Mean pupil diameter correlations with neural activity (dF/F) were significantly more than zero (p<0.05, median t(7)=1.3, single-sample t-test) for 8 of the 27 CCF areas, including left VISp, VISam, VISpm, MOp, and SSp-ll, SSp-ul, and right VISp and SSp-ul. Mean walk speed correlations with neural activity (dF/F) were not significantly more than zero (p<0.05, median t(7)=1.0, single-sample t-test) in any of the 27 CCF areas. d) Color coded correlations (same lookup table as in a) of dF/F with whisker motion energy in individual neurons of the side mount preparation in an example session from the same mouse as in Figs 5 and 6. e) Histograms of whisk ME, pupil diameter, and walk speed (cm/s) for the same example session as in d). f) Normalized mean of mean correlations of neural activity with behavioral arousal primitives of whisker motion energy (blue; mean: MIN = 0.00, MAX = 0.08; standard deviation (STD): MIN = 0.000, MAX = 0.043), pupil diameter (gray; mean: MIN = 0.00, MAX = 0.02; STD: MIN = 0.000, MAX = 0.034), and walk speed (red; mean: MIN = 0.00, MAX = 0.01; STD: MIN = 0.000, MAX = 0.029) for each CCF area across eight sessions from the same side mount mouse shown in Figs 5 and 6. Mean whisker motion energy correlations with neural activity (dF/F) across these 8 sessions from the same mouse were significantly more than zero (p<0.05, median t(7)=5.3, single-sample t-test; python: scipy.stats.ttest_1samp) for 23 of the 23 CCF areas with at least 20 neurons present. Mean pupil diameter correlations with neural activity (dF/F) were significantly more than zero (p<0.05, median t(7)=1.2, single-sample t-test) for the right VISl and right TEa areas only. Mean walk speed correlations with neural activity (dF/F) were not significantly more than zero (p<0.05, median t(7)=1.1, single-sample t-test) in any of the 23 CCF areas.

Example expanded alignment of high-level behaviors and primary corresponding BSOiD motifs, arousal measures, and Rastermap sorted neural data from side mount preparation, same example session as in Figs 5, 6. a) Inset (ii) from Fig 6a, an example of whisk behavior. Whisker motion energy (solid blue line, top) shown aligned to BSOiD motif #2 (one-hot encoded, solid blue square-wave line; up=1 (ON), down=0 (OFF), and Rastermap sorted neural activity (z-scored for each neuron; blue=min, green=intermediate, yellow=high) for this example session. Number of neurons=5678. b) Same session and display as in a), but for inset (iii) walk and BSOiD motif #13 (yellow) from Fig 6a. White vertical dashed lines are aligned with major walking bouts. ME=motion energy.