ooragan.convert_magphase_to_complex#

ooragan.convert_magphase_to_complex(mag: ndarray[tuple[Any, ...], dtype[_ScalarT]], phase: ndarray[tuple[Any, ...], dtype[_ScalarT]], deg: bool = True, dBm: bool = True) tuple[ndarray[tuple[Any, ...], dtype[_ScalarT]], ndarray[tuple[Any, ...], dtype[_ScalarT]]][source]#

Converts magnitude and phase data into real and imaginary.

Parameters:
magNDArray

Magnitude array.

phaseNDArray

Phase array

degbool, optional

Set to True if the phase is in degrees. Defaults to True.

dBmbool, optional

Set to True if the magnitude is in dBm. Defaults to True.

Notes

This conversion is defined as

\[S_{21}^\text{complex} = 10^{\frac{|S_{21}|}{20}}e^{i\phi}\]

where the magnitude \(|S_{21}|\) is in dB and the phase \(\phi\) is in degrees.