def init_surfaces(self): ap = oa.RectangularAperture([self.side_length, self.side_length]) # s1 = os.Surface(x=self.x, xn=-self.xn, xt=self.xt, n=self.n, material=self.material, aperture=ap) s1 = os.Surface(x=np.array([0, 0, 0, 1]), xn=-self.xn, xt=self.xt, n=self.n, material=self.material, aperture=ap) s1.set_rotation_internal(0, self.apex_angle / 2) s1_pos = np.array( [0, 0, -np.sin(self.apex_angle / 2) * self.side_length / 2, 1]) s1.set_position(s1_pos) # s2 = os.Surface(x=self.x, xn=self.xn, xt=self.xt, n=1.0, material=air, aperture=ap) s2 = os.Surface(x=np.array([0, 0, 0, 1]), xn=self.xn, xt=self.xt, n=1.0, material=air, aperture=ap) s2.set_rotation_internal(0, -self.apex_angle / 2) s2_pos = np.array( [0, 0, np.sin(self.apex_angle / 2) * self.side_length / 2, 1]) s2.set_position(s2_pos) self.surfaces = [s1, s2]
def init_surfaces(self): ap = oa.CircularAperture(self.size) s1 = os.Surface(x=np.array([0, 0, 0, 1]), xn=-self.xn, xt=self.xt, n=self.n, material=self.material, aperture=ap) s2 = os.Surface(x=np.array([0, 0, self.thickness, 1]), xn=self.xn, xt=self.xt, n=self.n, material=air, aperture=ap) self.surfaces = [s1, s2]
def init_surfaces(self): ap = oa.InifiniteAperture() self.surfaces = [ os.Surface(x=np.array([0, 0, 0, 1]), xn=-self.xn, xt=self.xt, n=self.n, material=self.material, aperture=ap) ]
def init_surfaces(self): ap = oa.CircularAperture(self.size) # s1 = os.SphericalSurface(x=self.x, xn=-self.xn, xt=self.xt, n=self.n, r=self.r1, # material=self.material, aperture=ap) s1 = os.SphericalSurface(x=np.array([0, 0, 0, 1]), xn=-self.xn, xt=self.xt, n=self.n, r=self.r1, material=self.material, aperture=ap) # s2 = os.Surface(x=self.x, xn=self.xn, xt=self.xt, n=1.0, material=air, aperture=ap) s2 = os.Surface(x=np.array([0, 0, self.thickness, 1]), xn=self.xn, xt=self.xt, n=1.0, material=air, aperture=ap) # s2.setPosition(self.x+np.array([0,0,self.thickness,0])) self.surfaces = [s1, s2]
def init_surfaces(self): ap = oa.CircularAperture(size=self.size) s1 = os.Surface(x=np.array([0, 0, 0, 1]), xn=-self.xn, xt=self.xt, n=self.n, material=self.material, aperture=ap) s1.set_rotation_internal(0, 0) # s2 = os.Surface(x=self.x, xn=self.xn, xt=self.xt, n=1.0, material=air, aperture=ap) s2 = os.Surface( x=np.array([0, 0, self.thickness, 1]), xn=self.xn, xt=self.xt, n=1.0, material=air, aperture=ap, ) s2.set_rotation_internal(0, 0) self.surfaces = [s1]
def init_surfaces(self): self.logger.info("{0} Init grating surfaces".format(self)) ap = oa.RectangularAperture([self.side_length, self.side_length]) # s1 = os.Surface(x=self.x, xn=-self.xn, xt=self.xt, n=self.n, material=self.material, aperture=ap) s1 = os.Surface(x=np.array([0, 0, 0, 1]), xn=-self.xn, xt=self.xt, n=self.n, material=self.material, aperture=ap) s1.set_rotation_internal(0, 0) # s2 = os.Surface(x=self.x, xn=self.xn, xt=self.xt, n=1.0, material=air, aperture=ap) s2 = os.Surface(x=np.array([0, 0, self.thickness, 1]), xn=self.xn, xt=self.xt, n=1.0, material=air, aperture=ap, grating_period=self.grating_period, m=self.m) s2.set_rotation_internal(0, 0) self.surfaces = [s1, s2]