Skip to main content
. 2023 Jul 4;12:e82697. doi: 10.7554/eLife.82697

Figure 1. Quantification of the real-time phase detection algorithm performance.

(A) LFP signal recorded from the hippocampus is amplified and processed in Real-Time eXperimental Interface (RTXI) (https://github.com/ndlBU/phase_specific_stim). The signal is first filtered using an FIR filter in the theta range (4–12 Hz) and then a real-time phase detection algorithm predicts the next extrema. At the predicted time, a TTL pulse is sent to the laser which delivers light through fiber optics to the dentate gyrus (DG) region of the hippocampus to activate tagged neurons. (B) Sample stimulation shows the superior performance of the predictive algorithm in comparison to the 6 Hz periodic stimulation. (C) (Ci) Normalized polar histogram shows the phases of stimulation in the cases of peak, trough, and periodic 20 Hz and 6 Hz stimulation. Dotted lines indicate the accepted peak (pink) and trough (blue) stimulation phase (within quarter cycle). Note that 20 Hz stimulation overlaps completely with 6 Hz stimulation because both are fixed frequencies. (Cii) Confusion matrices indicate that peak and trough stimulation are specific to the desired phase of the stimulation. Stimulations are considered true if they take place within –π/4 to π/4 of the desired phase. The false entry for the No Stim case represents the true negative rate (TNR) or specificity. The true entry for the Stim case represents the true positive rate (TPR) or sensitivity.

Figure 1.

Figure 1—figure supplement 1. Summary data for excluded animals.

Figure 1—figure supplement 1.

For 17 animals, we observed less than 5% light-induced freezing in at least three of the four light-induced stimulation conditions (20 Hz, 6 Hz, peak, trough). Data from these animals were excluded from further analysis.
Figure 1—figure supplement 2. Theta power during motion and freezing epochs.

Figure 1—figure supplement 2.

The average theta power did not change between motion and freezing epochs (p>0.05, t-test on log-normalized data).