comnum.db2lin#

comnum.db2lin(x_db)#

Convert decibels to a linear ratio, 10^{x/10}.

Parameters:

x_db (float | array_like) – the ratio (dB).

Returns:

the linear ratio.

Return type:

float | numpy.ndarray

Raises:

ValueError – for values that are not real numbers.

Examples

>>> import comnum
>>> comnum.db2lin(20.0), comnum.db2lin([0.0, 10.0]).tolist()
(100.0, [1.0, 10.0])