spectral_connectivity.statistics.coherence_rate_adjustment#
- coherence_rate_adjustment(firing_rate_condition1, firing_rate_condition2, spike_power_spectrum, homogeneous_poisson_noise=0, dt=1)[source]#
Correction for the spike-field or spike-spike coherence when the conditions have different firing rates.
When comparing the coherence of two conditions, a change in firing rate results in a change in coherence without an increase in coupling. This adjustment modifies the coherence of one of the conditions, so that a difference in coherence between conditions indicates a change in coupling, not firing rate. See [1] for details.
If using to compare spike-spike coherence, not that the coherence adjustment must be applied twice, once for each spike train.
Adjusts firing_rate_condition1 to firing_rate_condition2.
- Parameters:
firing_rate_condition1 (float) – Average firing rates for each condition.
firing_rate_condition2 (float) – Average firing rates for each condition.
spike_power_spectrum (ndarray, shape (n_frequencies,)) – Power spectrum of the spike train in condition 1.
homogeneous_poisson_noise (float, optional) – Beta in [1].
dt (float, optional) – Size of time step.
- Returns:
rate_adjustment_factor
- Return type:
ndarray, shape (n_frequencies,)
References
[1]Aoi, M.C., Lepage, K.Q., Kramer, M.A., and Eden, U.T. (2015). Rate-adjusted spike-LFP coherence comparisons from spike-train statistics. Journal of Neuroscience Methods 240, 141-153.