def where_metal(self, r):
     for cellz in self.cell_centers():
         if not (in_zcyl(r, cx=-self.size_x/2, cy=-self.size_y/2, rad=self.r2) \
           or in_zcyl(r, cx= self.size_x/2, cy=-self.size_y/2,    rad=self.r2) \
           or in_zcyl(r, cx=-self.size_x/2, cy= self.size_y/2,    rad=self.r2) \
           or in_zcyl(r, cx= self.size_x/2, cy= self.size_y/2,    rad=self.r2)) \
           and (in_zslab(r, cz=cellz, d=self.thick+self.resolution*4) and not in_zslab(r, cz=cellz, d=self.thick)):
             return self.return_value
     return 0
 def where_diel(self, r):
     for cellz in self.cell_centers():
         if not (in_zcyl(r, cx=-self.size_x/2, cy=-self.size_y/2, rad=self.r2) \
           or in_zcyl(r, cx= self.size_x/2, cy=-self.size_y/2,    rad=self.r2) \
           or in_zcyl(r, cx=-self.size_x/2, cy= self.size_y/2,    rad=self.r2) \
           or in_zcyl(r, cx= self.size_x/2, cy= self.size_y/2,    rad=self.r2)) \
           and in_zslab(r, cz=cellz, d=self.thick):
             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_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_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
Esempio n. 6
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
Esempio n. 7
0
 def where_metal(self, r):
     if in_zslab(r, cz=0, d=self.metalthick) and not \
             (in_zcyl(r, cx=-self.apdistx/2,  cy=-self.apdisty/2, rad=self.aprad) or \
             in_zcyl(r,  cx=1000+ self.apdistx/2,  cy= self.apdisty/2, rad=self.aprad)): ## XXX second aperture disabled!
         return self.return_value             # (do not change this line)
     return 0
 def where_metal(self, r):
     if not (in_zcyl(r, cx=0, cy=0, rad=self.radius)
             and in_zslab(r, cz=0, d=self.height)):  #
         #if  in_zslab(r, cz=0, d=self.radius):
         return self.return_value  # (do not change this line)
     return 0
Esempio n. 9
0
 def where_metal(self, r):
     if in_zslab(r, cz=0, d=self.metalthick) and not \
             (in_zcyl(r, cx=-self.apdistx/2,  cy=-self.apdisty/2, rad=self.aprad) or \
             in_zcyl(r,  cx=1000+ self.apdistx/2,  cy= self.apdisty/2, rad=self.aprad)): ## XXX second aperture disabled!
         return self.return_value  # (do not change this line)
     return 0
 def where_metal(self, r):
     if not (in_zcyl(r, cx=0, cy=0, rad=self.radius) and in_zslab(r, cz=0, d=self.height)):  # 
     #if  in_zslab(r, cz=0, d=self.radius):
         return self.return_value             # (do not change this line)
     return 0