neurodsp.burst.compute_burst_stats

neurodsp.burst.compute_burst_stats(bursting, fs)[source]

Compute statistics of bursts.

Parameters
bursting1d array

Boolean indication of where bursts are present in the input signal.

fsfloat

Sampling rate, in Hz.

Returns
stats_dictdict

Contains the following keys:

  • n_bursts: the number of bursts

  • duration_mean: mean duration of bursts, in seconds

  • duration_std: standard deviation of burst durations, in seconds

  • percent_burst: percent time in bursts

  • burst_rate: bursts/sec

Examples

Compute statistics of detected bursts:

>>> from neurodsp.sim import sim_combined
>>> from neurodsp.burst import detect_bursts_dual_threshold
>>> sig = sim_combined(n_seconds=10, fs=500,
...                    components={'sim_synaptic_current': {},
...                                'sim_bursty_oscillation' : {'freq': 10}})
>>> is_burst = detect_bursts_dual_threshold(sig, fs=500, dual_thresh=(1, 2), f_range=(8, 12))
>>> stats_dict = compute_burst_stats(is_burst, fs=500)

Examples using neurodsp.burst.compute_burst_stats

Burst Detection

Burst Detection