Sweeps and alternating internal direction pulses are preserved during REM sleep. Top, raster plot with spike times (black ticks) of internal direction cells sorted by preferred firing direction, and tracked head direction (blue line), during a 2.5 s extract from an epoch of REM sleep. Note the theta-paced, leftright alternating packets of direction-correlated activity. Bottom, decoded sweeps (filled circles, colour-coded by time) from grid cells of one module and decoded internal direction from direction-tuned cells (green arrows) during four successive theta cycles (14 in the top panel). The grey line shows the reconstructed 2.5 s trajectory after smoothing with a wide gaussian kernel ( = 100 ms). For both position and internal direction, a Bayesian decoder was used, using tuning curves estimated by the LMT model during a preceding open-field foraging session.