Undo modified s2a() conversion codes, and anew,  swap S12 and S21 in the a2s() conversion formulas
@@ -4941,10 +4941,10 @@ def a2s(a, z0=50):
s = npy.array([
[
(A*z02 + B - C*z01.conj()*z02 - D*z01.conj() ) / denom,
- (2*(A*D - B*C)*npy.sqrt(z01.real * z02.real)) / denom,
+ (2*npy.sqrt(z01.real * z02.real)) / denom,
],
[
- (2*npy.sqrt(z01.real * z02.real)) / denom,
+ (2*(A*D - B*C)*npy.sqrt(z01.real * z02.real)) / denom,
(-A*z02.conj() + B - C*z01*z02.conj() + D*z01) / denom,
],
]).transpose()
@@ -5077,10 +5077,10 @@ def s2a(s, z0=50):
a = npy.array([
[
((z01.conj() + s[:,0,0]*z01)*(1 - s[:,1,1]) + s[:,0,1]*s[:,1,0]*z01) / denom,
- ((z01.conj() + s[:,0,0]*z01)*(z02.conj() + s[:,1,1]*z02) - s[:,0,1]*s[:,1,0]*z01*z02) / denom,
+ ((1 - s[:,0,0])*(1 - s[:,1,1]) - s[:,0,1]*s[:,1,0]) / denom,
],
[
- ((1 - s[:,0,0])*(1 - s[:,1,1]) - s[:,0,1]*s[:,1,0]) / denom,
+ ((z01.conj() + s[:,0,0]*z01)*(z02.conj() + s[:,1,1]*z02) - s[:,0,1]*s[:,1,0]*z01*z02) / denom,
((1 - s[:,0,0])*(z02.conj() + s[:,1,1]*z02) + s[:,0,1]*s[:,1,0]*z02) / denom,
],
]).transpose()
