skrf.mathFunctions.mag_2_db10

skrf.mathFunctions.mag_2_db10(z, zero_nan=True)[source]

Convert linear magnitude to dB.

Parameters:
  • z (array_like) – A complex number or sequence of complex numbers

  • zero_nan (bool, optional) – Replace NaN with zero. The default is True.

Returns:

z – Magnitude in dB given by 10*log10(|z|)

Return type:

array_like