sdr.peak_power(x: NDArray, axis: int | tuple[int, ...] | None = None, db: bool = False) float

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

\[P_{\text{peak}} = \max \left| x[n] \right|^2\]

Parameters:
x: NDArray

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

axis: int | tuple[int, ...] | None = None

Axis or axes along which to compute the peak power. The default is None, which computes the peak power of the entire array.

db: bool = False

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

Returns:

The peak power. If db=False, \(P_{\text{peak}}\) is returned. If db=True, \(10 \log_{10} P_{\text{peak}}\) is returned.