ooragan.convert_magphase_to_complex#
- ooragan.convert_magphase_to_complex(mag: NDArray, phase: NDArray, deg: bool = True, dBm: bool = True) tuple[NDArray, NDArray][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.