kaira.utils.estimate_signal_power

kaira.utils.estimate_signal_power(signal: Tensor, dim: int | Tuple[int, ...] | None = None, keepdim: bool = False) Tensor[source]

Estimate the power of a signal.

Parameters:
  • signal (torch.Tensor) – The input signal (real or complex).

  • dim (Optional[Union[int, Tuple[int, ...]]]) – Dimensions to reduce when calculating power. If None, uses all dimensions.

  • keepdim (bool) – Whether to keep the reduced dimensions in the output. Default is False.

Returns:

Signal power estimation.

Return type:

torch.Tensor