Skip to content

Commit

Permalink
fix fanout_length
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed Jul 13, 2024
1 parent 75fd598 commit 03f172f
Showing 1 changed file with 11 additions and 35 deletions.
46 changes: 11 additions & 35 deletions docs/notebooks/00_layout.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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()"
]
},
Expand Down Expand Up @@ -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",
Expand All @@ -376,23 +356,20 @@
"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",
" _ = c << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)\n",
" 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"
Expand All @@ -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",
Expand All @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit 03f172f

Please sign in to comment.