Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed Oct 2, 2023
1 parent aa03bdc commit 228b084
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ python install_tech.py

## Documentation

- Run notebooks on [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/gdsfactory/binder-sandbox/HEAD)
- [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/gdsfactory/gdsfactory-photonics-training)
- [UBCpdk docs](https://gdsfactory.github.io/ubc/) and [code](https://github.com/gdsfactory/ubc)
- [gdsfactory docs](https://gdsfactory.github.io/gdsfactory/)
2 changes: 1 addition & 1 deletion docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ parts:
title: Plugins
- url: https://gdsfactory.github.io/gdsfactory
title: gdsfactory
- url: https://github.com/gdsfactory/gdsfactory-photonics-training
- url: https://gdsfactory.github.io/gdsfactory-photonics-training/
title: gdsfactory-photonics-training
81 changes: 59 additions & 22 deletions docs/notebooks/00_layout.py
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()
2 changes: 0 additions & 2 deletions ubcpdk/tech.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class LayerMapUbc(BaseModel):
PORTE: Layer = (1, 11) # PinRecM
FLOORPLAN: Layer = (99, 0)

TE: Layer = (203, 0)
TM: Layer = (204, 0)
TEXT: Layer = (10, 0)
SHOW_PORTS: Layer = (1, 13)
PADDING: Layer = (67, 0)
Expand Down

0 comments on commit 228b084

Please sign in to comment.