Signal Measurement¶
Basic time-domain metrics for characterising a signal’s amplitude, energy, and information content.
- pyminidsp.dot(a, b)[source]¶
Compute the dot product of two vectors.
Compute the dot product of two vectors: the sum of element-wise products
a[0]*b[0] + a[1]*b[1] + ...If the arrays differ in length, only the first
min(len(a), len(b))elements are used.
- pyminidsp.entropy(a, clip=False)[source]¶
Compute the normalized entropy of a distribution.
Returns a value between 0.0 (all energy concentrated in one bin) and 1.0 (energy spread equally across all bins).
- Parameters:
a – Input distribution.
clip – If
True, ignore negative values. IfFalse, square all values first.
- Return type:
- pyminidsp.energy(a)[source]¶
Compute signal energy: sum of squared samples.
Compute signal energy: sum of squared samples.
\[E = \sum_{n=0}^{N-1} x[n]^2\]