Skip to content

Commit

Permalink
Minor edits to tutorial files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ttemth committed May 13, 2024
1 parent 2f6fe17 commit c848a0f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 2 additions & 3 deletions examples/python/tutorial-1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if __name__ == "__main__":
c = gf.Component(
"training"
"training-1"
) # Component can be though to be a canvas to draw on. It maps to GDS cells.

# define components using standard gdsfactory functions
Expand All @@ -27,8 +27,7 @@
b3.mirror()

# Each component has ports defined. Connecting moves the component so the ports are matching.
s1.connect("o2", b1.ports["o1"])

b1.connect("o1", s1.ports["o2"])
b2.connect("o1", b1.ports["o2"])
b3.connect("o1", b2.ports["o2"])
b4.connect("o1", b3.ports["o2"])
Expand Down
2 changes: 2 additions & 0 deletions examples/python/tutorial-4.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import gdsfactory as gf

# import gvtt


@gf.cell
def arm(angle: float = 90.0) -> gf.Component:
Expand Down
13 changes: 11 additions & 2 deletions examples/python/tutorial-5.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import gdsfactory as gf

import gvtt


@gf.cell
def arm():
Expand Down Expand Up @@ -62,8 +64,15 @@ def mzi():
mymzi.x = 0.0

die = c << gf.get_component("die")
p1 = c << gf.get_component("edge_coupler_rib", pos=-250, die=die)
p2 = c << gf.get_component("edge_coupler_rib", pos=1000, die=die, side="E")

p1 = c << gvtt.components.edge_coupler_rib()
p1.xmin = die.xmin + die.info["frame_margin"]
p1.y = -250

p2 = c << gvtt.components.edge_coupler_rib()
p2.rotate(180)
p2.xmin = die.xmax - die.info["frame_margin"]
p2.y = 250

routes = gf.routing.get_bundle_all_angle(
[mymzi.ports["o1"], mymzi.ports["o2"]], [p1.ports["o1"], p2.ports["o1"]]
Expand Down

0 comments on commit c848a0f

Please sign in to comment.