Band power tells you how much signal lives in named ranges. Spectral features go further: they summarize the shape of the power spectrum, or the shape of the signal itself, as scalar values you can trend over time or compare across recordings. Each one captures something different about the signal.
Spectral edge frequency (SEF)
The spectral edge frequency at X% is the frequency below which X% of the total power in the spectrum lies. SEF 95% (SEF95) is the most common choice.
Formally: integrate the PSD from the lower analysis bound upward until the cumulative integral reaches 95% of the total; report that frequency.
- High SEF95 means power is spread into higher frequencies — a "faster" spectrum. Awake, alert, and beta-heavy states push it up.
- Low SEF95 means the spectrum is concentrated in slow rhythms. Sleep, sedation, and deeper anesthesia pull it down. SEF95 is one of the classic anesthesia-depth indices for exactly this reason.
SEF is sensitive to the upper bound of your PSD. If you integrate to 45 Hz, SEF95 has a ceiling around 43 Hz. Report the analysis range.
Median frequency (SEF 50%)
The median frequency is SEF at 50% — the frequency that splits the spectrum's power in half. It captures the same "where is the mass of the spectrum" idea as SEF95, but centers instead of edges. Median frequency is more robust to occasional high-frequency spikes (artifact) than SEF95.
Spectral entropy
Spectral entropy asks: how flat is the power spectrum? Treat the normalized PSD as a probability distribution over frequency bins and compute its Shannon entropy, then normalize by log(N) where N is the number of bins. The result lies in [0, 1].
- Entropy near 1: the spectrum is close to flat, like white noise or dense wide-band activity — no dominant rhythm.
- Entropy near 0: the spectrum is highly peaked — one narrow rhythm dominates, like strong occipital alpha with the eyes closed.
Spectral entropy is useful because it is agnostic to which band contains the peak. It just tells you how organized the spectrum is. It, too, is commonly used in anesthesia and sleep-depth monitoring.
Line length
Line length is a time-domain feature, not a spectral one, but it earns a place here because it correlates strongly with high- frequency content and is used alongside spectral measures.
For a signal x[n] of length N:
line_length = Σ |x[n] − x[n−1]| for n = 1 … N−1
It is the total absolute change in the signal — the length of the polyline you would draw connecting successive samples. Sharp, high-amplitude, or high-frequency activity increases it; smooth low-frequency activity keeps it low. Line length is a classic seizure-detection feature for this reason.
Raw line length scales linearly with the number of samples, and therefore with recording duration and sampling rate. A 10-minute clip has ~10× the line length of a 1-minute clip of the same signal. Before comparing across recordings, normalize:
line_length_per_second = line_length / duration_seconds
Without this normalization, "line length" is not a feature of the signal — it is mostly a feature of how long you recorded.
Hjorth parameters
Hjorth (1970) proposed three time-domain descriptors that between them approximate spectral properties without requiring an FFT. They are cheap to compute and still widely used.
Activity
The variance of the signal, Var(x). Equal to total power in the time domain. High activity = high-amplitude signal.
Mobility
The ratio of the standard deviation of the signal's first derivative to the standard deviation of the signal itself:Mobility = sqrt( Var(dx/dt) / Var(x) )
Mobility is a proxy for the mean frequency of the spectrum — a signal with more high-frequency content has faster derivatives and higher mobility.
Complexity
The ratio of the mobility of the first derivative to the mobility of the signal:Complexity = Mobility(dx/dt) / Mobility(x)
Complexity is a proxy for the bandwidth of the spectrum. A pure sine wave has complexity 1; broadband signals have higher complexity.
The three Hjorth parameters together give a compact, computationally cheap fingerprint of a signal's amplitude, dominant frequency, and bandwidth.
Choosing what to compute
- Track state changes over time (wake → sleep, sedation depth): SEF95, median frequency, spectral entropy.
- Detect transient events (spikes, seizures): line length (normalized), Hjorth activity and mobility.
- Summarize spectrum shape cheaply: Hjorth mobility and complexity.
- Compare across subjects: pair spectral features with relative band power rather than absolute — for the same reason.
None of these features stand alone. They are summaries, and each of them can be pushed around by artifact, filter choice, and (for SEF and entropy) the upper bound of the PSD you integrate. Always report those settings alongside the numbers.
NeuroTrace computes SEF, median frequency, spectral entropy, Hjorth parameters, and line length (normalized per second) per channel, and exports the full feature table to CSV.