burst_synchrony_index

burst_synchrony_index#

class braintools.metric.burst_synchrony_index(spike_matrix, burst_threshold=3, max_isi=100.0, dt=None)#

Calculate burst synchrony index based on co-occurring burst events.

This measure identifies burst events in each spike train and quantifies the synchronization of these bursts across the population.

A burst is defined as a sequence of at least burst_threshold spikes with inter-spike intervals ≤ max_isi.

Parameters:
  • spike_matrix (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – Spike matrix with shape (n_time_steps, n_neurons).

  • burst_threshold (int) – Minimum number of spikes required to constitute a burst.

  • max_isi (float) – Maximum inter-spike interval within a burst (in time units).

  • dt (float) – Time step between successive samples. If None, uses brainstate default.

Returns:

Burst synchrony index between 0 (no burst synchrony) and 1 (perfect burst synchrony).

Return type:

float

Examples

>>> import jax.numpy as jnp
>>> import braintools as braintools
>>> # Create spike matrix with bursts
>>> spikes = jnp.zeros((1000, 10))
>>> # Add synchronized bursts
>>> for start in [100, 300, 600]:
>>>     for i in range(10):
>>>         spikes = spikes.at[start:start+5, i].set(1)
>>> sync_idx = braintools.metric.burst_synchrony_index(spikes)
>>> print(f"Burst synchrony: {sync_idx:.3f}")