Correct the K_ratio function.
Basicaly replace k by its complement, sqrt(1-k**2) when k<1/sqrt(2).
@@ -88,7 +88,7 @@ class CPW(Media):
k1 = self.k1
if (0 <= k1 <= 1/sqrt(2)):
- return pi/(log(2*(1+sqrt(k1))/(1-sqrt(k1)) ))
+ return pi/log(2*(1+sqrt(sqrt(1-k1**2)))/(1-sqrt(sqrt(1-k1**2))))
elif (1/sqrt(2) < k1 <= 1):
return (log(2*(1+sqrt(k1))/(1-sqrt(k1)) ))/pi
