Gamma coherence is the alignment of population responses across pulses or gamma episodes. These examples compare two-cell timing references with Poisson-PING phase sweeps that measure the response of E-cells 1-5, plus a separate raster with a periodic green waveform as a timing reference.
Coherence is population timing alignment, not simply high firing rate. A pulse at a compatible gamma phase can reinforce a common response, while a mismatched pulse can land during inhibition or at a conflicting phase. Poisson PING makes this distinction clear because individual spikes vary while a phase-dependent population response can remain.
For each sampled pulse phase
All five examples live in one notebook, chapter38.ipynb.
A shared model block defines the RTM/WB gating functions (m_e_inf,
h_e_inf, tau_h_e, n_e_inf, tau_n_e, and their _i inhibitory-cell
counterparts) and the synaptic-delay solver tau_d_q, reused by every
example below.
simulate_two_cell/simulate_gamma_coherence_1/plot_gamma_coherence_1plot two-cell inhibitory currents with E/I spike times and periodic timing markers.simulate_gamma_coherence_2/plot_gamma_coherence_2compare coupled inhibition with its mean-inhibition approximation (reusingsimulate_two_cell).simulate_poisson_ping/_poisson_ping_loop(numba-accelerated) build the Chapter 38 all-to-all Poisson-PING network, shared by all threePOISSON_PING_3_*examples below.simulate_poisson_ping_mismatched_pulsessweeps pulse phase for a 29 ms period (P_MISMATCHED_PULSES) via the sharedsimulate_poisson_ping_phase_sweep, plotting E-cell-1-5 spike counts with a linear fit.simulate_poisson_ping_plus_green/plot_poisson_ping_plus_greendisplay a Poisson-PING E/I raster with a green periodic timing waveform.simulate_poisson_ping_plus_pulsessweeps pulse phase for a 31 ms period (P_PLUS_PULSES), reusing the same shared sweep helper.
For the sweep plots, compare E-cell-1-5 spike counts across phase and inspect the fitted slope rather than reading them as rasters. Use the green waveform and raster only in its dedicated example to relate a population episode to the periodic timing reference.
- Run
simulate_gamma_coherence_1/plot_gamma_coherence_1andsimulate_gamma_coherence_2/plot_gamma_coherence_2. - Run
simulate_poisson_ping_plus_green/plot_poisson_ping_plus_greento inspect its raster and waveform. - Compare the two phase-versus-spike-count sweeps
(
simulate_poisson_ping_mismatched_pulsesandsimulate_poisson_ping_plus_pulses).
Chapter 23 introduces pulse timing, Chapter 30 PING, Chapter 32 Poisson PING, and Chapter 37 thresholding.
Open chapter38.ipynb in Jupyter, or via the Colab badge
at the top of the notebook, and run all cells top to bottom. Poisson-PING
output varies across runs unless a seed is fixed, so compare qualitative
timing rather than exact spike identities.