optical pins name revised. Pin type added
This commit is contained in:
@@ -50,10 +50,16 @@ class LoopMirror():
|
||||
if (BS==None):
|
||||
BS = DC(w_cp=0.45,gap=0.2,w_wg=w_wg,L_cp=10,R0=10,angle=20,xs=xs_wg,sharp_patch=True)
|
||||
BS_Inst = BS.cell.put(0,0,0) ## middle
|
||||
D_port = np.abs(BS_Inst.pin['b1'].y - BS_Inst.pin['b2'].y)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: D_port = np.abs(BS_Inst.pin['b1'].y - BS_Inst.pin['b2'].y)
|
||||
D_port = np.abs(BS_Inst.pin['opt_b1'].y - BS_Inst.pin['opt_b2'].y)
|
||||
pic = Route(radius=Radius,width=w_wg,xs=xs_wg)
|
||||
BU = nd.bend(radius=Radius,width=w_wg,xs=xs_wg,angle=angle).put('a0',BS_Inst.pin['b1'],flip=0)
|
||||
BD = nd.bend(radius=Radius,width=w_wg,xs=xs_wg,angle=angle).put('a0',BS_Inst.pin['b2'],flip=1)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: BU = nd.bend(radius=Radius,width=w_wg,xs=xs_wg,angle=angle).put('a0',BS_Inst.pin['b1'],flip=0)
|
||||
BU = nd.bend(radius=Radius,width=w_wg,xs=xs_wg,angle=angle).put('a0',BS_Inst.pin['opt_b1'],flip=0)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: BD = nd.bend(radius=Radius,width=w_wg,xs=xs_wg,angle=angle).put('a0',BS_Inst.pin['b2'],flip=1)
|
||||
BD = nd.bend(radius=Radius,width=w_wg,xs=xs_wg,angle=angle).put('a0',BS_Inst.pin['opt_b2'],flip=1)
|
||||
|
||||
|
||||
R_loop = (Radius+D_port/2)/np.cos(angle/180*np.pi) - Radius
|
||||
@@ -64,8 +70,12 @@ class LoopMirror():
|
||||
(a1,b1), (a2,b2),c1,c2 = growx
|
||||
if (layers.find('CLD')!=-1):
|
||||
### middle patch
|
||||
nd.strt(length=(R_loop+w_wg*a1+b1)*(1+np.sin((180-angle)/180*np.pi))+(Radius)*np.sin(angle/180*np.pi),width=2*(R_loop+w_wg*a1+b1),layer=layers).put(BS_Inst.pin['b1'].x,0,0)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.strt(length=(R_loop+w_wg*a1+b1)*(1+np.sin((180-angle)/180*np.pi))+(Radius)*np.sin(angle/180*np.pi),width=2*(R_loop+w_wg*a1+b1),layer=layers).put(BS_Inst.pin['b1'].x,0,0)
|
||||
nd.strt(length=(R_loop+w_wg*a1+b1)*(1+np.sin((180-angle)/180*np.pi))+(Radius)*np.sin(angle/180*np.pi),width=2*(R_loop+w_wg*a1+b1),layer=layers).put(BS_Inst.pin['opt_b1'].x,0,0)
|
||||
|
||||
nd.Pin(name='a1',pin=BS_Inst.pin['a1']).put()
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a1',pin=BS_Inst.pin['a1']).put()
|
||||
nd.Pin(name='opt_a1',pin=BS_Inst.pin['opt_a1'],type="optical:").put()
|
||||
|
||||
self.cell = C
|
||||
|
||||
Reference in New Issue
Block a user