Skip to content

Commit

Permalink
Merge pull request #22 from gdsfactory/151
Browse files Browse the repository at this point in the history
151
  • Loading branch information
joamatab authored Apr 17, 2022
2 parents d98dd6e + abe726c commit cb5b84f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 25 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.1]

- add fiber accepts ComponentSpec

## [1.5.0](https://github.com/gdsfactory/ubc/pull/21)

- update tests to pass for gdsfactory 5.0.1
Expand Down
7 changes: 0 additions & 7 deletions docs/notebooks/00_layout.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,6 @@
"scene = ubcpdk.tech.to_3d(ubcpdk.components.crossing())\n",
"scene.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
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]==5.0.1
gdsfactory[full]==5.0.2
modes
4 changes: 3 additions & 1 deletion ubcpdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from gdsfactory.config import logger
from gdsfactory.get_factories import get_cells
from gdsfactory.pdk import Pdk
from gdsfactory import containers


from ubcpdk.config import CONFIG, PATH, module
Expand Down Expand Up @@ -34,7 +35,8 @@


logger.info(f"Found UBCpdk {__version__!r} installed at {module!r}")
cells = get_cells(components)
cells = get_cells([containers, components])
_cells_to_test = get_cells(components)

PDK = Pdk(name="ubcpdk", cells=cells, cross_sections=cross_sections)
PDK.activate()
Expand Down
24 changes: 14 additions & 10 deletions ubcpdk/circuits/mask.pic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ instances:
rings:
component: pack_doe
settings:
component: ring_single
radius: [30, 50, 20, 40]
length_x: [1, 2, 3]
pack:
doe: ring_single
settings:
radius: [30, 50, 20, 40]
length_x: [1, 2, 3]
do_permutations: True
function: add_fiber_array
function:
function: add_fiber_array
settings:
fanout_length: 200


mzis:
component: pack_doe
component: pack_doe_grid
settings:
component: mzi
delta_length: [10, 100]
pack:
doe: mzi
settings:
delta_length: [10, 100]
do_permutations: True
spacing: 10
spacing: [10, 10]
function: add_fiber_array

placements:
Expand Down
8 changes: 3 additions & 5 deletions ubcpdk/components/add_fiber_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from gdsfactory.cell import cell
from gdsfactory.component import Component
from gdsfactory.port import Port
from gdsfactory.types import ComponentReference, ComponentOrFactory
from gdsfactory.types import ComponentReference, ComponentSpec

from ubcpdk.config import CONFIG
from ubcpdk.tech import LAYER
Expand All @@ -16,8 +16,6 @@
from ubcpdk.components.straight import straight
from ubcpdk.components.cells import bend_euler

L = 1.55 / 4 / 2 / 2.44


def get_input_label_text(
port: Port,
Expand Down Expand Up @@ -119,14 +117,14 @@ def get_input_labels(

@cell
def add_fiber_array(
component: ComponentOrFactory = straight,
component: ComponentSpec = straight,
component_name: Optional[str] = None,
gc_port_name: str = "opt1",
get_input_labels_function: Callable = get_input_labels,
with_loopback: bool = False,
optical_routing_type: int = 0,
fanout_length: float = 0.0,
grating_coupler: ComponentOrFactory = gc_te1550,
grating_coupler: ComponentSpec = gc_te1550,
**kwargs,
) -> Component:
"""Returns component with grating couplers and labels on each port.
Expand Down
2 changes: 1 addition & 1 deletion ubcpdk/tests/test_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from gdsfactory.component import Component
from gdsfactory.difftest import difftest
from pytest_regressions.data_regression import DataRegressionFixture
from ubcpdk import cells
from ubcpdk import _cells_to_test as cells


cell_names = cells.keys()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ settings:
default:
bend:
function: bend_euler
component: mmi2x2
component_name: null
cross_section:
function: cross_section
Expand Down

0 comments on commit cb5b84f

Please sign in to comment.