Skip to content

Commit

Permalink
Merge pull request #21 from gdsfactory/150
Browse files Browse the repository at this point in the history
150
  • Loading branch information
joamatab authored Apr 17, 2022
2 parents bffaf68 + 1917ee7 commit 5381da5
Show file tree
Hide file tree
Showing 22 changed files with 235 additions and 134 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.5.0]

- update tests to pass for gdsfactory 5.0.0

## [1.4.2](https://github.com/gdsfactory/ubc/pull/20)

- rename component_factory to cells and cross_section_factory to cross_sections
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/00_layout.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.9.10"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/11_sparameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"import gdsfactory.simulation as sim\n",
"import matplotlib.pyplot as plot\n",
"\n",
"for component_factory in ubcpdk.component_factory.values():\n",
" component = component_factory()\n",
"for cell in ubcpdk.cells.values():\n",
" component = cell()\n",
" # ubcpdk.tech.write_sparameters_lumerical(component=component)"
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/12_circuit_simulation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.9.10"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-e .
lygadgets
gdsfactory[full]==4.7.3
gdsfactory[full]==5.0.0
modes
2 changes: 1 addition & 1 deletion ubcpdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
logger.info(f"Found UBCpdk {__version__!r} installed at {module!r}")
cells = get_cells(components)

PDK = Pdk(cells=cells, cross_sections=cross_sections)
PDK = Pdk(name="ubcpdk", cells=cells, cross_sections=cross_sections)
PDK.activate()


Expand Down
2 changes: 2 additions & 0 deletions ubcpdk/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
from ubcpdk.components.straight import (
straight,
)
from ubcpdk.components.generic import coupler


