From 03f172f166760ba40a477f38aac5246fb19c644e Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sat, 13 Jul 2024 18:00:42 -0400 Subject: [PATCH] fix fanout_length --- docs/notebooks/00_layout.ipynb | 46 ++++++++-------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/docs/notebooks/00_layout.ipynb b/docs/notebooks/00_layout.ipynb index 96e9b140..76e3ba3c 100644 --- a/docs/notebooks/00_layout.ipynb +++ b/docs/notebooks/00_layout.ipynb @@ -215,7 +215,7 @@ "metadata": {}, "outputs": [], "source": [ - "component_fiber_array = uc.add_fiber_array(component=mzi)\n", + "component_fiber_array = uc.add_fiber_array(component=mzi, fanout_length=5)\n", "component_fiber_array.plot()" ] }, @@ -330,34 +330,14 @@ "metadata": {}, "outputs": [], "source": [ - "@gf.cell\n", "def EBeam_JoaquinMatres_2() -> gf.Component:\n", " \"\"\"spirals for extracting straight waveguide loss\"\"\"\n", - " N = 12\n", - " radius = 10\n", "\n", " e = [\n", - " uc.add_fiber_array(\n", - " component=uc.spiral(\n", - " N=N,\n", - " radius=radius,\n", - " y_straight_inner_top=0,\n", - " x_inner_length_cutback=0,\n", - " )\n", - " )\n", + " uc.add_fiber_array(component=uc.spiral(n_loops=8, length=length))\n", + " for length in [0, 100, 200]\n", " ]\n", "\n", - " e.append(\n", - " uc.add_fiber_array(\n", - " component=uc.spiral(\n", - " N=N,\n", - " radius=radius,\n", - " y_straight_inner_top=0,\n", - " x_inner_length_cutback=185,\n", - " )\n", - " )\n", - " )\n", - "\n", " c = gf.Component()\n", " _ = c << gf.pack(e, max_size=size, spacing=2)[0]\n", " _ = c << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)\n", @@ -376,15 +356,13 @@ "metadata": {}, "outputs": [], "source": [ - "@gf.cell\n", "def EBeam_JoaquinMatres_3() -> gf.Component:\n", - " \"\"\"contains mirror cavities and structures inside a resonator\"\"\"\n", + " \"\"\"Contains mirror cavities and structures inside a resonator.\"\"\"\n", " e = []\n", " e += [add_gc(uc.ebeam_crossing4())]\n", " e += [add_gc(uc.ebeam_adiabatic_te1550(), optical_routing_type=1)]\n", " e += [add_gc(uc.ebeam_bdc_te1550())]\n", " e += [add_gc(uc.ebeam_y_1550(), optical_routing_type=1)]\n", - " e += [add_gc(uc.ebeam_y_adiabatic_tapers(), optical_routing_type=1)]\n", " e += [add_gc(uc.straight(), component_name=f\"straight_{i}\") for i in range(2)]\n", " c = gf.Component()\n", " _ = c << gf.pack(e, max_size=size, spacing=2)[0]\n", @@ -392,7 +370,6 @@ " return c\n", "\n", "\n", - "gf.clear_cache()\n", "c = EBeam_JoaquinMatres_3()\n", "c.show() # show in klayout\n", "c.plot() # plot in notebook" @@ -405,7 +382,6 @@ "metadata": {}, "outputs": [], "source": [ - "@gf.cell\n", "def EBeam_JoaquinMatres_4() -> gf.Component:\n", " \"\"\"MZI interferometers.\"\"\"\n", " mzi = partial(gf.components.mzi, splitter=uc.ebeam_y_1550)\n", @@ -425,7 +401,6 @@ " return c\n", "\n", "\n", - "gf.clear_cache()\n", "c = EBeam_JoaquinMatres_4()\n", "c.show() # show in klayout\n", "c.plot() # plot in notebook" @@ -438,20 +413,21 @@ "metadata": {}, "outputs": [], "source": [ - "@gf.cell\n", "def EBeam_JoaquinMatres_5() -> gf.Component:\n", " \"\"\"Ring resonators.\"\"\"\n", - " rings = [uc.ring_single_heater(length_x=length_x) for length_x in [4, 6]]\n", - " rings = [gf.functions.rotate180(ring) for ring in rings]\n", - " rings_gc = [uc.add_fiber_array_pads_rf(ring) for ring in rings]\n", + "\n", + " rings = []\n", + " for length_x in [4, 6]:\n", + " ring = uc.ring_single_heater(length_x=length_x)\n", + " ring_gc = uc.add_fiber_array_pads_rf(ring)\n", + " rings.append(ring_gc)\n", "\n", " c = gf.Component()\n", - " _ = c << gf.pack(rings_gc, max_size=size, spacing=2)[0]\n", + " _ = c << gf.pack(rings, max_size=size, spacing=2)[0]\n", " _ = c << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)\n", " return c\n", "\n", "\n", - "gf.clear_cache()\n", "c = EBeam_JoaquinMatres_5()\n", "c.show() # show in klayout\n", "c.plot() # plot in notebook"