a, Schematic showing the real-time place preference assay (RTPP). Light blue area (top) indicates the chamber paired with light stimulation when the mouse enters. Representative heatmaps showing locomotion trajectories for controls (middle) and ChR2-experessing (bottom) Vglut2-Cre mice in the RTPP test. b, Example image of viral expression in the MeApd of Vglut2-Cre animals. Scale bar = 200 μm. c, ChR2-expressing Vglut2-Cre animals display a negative preference towards the stimulation-couple chamber compared to EYFP-expressing controls. n = 4 mice (control) and 6 mice (ChR2). **P = 0.0095, Mann-Whitney test (two-sided). Boxplots: center = median, box = quartiles, whisker = 10–90 percentile. For detailed statistics information, see Supplementary Table 1.