sdr.power(x: ArrayLike, db: bool = False) float

Measures the instantaneous power of a time-domain signal \(x[n]\).

\[P = \left| x[n] \right|^2\]

Parameters:
x: ArrayLike

The time-domain signal \(x[n]\) to measure.

db: bool = False

Indicates whether to return the result in decibels (dB).

Returns:

The instantaneous power. If db=False, \(P\) is returned. If db=True, \(10 \log_{10} P\) is returned.