spectral_entropy#
- class braintools.metric.spectral_entropy(lfp, dt, freq_range=(1, 100))#
Compute the normalized spectral entropy of an LFP signal.
- Parameters:
lfp (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – LFP signal with shape(n_time,)(multi-channel input is averaged into a single spectrum before the entropy is computed).dt (
float|Quantity) – Sampling interval (seconds if a float; converted if aQuantity).freq_range (
Tuple[float,float]) – Frequency range (Hz) for the entropy calculation.
- Returns:
entropy – Normalized spectral entropy in
[0, 1](0 = most regular / peaked, 1 = flat / most random).- Return type:
Array