-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,119 @@ | ||
# --- | ||
# jupyter: | ||
# jupytext: | ||
# custom_cell_magics: kql | ||
# text_representation: | ||
# extension: .py | ||
# format_name: light | ||
# format_version: '1.5' | ||
# jupytext_version: 1.14.5 | ||
# format_name: percent | ||
# format_version: '1.3' | ||
# jupytext_version: 1.11.2 | ||
# kernelspec: | ||
# display_name: Python 3 (ipykernel) | ||
# language: python | ||
# name: python3 | ||
# --- | ||
|
||
# %% [markdown] | ||
# # Layout | ||
# | ||
# All UBC ubcpdk.components cells are conveniently combined into the ubcpdk.components module. | ||
|
||
# + | ||
# %% | ||
import gdsfactory as gf | ||
|
||
import ubcpdk | ||
|
||
# - | ||
gf.CONF.display_type = "klayout" | ||
|
||
# %% [markdown] | ||
# ## Fixed Component cells | ||
# | ||
# Most `ubcpdk` components are imported from GDS files as fixed cells. | ||
|
||
ubcpdk.components.ebeam_crossing4() | ||
# %% | ||
c = ubcpdk.components.ebeam_crossing4() | ||
c.plot() | ||
|
||
ubcpdk.components.ebeam_swg_edgecoupler() | ||
# %% | ||
c = ubcpdk.components.ebeam_swg_edgecoupler() | ||
c.plot() | ||
|
||
ubcpdk.components.ebeam_bdc_te1550() | ||
# %% | ||
c = ubcpdk.components.ebeam_bdc_te1550() | ||
c.plot() | ||
|
||
ubcpdk.components.ebeam_adiabatic_te1550() | ||
# %% | ||
c = ubcpdk.components.ebeam_adiabatic_te1550() | ||
c.plot() | ||
|
||
ubcpdk.components.ebeam_y_adiabatic() | ||
# %% | ||
c = ubcpdk.components.ebeam_y_adiabatic() | ||
c.plot() | ||
|
||
ubcpdk.components.ebeam_y_1550() | ||
# %% | ||
c = ubcpdk.components.ebeam_y_1550() | ||
c.plot() | ||
|
||
# %% [markdown] | ||
# ## Parametric Component PCells | ||
# | ||
# You can also define cells adapted from gdsfactory generic pdk. | ||
|
||
ubcpdk.components.straight(length=2) | ||
# %% | ||
c = ubcpdk.components.straight(length=2) | ||
c.plot() | ||
|
||
ubcpdk.components.bend_euler(radius=5) | ||
# %% | ||
c = ubcpdk.components.bend_euler(radius=5) | ||
c.plot() | ||
|
||
ubcpdk.components.ring_with_crossing() | ||
# %% | ||
c = ubcpdk.components.ring_with_crossing() | ||
c.plot() | ||
|
||
ubcpdk.components.dbr() | ||
# %% | ||
c = ubcpdk.components.dbr() | ||
c.plot() | ||
|
||
ubcpdk.components.spiral() | ||
# %% | ||
c = ubcpdk.components.spiral() | ||
c.plot() | ||
|
||
ubcpdk.components.mzi_heater() | ||
# %% | ||
c = ubcpdk.components.mzi_heater() | ||
c.plot() | ||
|
||
ubcpdk.components.ring_single_heater() | ||
# %% | ||
c = ubcpdk.components.ring_single_heater() | ||
c.plot() | ||
|
||
# %% [markdown] | ||
# ## Components with grating couplers | ||
# | ||
# To test your devices you can add grating couplers. Both for single fibers and for fiber arrays. | ||
|
||
# %% | ||
splitter = ubcpdk.components.ebeam_y_1550(decorator=gf.port.auto_rename_ports) | ||
mzi = gf.components.mzi(splitter=splitter) | ||
mzi | ||
mzi.plot() | ||
|
||
# %% | ||
component_fiber_array = ubcpdk.components.add_fiber_array(component=mzi) | ||
component_fiber_array | ||
component_fiber_array.plot() | ||
|
||
# %% | ||
c = ubcpdk.components.ring_single_heater() | ||
c = ubcpdk.components.add_fiber_array_pads_rf(c) | ||
c | ||
c.plot() | ||
|
||
# %% | ||
c = ubcpdk.components.mzi_heater() | ||
c = ubcpdk.components.add_fiber_array_pads_rf(c, optical_routing_type=2) | ||
c | ||
c.plot() | ||
|
||
# %% [markdown] | ||
# ## 3D rendering | ||
|
||
# %% | ||
scene = c.to_3d() | ||
scene.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters