def local_transform (   self  ) 

Reimplemented in reflector, dielectric_interface, paraxial_spherical_mirror, spherical_mirror, grating, phase_plate, and faraday_rotator.

Definition at line 564 of file general_optics.py.

00564                                  :
00565                 "by default, do abcd_transform on self.beam, assuming small angles"
00566                 ar=Numeric.array
00567                 dot=Numeric.dot
00568                 tr=Numeric.transpose
00569                 xp, yp, zp=tuple(self.beam.local_direction)  #it better be a small angle, so sin(theta)=theta for this to work
00570                 dx, dy, dz=tuple(self.beam.local_x0) #dz should always be zero in these coordinates
00571                 x1,xp1, y1, yp1 =self.abcd_transform((dx, xp, dy, yp))
00572                 sx=-(xp1-xp) #this is sort of a sine of a rotation angle of x about y, with the right sign
00573                 if abs(sx) > 0.25:
00574                         raise ValueError("x-angle is too big to by paraxial... %.3f" % sx)
00575                         
00576                 cx=math.sqrt(1-sx*sx)
00577                 sy=-(yp1-yp) #this is sort of a sine of a rotation angle of y about x, with the right sign
00578                 if abs(sy) > 0.25:
00579                         raise ValueError("y-angle is too big to by paraxial... %.3f" % sy)
00580                 cy=math.sqrt(1-sy*sy)
00581                 rot=dot(ar(((cx, 0, -sx),(0,1,0),(sx,0,cx))),ar(((1,0,0),(0,cy,-sy),(0,sy,cy))))
00582                 self.beam.transform(self.globalize_transform(rot))
00583                 self.q_transform()
00584                 
        def intersect(self, from_point, from_direction):


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