예제 #1
0
파일: Xtal.py 프로젝트: enricovirgilli/lll
 def __set_g(self, g):
     self.__g = array(g)
     self.gnorm = Physics.norm(g)
     self.gnormalized = Physics.normalize(g)
     # angular coordinates (azimuth and colatitude) of the g versor
     self.gtheta = math.acos(self.gnormalized[2])
     self.gphi = Physics.atan2(g[1], g[0])
예제 #2
0
 def __set_k(self, k):
     self.__k = array(k)
     self.knorm=Physics.norm(k)
     self.knormalized = Physics.normalize(k)
     # Calculates wavelength and energy of the photon
     if self.knorm==0.:
         self.__e, self.__lam=0., '+inf'
     else:
         self.__lam=2.*pi/self.knorm
         self.__e=Booklet.hc/self.__lam
예제 #3
0
파일: Xtal.py 프로젝트: enricovirgilli/lll
 def __set_g(self, g):
 
     self.__g = array(g)
     
     self.gnorm = Physics.norm(g)
 
     self.gnormalized = Physics.normalize(g)
     
     # angular coordinates of the reciprocal lattice vector g
     # gtheta is the polar angle (the angle between z axis and g vector)
     # gphi is the azimuthal angle (in the plane xy, from the x axis)
     self.gtheta = math.acos(self.gnormalized[2])
 
     self.gphi = Physics.atan2(g[1], g[0])