(A) Mean power spectra for baseline, peak-triggered stimulation, and trough-triggered stimulation trials, while mice were in the retrieval segment heading toward the reward arm (left) or the encoding segment prior to entering the trial start location at the end of the sample arm (right) (N = 4 electrodes from four mice used for triggering online feedback). Theta, low gamma, and high gamma frequency bands are highlighted. (B) Average light-evoked LFP response from N = 3 hippocampal electrodes for peak and trough-triggered stimulation trials (purple and teal traces, respectively), for both encoding and retrieval epochs (mean ± SEM). Gray traces indicate the average theta waveforms for baseline trials, aligned to the time a stimulus would have occurred, but for which no actual light pulse was present. (C) Locations of trigger electrodes (yellow) and passive recording electrodes (white) for four mice used in this experiment. The location of each lesion is indicated by red circles superimposed over histological sections (DAPI stain, grayscale image of blue channel). Next to each of the images is a histogram of peak and trough stimulation phases, relative to the peak of high gamma power on that electrode for baseline (no stimulation) trials (indicated by 0°). High gamma power (a signature of synchronization between hippocampus and medial entorhinal cortex (Colgin et al., 2009), provides an absolute indication of theta phase, against which the time of our optogenetic stimulation can be compared. In all electrodes (except for the one trigger electrode in cortex, where high gamma was not measured), trough stimulation occurs after the peak of high gamma power, while peak stimulation occurs before the peak of high gamma.