dbm_to_watt#

sionna.phy.utils.dbm_to_watt(x_dbm: float | torch.Tensor, precision: Literal['single', 'double'] | None = None, device: str | None = None) torch.Tensor[source]#

Converts the input [dBm] to Watt.

Parameters:
  • x_dbm (float | torch.Tensor) – Input value in dBm.

  • precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None, precision is used.

  • device (str | None) – Device for the output tensor. If None and x_dbm is a tensor, uses the device of x_dbm. Otherwise uses device.

Outputs:

x_w – Input value converted to Watt.

Examples

import torch
from sionna.phy.utils import dbm_to_watt

x = torch.tensor(30.0)  # 30 dBm
print(dbm_to_watt(x).item())
# 1.0