saftig.evaluation.common¶
Shared functionality for all other modules
Functions¶
|
calculate the total power of a signal (square or RMS) |
|
Calculate the root mean square value of an array |
Module Contents¶
- saftig.evaluation.common.total_power(a)¶
calculate the total power of a signal (square or RMS)
>>> import saftig, numpy >>> signal = numpy.ones(10) * 2 >>> saftig.evaluation.total_power(signal) 4.0
- Parameters:
a (collections.abc.Sequence | numpy.typing.NDArray) –
- Return type:
float
- saftig.evaluation.common.rms(a)¶
Calculate the root mean square value of an array
- Parameters:
a (collections.abc.Sequence | numpy.typing.NDArray) –
- Return type:
float