optical pins name revised. Pin type added
This commit is contained in:
@@ -155,8 +155,12 @@ class Conchoid:
|
||||
_my_polygon(layer_wg=layers,vtx=vtx).put(0,0,0)
|
||||
|
||||
Rmax = T*kR+R0
|
||||
nd.Pin(name="a1").put(R0,0,-90)
|
||||
nd.Pin(name="b1").put(Rmax*np.cos(T),Rmax*np.sin(T),(T/np.pi*180+90))
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name="a1").put(R0,0,-90)
|
||||
nd.Pin(name="opt_a1",type="optical:").put(R0,0,-90)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name="b1").put(Rmax*np.cos(T),Rmax*np.sin(T),(T/np.pi*180+90))
|
||||
nd.Pin(name="opt_b1",type="optical:").put(Rmax*np.cos(T),Rmax*np.sin(T),(T/np.pi*180+90))
|
||||
|
||||
self.L = L
|
||||
self.cell =C
|
||||
@@ -418,8 +422,12 @@ class Clothoid:
|
||||
nd.Pin(name='a0',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
|
||||
nd.Pin(name='b0',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
|
||||
|
||||
nd.Pin(name='a1',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
|
||||
nd.Pin(name='b1',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a1',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
|
||||
nd.Pin(name='opt_a1',width=self.w[0],type="optical:").put(self.x[0],self.y[0],self.A[0]+180)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='b1',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
|
||||
nd.Pin(name='opt_b1',width=self.w[-1],type="optical:").put(self.x[-1],self.y[-1],self.A[-1])
|
||||
elif(self.layer!=None) : ## if definition is in xsections
|
||||
|
||||
vtx_wg = _line2wg_(x=self.x,y=self.y,wu=self.w/2,wd= self.w/2,theta=self.theta,n_points=self.n_points)
|
||||
@@ -429,8 +437,12 @@ class Clothoid:
|
||||
nd.Pin(name='a0',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
|
||||
nd.Pin(name='b0',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
|
||||
|
||||
nd.Pin(name='a1',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
|
||||
nd.Pin(name='b1',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a1',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
|
||||
nd.Pin(name='opt_a1',width=self.w[0],type="optical:").put(self.x[0],self.y[0],self.A[0]+180)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='b1',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
|
||||
nd.Pin(name='opt_b1',width=self.w[-1],type="optical:").put(self.x[-1],self.y[-1],self.A[-1])
|
||||
|
||||
else:
|
||||
raise Exception("ERROR: In <mxpic::structures::Colthoid>, <layer | xs> not defined")
|
||||
|
||||
@@ -41,8 +41,12 @@ class Racetrack:
|
||||
|
||||
self.bend_cell = bend_cell
|
||||
|
||||
self.A_bend = np.abs(bend_cell.pin['a1'].a - bend_cell.pin['b1'].a)
|
||||
self.w = [bend_cell.pin['b1'].width,bend_cell.pin['a1'].width]
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: self.A_bend = np.abs(bend_cell.pin['a1'].a - bend_cell.pin['b1'].a)
|
||||
self.A_bend = np.abs(bend_cell.pin['opt_a1'].a - bend_cell.pin['opt_b1'].a)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: self.w = [bend_cell.pin['b1'].width,bend_cell.pin['a1'].width]
|
||||
self.w = [bend_cell.pin['opt_b1'].width,bend_cell.pin['opt_a1'].width]
|
||||
|
||||
self.w_crack = 0.002
|
||||
|
||||
|
||||
@@ -88,8 +88,12 @@ class circle :
|
||||
_my_polygon(layer_wg=layers,vtx=vtx,vtx_not=vtx_cut).put(0,0,0)
|
||||
|
||||
|
||||
nd.Pin(name='a1',width=width,xs=xs).put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
|
||||
nd.Pin(name='b1',width=width,xs=xs).put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a1',width=width,xs=xs).put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
|
||||
nd.Pin(name='opt_a1',width=width,xs=xs,type="optical:").put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='b1',width=width,xs=xs).put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
|
||||
nd.Pin(name='opt_b1',width=width,xs=xs,type="optical:").put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
|
||||
|
||||
else:
|
||||
theta = np.linspace(theta_start,theta_stop,n_points)
|
||||
@@ -128,8 +132,12 @@ class circle :
|
||||
""" """
|
||||
|
||||
_my_polygon(layer_wg=layer,vtx=vtx,vtx_not=vtx_cut).put(0,0,0)
|
||||
nd.Pin(name='a1',width=width,layer=layer).put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
|
||||
nd.Pin(name='b1',width=width,layer=layer).put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a1',width=width,layer=layer).put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
|
||||
nd.Pin(name='opt_a1',width=width,layer=layer,type="optical:").put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='b1',width=width,layer=layer).put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
|
||||
nd.Pin(name='opt_b1',width=width,layer=layer,type="optical:").put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
|
||||
|
||||
self.vtx = vtx
|
||||
self.sz = [radius*2,radius*2]
|
||||
@@ -318,8 +326,12 @@ class Elipse_dual :
|
||||
else:
|
||||
_my_polygon(layer_wg=layers,vtx=vtx,vtx_not=vtx_cut).put(0,0,0)
|
||||
|
||||
nd.Pin(name='a1').put((Ox[0]+Ix[0])/2,(Oy[0]+Iy[0])/2,theta[0]-90)
|
||||
nd.Pin(name='b1').put((Ox[-1]+Ix[-1])/2,(Oy[-1]+Iy[-1])/2,theta[-1]+90)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a1').put((Ox[0]+Ix[0])/2,(Oy[0]+Iy[0])/2,theta[0]-90)
|
||||
nd.Pin(name='opt_a1',type="optical:").put((Ox[0]+Ix[0])/2,(Oy[0]+Iy[0])/2,theta[0]-90)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='b1').put((Ox[-1]+Ix[-1])/2,(Oy[-1]+Iy[-1])/2,theta[-1]+90)
|
||||
nd.Pin(name='opt_b1',type="optical:").put((Ox[-1]+Ix[-1])/2,(Oy[-1]+Iy[-1])/2,theta[-1]+90)
|
||||
|
||||
return C
|
||||
|
||||
@@ -418,8 +430,12 @@ class Elipse:
|
||||
Ain = np.angle(nx[0]+1j*ny[0])/pi*180
|
||||
Aout = np.angle(nx[-1]+1j*ny[-1])/pi*180
|
||||
|
||||
nd.Pin(name='a1').put(Ox[0]/2+Ix[0]/2,Oy[0]/2+Iy[0]/2,Ain-90)
|
||||
nd.Pin(name='b1').put(Ox[-1]/2+Ix[-1]/2,Oy[-1]/2+Iy[-1]/2,Aout+90)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='a1').put(Ox[0]/2+Ix[0]/2,Oy[0]/2+Iy[0]/2,Ain-90)
|
||||
nd.Pin(name='opt_a1',type="optical:").put(Ox[0]/2+Ix[0]/2,Oy[0]/2+Iy[0]/2,Ain-90)
|
||||
## revised in 2026.06.07 by Qin Yue
|
||||
# legacy: nd.Pin(name='b1').put(Ox[-1]/2+Ix[-1]/2,Oy[-1]/2+Iy[-1]/2,Aout+90)
|
||||
nd.Pin(name='opt_b1',type="optical:").put(Ox[-1]/2+Ix[-1]/2,Oy[-1]/2+Iy[-1]/2,Aout+90)
|
||||
|
||||
nd.Pin(name='a0').put(0,0,180)
|
||||
nd.Pin(name='b0').put(0,0,0)
|
||||
|
||||
Reference in New Issue
Block a user