Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

141 #19

Merged
merged 2 commits into from
Apr 8, 2022
Merged

141 #19

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.4.1

- update layer_stack to be compatible with latest gdsfactory 4.7.1

## [1.4.0](https://github.com/gdsfactory/ubc/pull/18)

- simpler component_factory thanks to `import_module_factories` function from gf.cell
Expand Down
45 changes: 0 additions & 45 deletions docs/notebooks/11_sparameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -138,51 +138,6 @@
"df = gm.write_sparameters_meep(component=ubcpdk.components.y_splitter(), run=False) # lr stands for left-right ports"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df = gm.write_sparameters_meep(component=ubcpdk.components.y_splitter(), run=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gm.plot.plot_sparameters(df)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gm.plot.plot_sparameters(df, keys=['s12m', 's13m'])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gm.plot.plot_sparameters(df, keys=['s11m'])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gm.plot.plot_loss1x2(df)"
]
},
{
"cell_type": "code",
"execution_count": null,
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.6.1
gdsfactory[full]==4.7.1
modes
51 changes: 51 additions & 0 deletions sparameters/straight_93c28777_strai_ff74a9ef_9b8b3405.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
s11a,s11m,s21a,s21m,s22m,s22a,s12m,s12a,wavelengths,freqs
-3.140158154171617,0.014999085066760528,-1.5982108886740394,1.0000062120633058,0.014999085066760528,-3.140158154171617,1.0000062120633058,-1.5982108886740394,1.5,0.6666666666666666
-3.1400819014673207,0.014961138938567547,-1.652705870084743,1.0000050388637363,0.014961138938567547,-3.1400819014673207,1.0000050388637363,-1.652705870084743,1.5020408163265306,0.6657608695652174
-3.140009829268091,0.014923334278211782,-1.7070506608399278,1.0000038876288064,0.014923334278211782,-3.140009829268091,1.0000038876288064,-1.7070506608399278,1.5040816326530613,0.6648575305291723
-3.1399415702131535,0.014885662674878524,-1.761245883910089,1.0000027624105274,0.014885662674878524,-3.1399415702131535,1.0000027624105274,-1.761245883910089,1.506122448979592,0.6639566395663956
-3.139876707268269,0.014848116539517797,-1.8152921585094917,1.0000016671800098,0.014848116539517797,-3.139876707268269,1.0000016671800098,-1.8152921585094917,1.5081632653061225,0.6630581867388362
-3.139814778077265,0.01481068918540473,-1.869190100427388,1.000000605722477,0.01481068918540473,-3.139814778077265,1.000000605722477,-1.869190100427388,1.510204081632653,0.6621621621621622
-3.1397552806192417,0.014773374903771976,-1.9229403222915014,0.9999995815394778,0.014773374903771976,-3.1397552806192417,0.9999995815394778,-1.9229403222915014,1.5122448979591836,0.6612685560053981
-3.1396976802613006,0.014736169025146335,-1.9765434337659882,0.999998597776236,0.014736169025146335,-3.1396976802613006,0.999998597776236,-1.9765434337659882,1.5142857142857142,0.6603773584905661
-3.1396414179130216,0.014699067957562503,-2.030000041696005,0.9999976571865502,0.014699067957562503,-3.1396414179130216,0.9999976571865502,-2.030000041696005,1.5163265306122449,0.6594885598923285
-3.139585918709436,0.01466206919744222,-2.0833107502160293,0.9999967621358653,0.01466206919744222,-3.139585918709436,0.9999967621358653,-2.0833107502160293,1.5183673469387755,0.6586021505376344
-3.139530600573553,0.014625171313085885,-2.136476160837678,0.9999959146368975,0.014625171313085885,-3.139530600573553,0.9999959146368975,-2.136476160837678,1.5204081632653061,0.6577181208053691
-3.139474882110184,0.014588373906452583,-2.1894968725277075,0.9999951164009694,0.014588373906452583,-3.139474882110184,0.9999951164009694,-2.1894968725277075,1.5224489795918368,0.6568364611260054
-3.139418189550314,0.014551677560819709,-2.2423734817782623,0.9999943688903793,0.014551677560819709,-3.139418189550314,0.9999943688903793,-2.2423734817782623,1.5244897959183674,0.6559571619812583
-3.1393599627507576,0.014515083782452122,-2.2951065826642383,0.9999936733570776,0.014515083782452122,-3.1393599627507576,0.9999936733570776,-2.2951065826642383,1.526530612244898,0.6550802139037433
-3.1392996605118135,0.014478594941652967,-2.347696766877704,0.9999930308616489,0.014478594941652967,-3.1392996605118135,0.9999930308616489,-2.347696766877704,1.5285714285714287,0.6542056074766355
-3.139236765586149,0.014442214216626729,-2.40014462372953,0.999992442271254,0.014442214216626729,-3.139236765586149,0.999992442271254,-2.40014462372953,1.530612244897959,0.6533333333333333
-3.139170789720965,0.014405945536713689,-2.452450740110377,0.9999919082468334,0.014405945536713689,-3.139170789720965,0.9999919082468334,-2.452450740110377,1.5326530612244897,0.6524633821571239
-3.1391012789102675,0.014369793523032881,-2.504615700411471,0.999991429229903,0.014369793523032881,-3.1391012789102675,0.999991429229903,-2.504615700411471,1.5346938775510204,0.6515957446808511
-3.1390278204016213,0.014333761077967551,-2.556640086384077,0.9999910054320058,0.014333761077967551,-3.1390278204016213,0.9999910054320058,-2.556640086384077,1.536734693877551,0.650730411686587
-3.138950041714672,0.014297858661387967,-2.6085244771137823,0.9999906368842126,0.014297858661387967,-3.138950041714672,0.9999906368842126,-2.6085244771137823,1.5387755102040817,0.649867374005305
-3.138867624872377,0.014262090186164198,-2.660269448719147,0.9999903234292171,0.014262090186164198,-3.138867624872377,0.9999903234292171,-2.660269448719147,1.5408163265306123,0.6490066225165563
-3.138780303414234,0.01422646295297993,-2.7118755743525482,0.9999900647728303,0.01422646295297993,-3.138780303414234,0.9999900647728303,-2.7118755743525482,1.542857142857143,0.6481481481481481
-3.138687870447983,0.014190981660556755,-2.7633434239221057,0.9999898607419243,0.014190981660556755,-3.138687870447983,0.9999898607419243,-2.7633434239221057,1.5448979591836736,0.6472919418758256
-3.1385901727676493,0.014155655405453098,-2.8146735642741083,0.999989710960671,0.014155655405453098,-3.1385901727676493,0.999989710960671,-2.8146735642741083,1.5469387755102042,0.646437994722955
-3.1384871175873528,0.01412049138808707,-2.8658665590111045,0.999989615006188,0.01412049138808707,-3.1384871175873528,0.999989615006188,-2.8658665590111045,1.5489795918367348,0.6455862977602107
-3.1383786736468937,0.014085493787600474,-2.9169229680677398,0.9999895731082101,0.014085493787600474,-3.1383786736468937,0.9999895731082101,-2.9169229680677398,1.5510204081632653,0.6447368421052632
-3.1382648602061467,0.014050672167724168,-2.967843348389284,0.9999895850026137,0.014050672167724168,-3.1382648602061467,0.9999895850026137,-2.967843348389284,1.5530612244897959,0.6438896189224704
-3.1381457564373645,0.014016032186717368,-3.0186282533150006,0.9999896507629649,0.014016032186717368,-3.1381457564373645,0.9999896507629649,-3.0186282533150006,1.5551020408163265,0.6430446194225722
-3.138021494677507,0.013981580154351504,-3.069278232763112,0.9999897704712775,0.013981580154351504,-3.138021494677507,0.9999897704712775,-3.069278232763112,1.5571428571428572,0.6422018348623854
-3.1378922589917932,0.01394732284195957,-3.119793833184843,0.9999899442023916,0.01394732284195957,-3.1378922589917932,0.9999899442023916,-3.119793833184843,1.5591836734693878,0.6413612565445026
-3.137758288899461,0.013913263433381359,-3.170175597328048,0.9999901721889001,0.013913263433381359,-3.137758288899461,0.9999901721889001,-3.170175597328048,1.5612244897959184,0.6405228758169934
-3.1376198665475163,0.013879409438712522,-3.2204240645892774,0.9999904544601943,0.013879409438712522,-3.1376198665475163,0.9999904544601943,-3.2204240645892774,1.563265306122449,0.639686684073107
-3.13747732425467,0.013845764924520568,-3.2705397706320154,0.9999907912022693,0.013845764924520568,-3.13747732425467,0.9999907912022693,-3.2705397706320154,1.5653061224489797,0.6388526727509778
-3.1373310360201403,0.013812334032897703,-3.3205232475763853,0.9999911826161771,0.013812334032897703,-3.1373310360201403,0.9999911826161771,-3.3205232475763853,1.5673469387755103,0.6380208333333333
-3.13718141698638,0.013779118167928497,-3.3703750238547894,0.9999916291304748,0.013779118167928497,-3.13718141698638,0.9999916291304748,-3.3703750238547894,1.569387755102041,0.6371911573472041
-3.1370289081901186,0.013746122568019376,-3.420095624882549,0.9999921307640286,0.013746122568019376,-3.1370289081901186,0.9999921307640286,-3.420095624882549,1.5714285714285714,0.6363636363636364
-3.136873982498128,0.01371334833201119,-3.4696855722772257,0.9999926882004577,0.01371334833201119,-3.136873982498128,0.9999926882004577,-3.4696855722772257,1.573469387755102,0.6355382619974059
-3.1367171317164235,0.013680797034501627,-3.519145384688049,0.999993301829307,0.013680797034501627,-3.1367171317164235,0.999993301829307,-3.519145384688049,1.5755102040816327,0.6347150259067358
-3.136558863088728,0.013648469208386034,-3.5684755775540307,0.9999939722287199,0.013648469208386034,-3.136558863088728,0.9999939722287199,-3.5684755775540307,1.5775510204081633,0.6338939197930142
-3.1363996951890303,0.013616363629260116,-3.617676663514413,0.9999946996236105,0.013616363629260116,-3.1363996951890303,0.9999946996236105,-3.617676663514413,1.579591836734694,0.6330749354005167
-3.136240146587973,0.013584481261737742,-3.6667491521932414,0.9999954845619914,0.013584481261737742,-3.136240146587973,0.9999954845619914,-3.6667491521932414,1.5816326530612246,0.632258064516129
-3.136080739877207,0.013552820121886973,-3.715693550520479,0.9999963272433661,0.013552820121886973,-3.136080739877207,0.9999963272433661,-3.715693550520479,1.5836734693877552,0.6314432989690721
-3.1359219926460233,0.013521378246600532,-3.7645103629386814,0.9999972274915132,0.013521378246600532,-3.1359219926460233,0.9999972274915132,-3.7645103629386814,1.5857142857142859,0.6306306306306306
-3.13576441427733,0.01349015307300355,-3.813200091089378,0.9999981853006824,0.01349015307300355,-3.13576441427733,0.9999981853006824,-3.813200091089378,1.5877551020408165,0.6298200514138816
-3.1356084999528973,0.013459142289950494,-3.8617632343405086,0.9999992002554581,0.013459142289950494,-3.1356084999528973,0.9999992002554581,-3.8617632343405086,1.5897959183673471,0.6290115532734274
-3.1354547332458744,0.013428339697126885,-3.9102002896908408,1.0000002715732919,0.013428339697126885,-3.1354547332458744,1.0000002715732919,-3.9102002896908408,1.5918367346938775,0.6282051282051282
-3.135303566064492,0.013397743561550591,-3.9585117518503843,1.0000013987007206,0.013397743561550591,-3.135303566064492,1.0000013987007206,-3.9585117518503843,1.5938775510204082,0.6274007682458387
-3.1351554266079122,0.01336734926643339,-4.006698113697116,1.0000025803943011,0.01336734926643339,-3.1351554266079122,1.0000025803943011,-4.006698113697116,1.5959183673469388,0.6265984654731458
-3.135010715694837,0.01333714884878095,-4.054759865738894,1.000003815586158,0.01333714884878095,-3.135010715694837,1.000003815586158,-4.054759865738894,1.5979591836734695,0.6257982120051085
-3.13486978479416,0.013307140511352865,-4.102697496993832,1.0000051029688262,0.013307140511352865,-3.13486978479416,1.0000051029688262,-4.102697496993832,1.6,0.625
92 changes: 92 additions & 0 deletions sparameters/straight_93c28777_strai_ff74a9ef_9b8b3405.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
resolution: 30
port_symmetries:
o1:
s11:
- s22
s21:
- s12
wavelength_start: 1.5
wavelength_stop: 1.6
wavelength_points: 50
port_margin: 2
port_monitor_offset: -0.1
port_source_offset: -0.1
dispersive: false
ymargin_top: 3
ymargin_bot: 3
xmargin_left: 0
xmargin_right: 0
layer_stack:
strip:
layer:
- 1
- 0
thickness: 0.22
zmin: 0.0
material: si
sidewall_angle: 0
strip2:
layer:
- 31
- 0
thickness: 0.22
zmin: 0.0
material: si
sidewall_angle: 0
component:
version: 0.0.1
settings:
name: straight_93c28777_strai_ff74a9ef
module: ubcpdk.components.straight
function_name: straight
info: {}
info_version: 2
full:
length: 3
width: 0.5
layer:
- 1
- 0
with_pins: true
changed:
length: 3
default:
length: 10
width: 0.5
layer:
- 1
- 0
with_pins: true
child:
name: straight_93c28777
module: gdsfactory.components.straight
function_name: straight
info:
length: 3.0
width: 0.5
info_version: 2
full:
length: 3
npoints: 2
with_cladding_box: true
cross_section:
function: cross_section
width: 0.5
layer:
- 1
- 0
changed:
layer:
- 1
- 0
length: 3
width: 0.5
default:
length: 10
npoints: 2
with_cladding_box: true
cross_section:
function: cross_section
child: null
compute_time_seconds: 3.5554819107055664
compute_time_minutes: 0.059258031845092776
4 changes: 2 additions & 2 deletions ubcpdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""UBC Siepic Ebeam PDK from edx course"""
import gdsfactory as gf
from gdsfactory.config import logger
from gdsfactory.cell import get_module_factories
from gdsfactory.get_factories import get_component_factories


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


logger.info(f"Found UBCpdk {__version__!r} installed at {module!r}")
component_factory = get_module_factories(components)
component_factory = get_component_factories(components)


if __name__ == "__main__":
Expand Down
30 changes: 30 additions & 0 deletions ubcpdk/circuits/mask.ic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: mask_compact
pdk: ubcpdk

instances:
rings:
component: pack_doe
settings:
component: ring_single
radius: [30, 50, 20]
length_x: [1, 2, 3]
pack:
do_permutations: True
function: add_fiber_array

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

placements:
rings:
xmin: 50

mzis:
xmin: rings,east
26 changes: 14 additions & 12 deletions ubcpdk/tech.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,20 @@ class LayerMapUbc:
def get_layer_stack_ubc(thickness: float = 220 * nm) -> LayerStack:
"""Returns generic LayerStack"""
return LayerStack(
strip=LayerLevel(
layer=LAYER.WG,
thickness=thickness,
zmin=0.0,
material="si",
),
strip2=LayerLevel(
layer=LAYER.WG2,
thickness=thickness,
zmin=0.0,
material="si",
),
layers=dict(
strip=LayerLevel(
layer=LAYER.WG,
thickness=thickness,
zmin=0.0,
material="si",
),
strip2=LayerLevel(
layer=LAYER.WG2,
thickness=thickness,
zmin=0.0,
material="si",
),
)
)


Expand Down