Definition at line 115 of file general_optics.py. 00115 : 00116 "similarity transform a 2x2 tensor by angle k=cos(theta), s=sin(theta)." 00117 a,b,c,d=tens[0,0], tens[0,1], tens[1,0], tens[1,1] 00118 s2=s*s; k2=k*k; sk=s*k 00119 a1=a*k2+d*s2+sk*(b+c) 00120 b1=b*k2-c*s2+sk*(d-a) 00121 c1=c*k2-b*s2+sk*(d-a) 00122 d1=d*k2+a*s2-sk*(b+c) 00123 return Numeric.array(((a1,b1),(c1,d1))) 00124 def simil_tens(theta, tens):
|