From eddf53d66731d977f4667b1f44ca4c8c26b11f9d Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Thu, 5 Oct 2023 05:44:13 -0700 Subject: [PATCH] fix ports --- coupler_G0p2_L10_D5_D5_W0p5_LWG_E8a9ff7cf.gds | Bin 8564 -> 8564 bytes kgeneric/cells/euler.py | 2 +- kgeneric/cells/grating_coupler_elliptical.py | 6 ++++-- kgeneric/samples/bend_chain.py | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/coupler_G0p2_L10_D5_D5_W0p5_LWG_E8a9ff7cf.gds b/coupler_G0p2_L10_D5_D5_W0p5_LWG_E8a9ff7cf.gds index c8335052511c0b62690b926424783452dcb8db32..96c67b8416ca5324412bbe0f7c47cc10cb5ff450 100644 GIT binary patch delta 44 zcmV+{0Mq~ULi9qgR|J!nAUw0H2tEaqDIqztkObcYv*`^;29pIJ%Cj*P)C#lDAEg19 C!4Z1^ delta 44 zcmV+{0Mq~ULi9qgR|JzOAvu#A4hypt3e*F$R|I+mv*`^;2DAGV)C!X^6w0&DAEg0% CKM@Q7 diff --git a/kgeneric/cells/euler.py b/kgeneric/cells/euler.py index de2b328..935e4b3 100644 --- a/kgeneric/cells/euler.py +++ b/kgeneric/cells/euler.py @@ -270,5 +270,5 @@ def bend_s_euler( from kgeneric import LAYER c = bend_euler(width=1, radius=10, layer=LAYER.WG) - c.draw_ports() + # c.draw_ports() c.show() diff --git a/kgeneric/cells/grating_coupler_elliptical.py b/kgeneric/cells/grating_coupler_elliptical.py index daaba8c..c3aa8d7 100644 --- a/kgeneric/cells/grating_coupler_elliptical.py +++ b/kgeneric/cells/grating_coupler_elliptical.py @@ -55,6 +55,7 @@ def grating_coupler_elliptical( """ DEG2RAD = np.pi / 180 sthc = np.sin(fiber_angle * DEG2RAD) + um = 1 / kf.kcl.dbu if period is not None: neff = lambda_c / period + clad_index * sthc @@ -119,15 +120,16 @@ def _get_taper_pts( return taper_pts, x_output taper_pts, x_output = _get_taper_pts(n_periods_over_grating=n_periods_over_grating) + if layer_taper is not None: c.shapes(layer_taper).insert( kf.kdb.DPolygon(taper_pts).transformed(kf.kdb.Trans(taper_offset, 0)) ) c.create_port( - name="W0", trans=kf.kdb.Trans.R180, width=wg_width, layer=layer_taper + name="o1", trans=kf.kdb.Trans.R180, width=wg_width * um, layer=layer_taper ) - c.transform(kf.kdb.Trans(int(-x_output - taper_offset), 0)) + # c.transform(kf.kdb.Trans(int(-x_output - taper_offset), 0)) # Add port c.info["period"] = _period diff --git a/kgeneric/samples/bend_chain.py b/kgeneric/samples/bend_chain.py index 92d384e..e6870dc 100644 --- a/kgeneric/samples/bend_chain.py +++ b/kgeneric/samples/bend_chain.py @@ -9,5 +9,6 @@ b2.connect("o1", b1.ports["o2"]) # b1.flatten() # b2.flatten() + # c.shapes.(10) c.flatten() c.show()