db_to_lin#

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

Converts the input [dB] to linear scale.

Parameters:
  • x (float | torch.Tensor) – Input value in dB.

  • 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 is a tensor, uses the device of x. Otherwise uses device.

Outputs:

x_lin – Input value converted to linear scale.

Examples

import torch
from sionna.phy.utils import db_to_lin

x = torch.tensor(20.0)
print(db_to_lin(x).item())
# 100.0