def where_fishnet(self, r): dd=self.resolution/4 xhr, yhr = self.xholesize/2-self.cornerradius, self.yholesize/2-self.cornerradius for cellc in self.cellcenters: if (in_zslab(r, cz=-self.slabcdist/2, d=self.slabthick) or in_zslab(r, cz=+self.slabcdist/2, d=self.slabthick)): if not in_xslab(r, cx=dd-self.delta/4, d=2*xhr) and not in_xslab(r, cx=dd+self.delta/4, d=2*xhr): return self.return_value # (do not change this line) return 0
def where_metal(self, r): for cellz in self.cell_centers(): #if (in_yslab(r, cy=self.resolution/2, d=self.resolution*2)): #h = 50e-6 #g = -50e-6 #if (in_ycyl(r, cx=h+g, cz=0, rad=30e-6) and not in_ycyl(r, cx=h+g, cz=0, rad=25e-6)): ## outer ring upper #if ((r.x()>0) or not in_zslab(r, cz=0, d=25e-6)): ## the notch in outer #return self.return_value #if (in_ycyl(r, cx=h+g, cz=0, rad=20e-6) and not in_ycyl(r, cx=h+g, cz=0, rad=15e-6)): ## outer ring upper #if ((r.x()<0) or not in_zslab(r, cz=0, d=15e-6)): ## the notch in outer #return self.return_value if (in_zslab(r, cz=self.resolution * 2 + self.DSOthick / 2, d=self.resolution * 2) and not in_zslab(r, cz=0, d=self.DSOthick)): h = 50e-6 g = -10e-6 # if (in_zcyl(r, cx=h + g, cy=0, rad=30e-6) and not in_zcyl( r, cx=h + g, cy=0, rad=25e-6)): ## outer ring upper if ((abs(r.x() - g) > h) or not in_yslab( r, cy=0, d=125e-6)): ## the notch in outer return self.return_value if (in_zcyl(r, cx=h + g, cy=0, rad=20e-6) and not in_zcyl( r, cx=h + g, cy=0, rad=15e-6)): ## inner ring if ((abs(r.x() - g) < h) or not in_yslab( r, cy=0, d=150e-6)): ## the notch in inner return self.return_value if (in_zcyl(r, cx=-h + g, cy=0, rad=30e-6) and not in_zcyl( r, cx=-h + g, cy=0, rad=25e-6)): ## outer ring lower if ((abs(r.x() - g) > h) or not in_yslab( r, cy=0, d=125e-6)): ## the notch in outer return self.return_value if (in_zcyl(r, cx=-h + g, cy=0, rad=20e-6) and not in_zcyl( r, cx=-h + g, cy=0, rad=15e-6)): ## inner ring if ((abs(r.x() - g) < h) or not in_yslab( r, cy=0, d=150e-6)): ## the notch in inner return self.return_value if ((abs(r.x() - g) > (h + 25e-6)) and in_yslab( r, cy=0, d=5e-6)): ## the connection to outer SRRs return self.return_value if ((abs(r.x() - g) < (h - 15e-6)) and in_yslab( r, cy=0, d=5e-6)): ## the connection to inner SRRs return self.return_value # if (in_xslab(r, cx=g, d=10e-6)): ## the horiz connection return self.return_value if (in_xslab(r, cx=2 * h + g, d=10e-6) or in_xslab( r, cx=-2 * h + g, d=10e-6)): ## the horiz connection return self.return_value return 0
def where_TiO2(self, r): for cellz in self.cell_centers(): xb = in_xslab(r, cx=0, d=self.size_x-self.cutw) ## define the junctions yb = in_yslab(r, cy=0, d=self.size_y-self.cutw) xs = in_xslab(r, cx=0, d=self.size_x-self.cutl) ## define the central square ys = in_yslab(r, cy=0, d=self.size_y-self.cutl) xh = in_xslab(r, cx=0, d=self.hole) ## define square hole in the middle yh = in_yslab(r, cy=self.holecy, d=self.hole) if (in_zslab(r, cz=cellz, d=self.thick) and (xs or ys or (xb and yb))) and not (xh and yh): return self.return_value return 0
def where_metal(self, r): for cellz in self.cell_centers(): if (in_zslab(r, cz=self.resolution/2, d=self.resolution*4) and not in_zslab(r, cz=20e-6, d=40e-6)): h = 50e-6 g = 00e-6 if (in_xslab(r, cx=g, d=36e-6) and in_yslab(r, cy=0, d=4e-6)): ## the vertical conductor of I-resonator return self.return_value if (in_xslab(r, cx=g, d=4e-6)): ## the horiz inconnection of resonatorsn return self.return_value if (in_yslab(r, cy=0, d=10e-6)): if (in_xslab(r, cx=g+(36e-6-4e-6)/2, d=4e-6) or in_xslab(r, cx=g-(36e-6-4e-6)/2, d=4e-6)): ## the horiz capacitor pads return self.return_value return 0
def where_fishnet(self, r): dd=self.resolution/4 xhr, yhr = self.xholesize/2-self.cornerradius, self.yholesize/2-self.cornerradius for cellc in self.cellcenters: if (in_zslab(r, cz=-self.slabcdist/2, d=self.slabthick) or in_zslab(r, cz=+self.slabcdist/2, d=self.slabthick)): if not (in_xslab(r, cx=dd, d=2*xhr) and in_yslab(r, cy=dd, d=self.yholesize)) and \ not (in_xslab(r, cx=dd, d=self.xholesize) and in_yslab(r, cy=dd, d=2*yhr)) and \ not in_zcyl(r, cx=dd+xhr, cy=dd+yhr, rad=self.cornerradius) and \ not in_zcyl(r, cx=dd-xhr, cy=dd+yhr, rad=self.cornerradius) and \ not in_zcyl(r, cx=dd+xhr, cy=dd-yhr, rad=self.cornerradius) and \ not in_zcyl(r, cx=dd-xhr, cy=dd-yhr, rad=self.cornerradius): return self.return_value # (do not change this line) return 0
def where_TiO2(self, r): for cellz in self.cell_centers(): xb = in_xslab(r, cx=0, d=self.size_x - self.cutw) ## define the junctions yb = in_yslab(r, cy=0, d=self.size_y - self.cutw) xs = in_xslab(r, cx=0, d=self.size_x - self.cutl) ## define the central square ys = in_yslab(r, cy=0, d=self.size_y - self.cutl) xh = in_xslab(r, cx=0, d=self.hole) ## define square hole in the middle yh = in_yslab(r, cy=self.holecy, d=self.hole) if (in_zslab(r, cz=cellz, d=self.thick) and (xs or ys or (xb and yb))) and not (xh and yh): return self.return_value return 0
def where_TiO2(self, r): for cellz in self.cell_centers(): zz = in_zslab(r, cz=cellz, d=self.zs) yy = in_yslab(r, cy=0, d=self.ys) xx = in_xslab(r, cx=0, d=self.xs) if (zz and yy and xx): return self.return_value return 0
def where_metal(self, r): for cellz in self.cell_centers(): zz = in_zslab(r, cz=cellz, d=self.zs) yy = not in_yslab(r, cy=self.resolution/2, d=self.ys) xx = not in_xslab(r, cx=self.resolution/2, d=self.xs) if (zz and (yy or xx)): return self.return_value return 0
def where_wire(self, r): for cellc in self.cellcenters: if in_xslab(r, cx=self.resolution/4, d=self.wirecut): return 0 if in_xcyl(r, cy=self.size_y/2+self.resolution/4, cz=cellc, rad=self.wirethick) or \ in_xcyl(r, cy= -self.size_y/2+self.resolution/4, cz=cellc, rad=self.wirethick): return self.return_value # (do not change this line) return 0
def where_metal(self, r): ## XXX for cellz in self.cell_centers(): zz = in_zslab(r, cz=cellz+self.zs/2+10e-6/2 + self.metalspacing, d=10e-6) xx = in_xslab(r, cx=0, d=self.xyspacing-10e-6) yy = in_yslab(r, cy=0, d=self.xyspacing-10e-6) if (zz and yy and xx): return self.return_value return 0
def where_wire(self, r): for cellz in self.cell_centers(): #if (in_xcyl(r, cy=self.resolution/4, cz=cellz, rad=self.radius)): #return self.return_value if (in_zslab(r, cz=cellz, d=self.thick) and in_xslab( r, cx=self.resolution / 4, d=self.width)): # XXX return self.return_value return 0
def where_wire(self, r): for cellc in self.cellcenters: if in_xslab(r, cx=self.resolution / 4, d=self.wirecut): return 0 if in_xcyl(r, cy=self.size_y/2+self.resolution/4, cz=cellc, rad=self.wirethick) or \ in_xcyl(r, cy= -self.size_y/2+self.resolution/4, cz=cellc, rad=self.wirethick): return self.return_value # (do not change this line) return 0
def where_metal(self, r): if in_zslab(r, cz=self.apertureth / 2, d=self.apertureth) and not ( in_yslab(r, cy=0e-6, d=self.apertured) and in_xslab(r, cx=0e-6, d=self.apertured)): return self.return_value if in_zslab(r, cz=self.wirez, d=self.wireth) and in_yslab( r, cy=self.wirey, d=self.wireth): return self.return_value return 0
def where_metal(self, r): for cellz in self.cell_centers(): #if (in_yslab(r, cy=self.resolution/2, d=self.resolution*2)): #h = 50e-6 #g = -50e-6 #if (in_ycyl(r, cx=h+g, cz=0, rad=30e-6) and not in_ycyl(r, cx=h+g, cz=0, rad=25e-6)): ## outer ring upper #if ((r.x()>0) or not in_zslab(r, cz=0, d=25e-6)): ## the notch in outer #return self.return_value #if (in_ycyl(r, cx=h+g, cz=0, rad=20e-6) and not in_ycyl(r, cx=h+g, cz=0, rad=15e-6)): ## outer ring upper #if ((r.x()<0) or not in_zslab(r, cz=0, d=15e-6)): ## the notch in outer #return self.return_value if (in_zslab(r, cz=self.resolution*2 + self.DSOthick/2, d=self.resolution*2) and not in_zslab(r, cz=0, d=self.DSOthick)): h = 50e-6 g = -10e-6 # if (in_zcyl(r, cx=h+g, cy=0, rad=30e-6) and not in_zcyl(r, cx=h+g, cy=0, rad=25e-6)): ## outer ring upper if ((abs(r.x()-g)>h) or not in_yslab(r, cy=0, d=125e-6)): ## the notch in outer return self.return_value if (in_zcyl(r, cx=h+g, cy=0, rad=20e-6) and not in_zcyl(r, cx=h+g, cy=0, rad=15e-6)): ## inner ring if ((abs(r.x()-g)<h) or not in_yslab(r, cy=0, d=150e-6)): ## the notch in inner return self.return_value if (in_zcyl(r, cx=-h+g, cy=0, rad=30e-6) and not in_zcyl(r, cx=-h+g, cy=0, rad=25e-6)): ## outer ring lower if ((abs(r.x()-g)>h) or not in_yslab(r, cy=0, d=125e-6)): ## the notch in outer return self.return_value if (in_zcyl(r, cx=-h+g, cy=0, rad=20e-6) and not in_zcyl(r, cx=-h+g, cy=0, rad=15e-6)): ## inner ring if ((abs(r.x()-g)<h) or not in_yslab(r, cy=0, d=150e-6)): ## the notch in inner return self.return_value if ((abs(r.x()-g)>(h+25e-6)) and in_yslab(r, cy=0, d=5e-6)): ## the connection to outer SRRs return self.return_value if ((abs(r.x()-g)<(h-15e-6)) and in_yslab(r, cy=0, d=5e-6)): ## the connection to inner SRRs return self.return_value # if (in_xslab(r, cx=g, d=10e-6)): ## the horiz connection return self.return_value if (in_xslab(r, cx=2*h+g, d=10e-6) or in_xslab(r, cx=-2*h+g, d=10e-6)): ## the horiz connection return self.return_value return 0
def where_metal(self, r): for cellz in self.cell_centers(): if (in_zslab(r, cz=self.resolution / 2, d=self.resolution * 4) and not in_zslab(r, cz=20e-6, d=40e-6)): h = 50e-6 g = 00e-6 if (in_xslab(r, cx=g, d=36e-6) and in_yslab( r, cy=0, d=4e-6)): ## the vertical conductor of I-resonator return self.return_value if (in_xslab( r, cx=g, d=4e-6)): ## the horiz inconnection of resonatorsn return self.return_value if (in_yslab(r, cy=0, d=10e-6)): if (in_xslab(r, cx=g + (36e-6 - 4e-6) / 2, d=4e-6) or in_xslab(r, cx=g - (36e-6 - 4e-6) / 2, d=4e-6)): ## the horiz capacitor pads return self.return_value return 0
def where_metal(self, r): for cellz in self.cell_centers(): #zz = in_zslab(r, cz=cellz + (self.BarPeriod-self.BarThick)/2, d=self.BarThick) zz = in_zslab(r, cz=cellz, d=self.BarThick+10e-6) and not in_zslab(r, cz=cellz, d=self.BarThick) yy = in_yslab(r, cy=(cellz/self.monzd)*self.YCellShift, d=self.BarWidth) yy2 = in_yslab(r, cy=(cellz/self.monzd)*self.YCellShift + self.size_y, d=self.BarWidth) yy3 = in_yslab(r, cy=(cellz/self.monzd)*self.YCellShift - self.size_y, d=self.BarWidth) xx = in_xslab(r, cx=self.resolution/4, d=self.size_x - 10e-6) if (zz and (yy or yy2 or yy3) and xx): return self.return_value return 0
def where_metal(self, r): for cellz in self.cell_centers(): #zz = in_zslab(r, cz=cellz + (self.BarPeriod-self.BarThick)/2, d=self.BarThick) zz = in_zslab(r, cz=cellz, d=self.BarThick + 10e-6) and not in_zslab(r, cz=cellz, d=self.BarThick) yy = in_yslab(r, cy=(cellz / self.monzd) * self.YCellShift, d=self.BarWidth) yy2 = in_yslab(r, cy=(cellz / self.monzd) * self.YCellShift + self.size_y, d=self.BarWidth) yy3 = in_yslab(r, cy=(cellz / self.monzd) * self.YCellShift - self.size_y, d=self.BarWidth) xx = in_xslab(r, cx=self.resolution / 4, d=self.size_x - 10e-6) if (zz and (yy or yy2 or yy3) and xx): return self.return_value return 0
def where_wire(self, r): dd=self.resolution/4 for cellc in self.cellcenters: ## define the wires if in_xcyl(r, cy=self.size_y/2, cz=cellc, rad=self.wirethick) or \ in_xcyl(r, cy= -self.size_y/2, cz=cellc, rad=self.wirethick): return self.return_value # (do not change this line) if ( # define the first splitting of SRR not (r.z()>cellc+self.radius/2 and in_xslab(r, cx=dd, d=self.splitting)) # define the 2nd splitting for symmetric SRR and not (r.z()<cellc-self.radius/2 and in_xslab(r, cx=dd, d=self.splitting2))): # make the ring (without the central bar) if (in_ycyl(r, cx=dd, cz=cellc, rad=self.radius+self.srrthick/2) # outer radius and in_yslab(r, cy=dd, d=self.srrthick) # delimit to a disc and not in_ycyl(r, cx=dd, cz=cellc, rad=self.radius-self.srrthick/2)): # subtract inner radius return self.return_value # (do not change this line) # optional capacitor pads if (self.splitting > 0 and in_xcyl(r, cy=dd, cz=cellc+self.radius, rad=self.capacitorr) and in_xslab(r, cx=dd, d=self.splitting+2*self.srrthick)): return self.return_value # (do not change this line) # optional capacitor pads on second splitting if (self.splitting2 > 0 and in_xcyl(r, cy=dd, cz=cellc-self.radius, rad=self.capacitorr) and in_xslab(r, cx=dd, d=self.splitting2+2*self.srrthick)): return self.return_value # (do not change this line) if (self.cbarthick > 0 # def splitting in the central bar for ESRR (the bar is completely disabled if insplitting high enough) and not (in_zslab(r,cz=cellc,d=self.radius) and in_xslab(r, cx=dd, d=self.insplitting))): if (in_ycyl(r, cx=dd, cz=cellc, rad=self.radius+self.srrthick/2) # outer radius and in_yslab(r, cy=dd, d=self.srrthick) # delimit to a disc and in_zslab(r,cz=cellc,d=self.cbarthick)): # but allow the central bar return self.return_value # (do not change this line) if ((self.insplitting > 0) and in_xcyl(r, cy=dd, cz=cellc, rad=self.incapacitorr) and in_xslab(r, cx=dd, d=self.insplitting+2*self.srrthick)): # optional capacitor pads return self.return_value # (do not change this line) return 0
def where_filling(self, r): for cellz in self.cell_centers(): if (in_xcyl(r, cy=self.resolution/4, cz=cellz+self.resolution/4, rad=self.radius) and not in_xslab(r, cx=self.resolution/4, d=self.xlen)) : return self.return_value return 0
def where_metal(self, r): if in_zslab(r, cz=self.apertureth/2, d=self.apertureth) and not (in_yslab(r, cy=0e-6, d=self.apertured) and in_xslab(r, cx=0e-6, d=self.apertured)): return self.return_value if in_zslab(r, cz=self.wirez, d=self.wireth) and in_yslab(r, cy=self.wirey, d=self.wireth): return self.return_value return 0
def where_wire(self, r): if in_xslab(r, cx=self.resolution/4, d=self.wirelength) and \ in_yslab(r, cy=self.resolution/4, d=self.wirewidth) and \ in_zslab(r, cz=0, d=self.resolution*2): return self.return_value # (do not change this line) return 0