watex.utils.rhophi2z#
- watex.utils.rhophi2z(rho, phi, freq)[source]#
Convert impedance-style information given in Rho/Phi format into complex valued Z.
- Parameters:
rho (ArrayLike 1D/2D) – Resistivity array in \(\Omega.m\). If array is two-dimensional, it should be 2x2 array (real).
phi (ArrayLike 1D/2D) – Phase array in degree (\(\degree\)). If array is two-dimensional, it should be 2x2 array (real).
freq (float, arraylike 1d) – Frequency in Hz
- Returns:
Z – Z dimension depends to the inputs array rho and phi.
- Return type:
Arraylike 1d or 2d , complex
Examples
>>> import numpy as np >>> from watex.utils.exmath import rhophi2z >>> rhophi2z (823 , 25 , 500 ) array([1300.00682824+606.20313966j]) >>> rho = np.array ([[823, 700], [723, 526]] ) >>> phi = np.array ([[45, 50], [90, 180]]) >>> rhophi2z (rho, phi , freq= 500 ) array([[ 1.01427314e+03+1.01427314e+03j, 8.50328081e+02+1.01338154e+03j], [ 8.23227764e-14+1.34443297e+03j, -1.14673449e+03+1.40434473e-13j]]) >>> rhophi2z (np.array ( [ 823, 700]) , np.array ([45, 50 ]) , [500, 700] ) array([1014.27313876+1014.27313876j, 1006.12175325+1199.04921402j]) >>> rho = np.abs (np.random.randn (7, 3 ) * 100 ) >>> phi = np.abs ( np.random.randn (7, 3 ) *180 % 90 ) >>> freq = np.abs ( np.random.randn (7) * 100 ) >>> rhophi2z (rho , phi , freq )