class brainpy.measure.voltage_fluctuation(potentials, numpy=True, method='loop')[source]#

Calculate neuronal synchronization via voltage variance.

The method comes from [1] [2] [3].

First, average over the membrane potential \(V\)

\[V(t) = \frac{1}{N} \sum_{i=1}^{N} V_i(t)\]

The variance of the time fluctuations of \(V(t)\) is

\[\sigma_V^2 = \left\langle \left[ V(t) \right]^2 \right\rangle_t - \left[ \left\langle V(t) \right\rangle_t \right]^2\]

where \(\left\langle \ldots \right\rangle_t = (1 / T_m) \int_0^{T_m} dt \, \ldots\) denotes time-averaging over a large time, \(\tau_m\). After normalization of \(\sigma_V\) to the average over the population of the single cell membrane potentials

\[\sigma_{V_i}^2 = \left\langle\left[ V_i(t) \right]^2 \right\rangle_t - \left[ \left\langle V_i(t) \right\rangle_t \right]^2\]

one defines a synchrony measure, \(\chi (N)\), for the activity of a system of \(N\) neurons by:

\[\chi^2 \left( N \right) = \frac{\sigma_V^2}{ \frac{1}{N} \sum_{i=1}^N \sigma_{V_i}^2}\]
  • potentials – The membrane potential matrix of the neuron group.

  • numpy – Whether we use numpy array as the functional output. If False, this function can be JIT compiled.

  • method

    The method to calculate all pairs of cross correlation.

    Supports two kinds of methods: loop and vmap.

    vmap method will consume much more memory.

    New in version


The synchronization index.

Return type: