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
Trueif the phase is in degrees. Defaults toTrue.- dBmbool, optional
Set to
Trueif the magnitude is in dBm. Defaults toTrue.
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.