Exemplo n.º 1
0
 def __init__(self,s0_or_sv,s1=None,s2=None,s3=None,wavelength = wl.Green):
     Ray.__init__(self,wavelength) # Set inderlying class
     self = [0.0]*4                # The 4 paraeters
     if isinstance(s0_or_sv,list) :
         for i in s0_or_sv:
             self[i] = s0_or_sv[i]
     else:
         self[0] = float(s0_or_sv)
         self[1] = float(s1)
         self[2] = float(s2)
         self[3] = float(s3)
Exemplo n.º 2
0
 def __init__(self,x = 1.0 ,y = 0.0 ,wavelength = wl.Default):
     """
     Constructorcutor to create a JonesVector
     param x complex component of jones vector (defaults to 1.0)
     param y component of jones vector (defults to 0.0)
     wavelength of Jones vector (defaults to Default)
     also accept single argument of current JonesVector
     """
     if isinstance(x,JonesVector):
         self.__init__(x.x,x.y,x.wavelength)
     else:
         Ray.__init__(self,wavelength)       # Set underlying wavelength
         self.x = complex(x)
         self.y = complex(y)