def analysis.general_optics.principal_axis_angle (   q22  ) 

Definition at line 129 of file general_optics.py.

00129                              :
00130         a,b,c,d=tuple(Numeric.ravel(q22))
00131         if abs(d-a) < 1e-10: return 0
00132         #if we are passed a q-tensor for which 2b/(d-a) isn't real, this is wrong!
00133         y=(2*b/(d-a))
00134         qtheta=math.atan(y.real)/2.0 #principal axis direction of q
00135         if abs(y.real) > 1e-20 and abs(y.imag)/abs(y.real) > 1e-6:
00136                 raise "Bad tensor to diagonalize: y="+str(y)+" theta=: "+str(qtheta/deg)+"\n"+str(q22)
00137                 
00138         return qtheta
00139 
def expand_to_2x2tensor(object):


Generated on Wed Nov 21 10:18:32 2007 for analysis by  doxygen 1.5.4