__all__ = [
"add_fiber_array",
"bend_euler",
"cells",
"coupler",
"crossing",
"dbr",
"dbr_cavity",
Expand Down
2 changes: 1 addition & 1 deletion ubcpdk/components/cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def ebeam_dc_halfring_straight(
"gap": gap * um,
"radius": radius * um,
"wg_thickness": thickness[LAYER.WG] * um,
"wg_width": x.info["width"] * um,
"wg_width": x.width * um,
"Lc": length_x * um,
}
return component
Expand Down
12 changes: 12 additions & 0 deletions ubcpdk/components/generic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import gdsfactory as gf
from ubcpdk.import_gds import (
add_ports_siepic_gratings,
)


coupler = gf.partial(gf.c.coupler, decorator=add_ports_siepic_gratings)


if __name__ == "__main__":
c = coupler()
c.show()
Binary file not shown.
Binary file modified ubcpdk/tests/test_components.gds/gds_ref/dbr.gds
Binary file not shown.
Binary file modified ubcpdk/tests/test_components.gds/gds_ref/dbr_cavity_a61b22bd.gds
Binary file not shown.
Binary file not shown.
159 changes: 89 additions & 70 deletions ubcpdk/tests/test_components/test_pdk_settings_add_fiber_array_.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,34 @@ settings:
child:
changed:
bend:
decorator:
- function: add_bbox_siepic
- function: add_pins_siepic
function: bend_euler
settings:
decorator:
- function: add_bbox_siepic
- function: add_pins_siepic
component:
function: straight
fanout_length: 0
gc_port_name: opt1
grating_coupler:
decorator:
- - function: add_ports_from_siepic_pins
- function: remove_pins
- function: add_pins_siepic_of_add_bbox_siepic
padding: -0.001
- function: add_siepic_labels_and_simulation_info
- angle: 180
function: rotate
function: import_gds
gdsdir: gds
gdspath: ebeam_gc_te1550.gds
model: ebeam_gc_te1550
opt1: opt_wg
polarization: te
wavelength: 1.55
settings:
decorator:
- - function: add_ports_from_siepic_pins
- function: remove_pins
- function: add_pins_siepic_of_add_bbox_siepic
settings:
padding: -0.001
- function: add_siepic_labels_and_simulation_info
- function: rotate
settings:
angle: 180
gdsdir: gds
gdspath: ebeam_gc_te1550.gds
model: ebeam_gc_te1550
opt1: opt_wg
polarization: te
wavelength: 1.55
layer_label:
- 10
- 0
Expand All @@ -44,19 +48,19 @@ settings:
default:
cross_section:
function: cross_section
settings: {}
length: 10
npoints: 2
with_cladding_box: true
full:
cross_section:
function: cross_section
settings: {}
layer:
- 1
- 0
length: 10
npoints: 2
width: 0.5
with_cladding_box: true
function_name: straight
info:
length: 10.0
Expand Down Expand Up @@ -89,69 +93,78 @@ settings:
component_name: null
cross_section:
function: cross_section
settings: {}
gc_port_labels: null
gc_port_name: o1
get_input_labels_function:
function: get_input_labels
grating_coupler:
function: grating_coupler_elliptical_trenches
polarization: te
taper_angle: 35
settings:
polarization: te
taper_angle: 35
layer_label:
- 66
- 0
select_ports:
function: select_ports
port_type: optical
settings:
port_type: optical
straight:
function: straight
full:
bend:
decorator:
- function: add_bbox_siepic
- function: add_pins_siepic
function: bend_euler
settings:
decorator:
- function: add_bbox_siepic
- function: add_pins_siepic
component:
function: straight
component_name: null
cross_section:
function: cross_section
settings: {}
fanout_length: 0
gc_port_labels: null
gc_port_name: opt1
get_input_labels_function:
function: get_input_labels
grating_coupler:
decorator:
- - function: add_ports_from_siepic_pins
- function: remove_pins
- function: add_pins_siepic_of_add_bbox_siepic
padding: -0.001
- function: add_siepic_labels_and_simulation_info
- angle: 180
function: rotate
function: import_gds
gdsdir: gds
gdspath: ebeam_gc_te1550.gds
model: ebeam_gc_te1550
opt1: opt_wg
polarization: te
wavelength: 1.55
settings:
decorator:
- - function: add_ports_from_siepic_pins
- function: remove_pins
- function: add_pins_siepic_of_add_bbox_siepic
settings:
padding: -0.001
- function: add_siepic_labels_and_simulation_info
- function: rotate
settings:
angle: 180
gdsdir: gds
gdspath: ebeam_gc_te1550.gds
model: ebeam_gc_te1550
opt1: opt_wg
polarization: te
wavelength: 1.55
layer_label:
- 10
- 0
optical_routing_type: 0
select_ports:
function: select_ports
port_type: optical
settings:
port_type: optical
straight:
function: straight
with_loopback: false
function_name: add_fiber_array
info: {}
info_version: 2
module: gdsfactory.routing.add_fiber_array
name: straight_87bde41b_strai_6490ae29
name: straight_87bde41b_strai_de27d4c4
default:
component:
function: straight
Expand All @@ -161,21 +174,24 @@ settings:
get_input_labels_function:
function: get_input_labels
grating_coupler:
decorator:
- - function: add_ports_from_siepic_pins
- function: remove_pins
- function: add_pins_siepic_of_add_bbox_siepic
padding: -0.001
- function: add_siepic_labels_and_simulation_info
- angle: 180
function: rotate
function: import_gds
gdsdir: gds
gdspath: ebeam_gc_te1550.gds
model: ebeam_gc_te1550
opt1: opt_wg
polarization: te
wavelength: 1.55
settings:
decorator:
- - function: add_ports_from_siepic_pins
- function: remove_pins
- function: add_pins_siepic_of_add_bbox_siepic
settings:
padding: -0.001
- function: add_siepic_labels_and_simulation_info
- function: rotate
settings:
angle: 180
gdsdir: gds
gdspath: ebeam_gc_te1550.gds
model: ebeam_gc_te1550
opt1: opt_wg
polarization: te
wavelength: 1.55
optical_routing_type: 0
with_loopback: false
full:
Expand All @@ -187,26 +203,29 @@ settings:
get_input_labels_function:
function: get_input_labels
grating_coupler:
decorator:
- - function: add_ports_from_siepic_pins
- function: remove_pins
- function: add_pins_siepic_of_add_bbox_siepic
padding: -0.001
- function: add_siepic_labels_and_simulation_info
- angle: 180
function: rotate
function: import_gds
gdsdir: gds
gdspath: ebeam_gc_te1550.gds
model: ebeam_gc_te1550
opt1: opt_wg
polarization: te
wavelength: 1.55
settings:
decorator:
- - function: add_ports_from_siepic_pins
- function: remove_pins
- function: add_pins_siepic_of_add_bbox_siepic
settings:
padding: -0.001
- function: add_siepic_labels_and_simulation_info
- function: rotate
settings:
angle: 180
gdsdir: gds
gdspath: ebeam_gc_te1550.gds
model: ebeam_gc_te1550
opt1: opt_wg
polarization: te
wavelength: 1.55
optical_routing_type: 0
with_loopback: false
function_name: add_fiber_array
info: {}
info_version: 2
module: ubcpdk.components.add_fiber_array
name: straight_87bde41b_strai_feb49d09
name: straight_87bde41b_strai_9c296313
version: 0.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ settings:
angle: 90
cross_section:
function: cross_section
settings: {}
direction: ccw
npoints: 720
p: 0.5
with_arc_floorplan: true
with_cladding_box: true
full:
angle: 90
cross_section:
function: cross_section
settings: {}
decorator:
- function: add_bbox_siepic
- function: add_pins_siepic
direction: ccw
npoints: 720
p: 0.5
with_arc_floorplan: true
with_cladding_box: true
function_name: bend_euler
info:
dy: 10.0
Expand Down
Loading

0 comments on commit 5381da5

Please sign in to comment.