watt_to_dbm#
- sionna.phy.utils.watt_to_dbm(x_w: float | torch.Tensor, precision: Literal['single', 'double'] | None = None, device: str | None = None) torch.Tensor[source]#
Converts the input [Watt] to dBm.
- Parameters:
x_w (float | torch.Tensor) – Input value in Watt.
precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used.device (str | None) – Device for the output tensor. If None and x_w is a tensor, uses the device of x_w. Otherwise uses
device.
- Outputs:
x_dbm – Input value converted to dBm.
Examples
import torch from sionna.phy.utils import watt_to_dbm x = torch.tensor(1.0) # 1 Watt print(watt_to_dbm(x).item()) # 30.0