a, b, Speed profiles of mice after the stimulation of Vglut2+ChR2 CnF (a) and Vglut2+ChR2 PPN (b) neurons. Top panels show the location of optical stimulation in the CnF (a) and the PPN (b). Middle panels show colour plots of individual trials after the stimulation of Vglut2+ChR2 CnF (a) and Vglut2+ChR2 PPN (b) neurons (Fig. 1). The x axis represents time and the y axis represents trials at different stimulation frequencies. Data are aligned to the onset of stimulation (stim.). The colour gradient illustrates speed, with dark blue representing no movement and colours towards yellow representing the increase in speed (up to 120 cm s−1) of the mouse in the linear corridor. Bottom panels show speed profiles obtained as an average of the movements at each stimulation frequency. c, Latencies to onset of locomotion from the stimulation of Vglut2+ChR2 PPN (red) and Vglut2+ChR2 CnF (blue) neurons as a function of the stimulation frequency. Error bars indicate the 25th and 75th percentiles of the distribution. d, Post-stimulus locomotor speed plotted against pre-stimulus locomotor speed in Vglut2cre mice that had been injected in the PPN with AAV-DIO-ChR2–mCherry (n = 50 trials from N = 4 mice). e, Step frequency plotted against speed of locomotion for the stimulation of Vglut2+ChR2 PPN neurons (red, n = 84 trials from N = 5 mice) or Vglut2+ChR2 CnF neurons (blue, n = 173 trials from N = 9 mice).