From d2ed4ff3d16dfbf578a03ebafee1126e3f81f195 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Mon, 31 Jul 2023 07:40:23 -0700 Subject: [PATCH 1/8] fix docs --- docs/_toc.yml | 13 ++- pyproject.toml | 4 +- tests/ref/add_fiber_array_pads_rf.gds | Bin 129412 -> 129848 bytes tests/ref/dbg.gds | Bin 1270 -> 1270 bytes tests/ref/dbr_cavity.gds | Bin 33542 -> 33542 bytes .../ref/dbr_cavity_add_fiber_ar_f2ab6ad2.gds | Bin 152166 -> 152166 bytes tests/ref/mzi_ab5edfa6.gds | Bin 22184 -> 22212 bytes tests/ref/pad_array_71569d1c.gds | Bin 936 -> 360 bytes tests/ref/ring_double_heater_171f554b.gds | Bin 9294 -> 9322 bytes tests/ref/ring_single_heater_171f554b.gds | Bin 9690 -> 9718 bytes .../ref/ring_single_heater_171f_5dab5bcc.gds | Bin 11724 -> 14094 bytes .../ref/ring_single_heater_171f_ac60d9ba.gds | Bin 11046 -> 11482 bytes tests/ref/via_stack_627f28a4.gds | Bin 464 -> 492 bytes .../test_pdk_settings_add_fiber_array_.yml | 2 +- ..._pdk_settings_add_fiber_array_pads_rf_.yml | 84 +++++++++++++- .../test_pdk_settings_add_pads_dc_.yml | 86 ++++++++++++-- .../test_pdk_settings_add_pads_rf_.yml | 90 +++++++++++++-- .../test_pdk_settings_bend_.yml | 4 +- .../test_pdk_settings_bend_euler_.yml | 4 +- .../test_pdk_settings_bend_s_.yml | 2 +- .../test_pdk_settings_coupler_.yml | 4 +- .../test_pdk_settings_coupler_ring_.yml | 6 +- .../test_pdk_settings_dbg_.yml | 2 +- .../test_pdk_settings_dbr_cavity_.yml | 2 +- .../test_pdk_settings_dbr_cavity_te_.yml | 2 +- ...t_pdk_settings_ebeam_adiabatic_te1550_.yml | 8 +- .../test_pdk_settings_ebeam_bdc_te1550_.yml | 8 +- .../test_pdk_settings_ebeam_crossing4_.yml | 8 +- ...t_pdk_settings_ebeam_crossing4_2ports_.yml | 2 +- ...k_settings_ebeam_dc_halfring_straight_.yml | 6 +- .../test_pdk_settings_ebeam_dc_te1550_.yml | 4 +- .../test_pdk_settings_ebeam_y_1550_.yml | 6 +- ...pdk_settings_ebeam_y_adiabatic_tapers_.yml | 2 +- .../test_pdk_settings_gc_te1310_.yml | 2 +- .../test_pdk_settings_gc_te1310_8deg_.yml | 2 +- .../test_pdk_settings_gc_te1550_.yml | 2 +- .../test_pdk_settings_gc_te1550_90nmSlab_.yml | 2 +- ...test_pdk_settings_gc_te1550_broadband_.yml | 2 +- .../test_pdk_settings_gc_tm1550_.yml | 2 +- .../test_pdk_settings_mmi1x2_.yml | 6 +- .../test_pdk_settings_mzi_.yml | 2 +- .../test_pdk_settings_mzi_heater_.yml | 84 +++++++++++++- .../test_pdk_settings_ring_double_heater_.yml | 108 +++++++++++++++--- .../test_pdk_settings_ring_single_.yml | 2 +- .../test_pdk_settings_ring_single_heater_.yml | 94 +++++++++++++-- .../test_pdk_settings_ring_with_crossing_.yml | 2 +- .../test_pdk_settings_spiral_.yml | 4 +- .../test_pdk_settings_straight_.yml | 2 +- .../test_pdk_settings_straight_one_pin_.yml | 2 +- .../test_pdk_settings_terminator_short_.yml | 2 +- ...st_pdk_settings_via_stack_heater_mtop_.yml | 6 +- ubcpdk/samples/ubc_joaquin_matres1.py | 4 +- 52 files changed, 564 insertions(+), 115 deletions(-) diff --git a/docs/_toc.yml b/docs/_toc.yml index 40d99004..4830e7f3 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -1,5 +1,5 @@ # Table of contents -# Learn more at https://jupyterbook.org/customize/toc.html +# Learn more at https://jterbook.org/customize/toc.html format: jb-book root: index @@ -8,4 +8,15 @@ chapters: - file: components - file: components_plot - file: tutorial + sections: + - file: notebooks/00_layout + - file: notebooks/11_sparameters + - file: notebooks/11_sparameters_gratings + - file: notebooks/12_sim_plugins_tidy3d + - file: notebooks/13_sim_plugins + - file: notebooks/14_sax_tidy3d + - file: notebooks/21_schematic_driven_layout + - file: notebooks/31_data_analysis_mzi + - file: notebooks/32_data_analysis_ring + - file: notebooks/33_data_analysis_dbr - file: changelog diff --git a/pyproject.toml b/pyproject.toml index 4baa6cd1..91f30f8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ authors = [ keywords = ["python"] license = {file = "LICENSE"} dependencies = [ - "gdsfactory[cad,kfactory]==6.109.2", + "gdsfactory==6.115.0", "modes", ] readme = "README.md" @@ -30,7 +30,7 @@ requires-python = ">=3.7" [project.optional-dependencies] full = [ - "gdsfactory[full]==6.109.2", + "gdsfactory[full]==6.115.0", "modes", ] diff --git a/tests/ref/add_fiber_array_pads_rf.gds b/tests/ref/add_fiber_array_pads_rf.gds index 5d0ec0f9e40280164774d1d6083bb8b80e95013f..ee6639b702241f3476e8b4df593d6fb204c0d34b 100644 GIT binary patch delta 1612 zcma)6O=uHQ5S~f5yJ@u=`N6hv+PTeC0Oz$TS-4?Fv2-h1=SeBbQt zFWl-kt_@hQSk8hAEnFVz!3i96fm{DxY&+Iqbd1dy9Z%oKu*0xLI}bLNos_~spCtHX zuNWaCX&fR0yLi&>s@*eF>J4)VjaR2e*p>=c@(OpRv9pm4O~fXpsj1*)X(p23y~&4M z$I=!ybX5cCWGgq5=V^412U*-l?&k1#PxToG%O)nKuSSCL=|T-MAC>z>4_U}!>#+Lc z5r8G`Rexr7s8zSe0h;DiHFuiYQXH5=01OB4k8+dOtZfaZ+$=Ta$IUL@bfmbtR}~GuwNbBZ)Z_d!BNfWz3sfwofCXPb?(_Sj z8en@TfCdZb(=-Qg?yUwJaP~E|1wUEIq22UWDH`aLd9O&@Fs%NXAExF1UK!NeK+7*M zKy4{*)&{bi#%W`fq&I_ij4ov@gOAY^q9Azt!&119LJX-ptE&{+?z<;Nh$V685KD10 zh?FU#7$rdz0&+C0B|74_47s)Yq2|1UTIjK9A~d^K`JBZN?jiiv;?zosgftWMM|h7v zBzTfH7-y3e5L~vJBAJEv!J)zAGShC_7~bpggaUFz!|QYx^-u!IHqzz*=U>*rQ#~|S zk3}0xf-liUzUEM@;HQ5bRlCtg3SxCHrLm60HqmJXW^GGLK<;hgY_nb!?6=jZyQh3K z;?ASpTITRX9=kYw>Id@JZ7nNM3t44-EDNh{PM16lmFc0YaLDVCMBY!dRh`}nAPX66 z-=oS_HW_D|Nh*(H#)6c?TNtYtROSAMYTtp6IBKgnd-41K2)GPY$*F%0|#6b+A0 delta 1450 zcmai!Pe>GT6vyA28Gkdbu5CK*A6aw*qfWIuyY4DM*g@#jUxf6s&HnKci|*PMhG>=t zy=epeZb8sBA%vz=L}jKYPthSlSS4=>fs|0w%x~Al*;u>cP6feX4JaB#oadERMH3{Th-uQoGy)z)G?4=zH+)Kom8h9e0jng*c} zfH*loAT1m;0XfA1fOLWf?EVe1i#LqSyqN(rPHP*yXRt<(RR?%-zZ7RcI0^NY4?kfk zUpYegFhNndxy@ni=aXV<0|~rr8~or%la+YKd+Vtg3RnlF2q%RtneaW$w%} z-AJ+50U)=M-W-L4SJ1AGbtAl9QC9n2e z*t7R*FB%39GY8dlDALv##tjppyBa4a^`OMmWTyY^iaFU1Vw z=^SubGw$97Xqz*PwQDT?%Pv^?qJ<)WzoF*xYyF~HgFiqPXS~Y;(kHa@KlVCwuLI{_ z+td2eJJh+;)%-Fs2Ujt--F=j`N8GuNqp4`(Bj#&hbrQ|l;HTmWCMp2#t>DWFRvKJI zSq$~0l)fah%tybiqB90VUzsyFwZS5saaoSlb4m|<#v~qp#_~AX86T1hc1rqS9f#~G zeRCZRk3C0CHv{zI2W+J61@uXVAv9a0G+MwZxxBgTBP~?|Tj-I>>#fmG5mbd|4 G5a2%%gc&nRhO7d@%5^Ma OlOvcc(UeSKNdf@It0(vX diff --git a/tests/ref/dbr_cavity.gds b/tests/ref/dbr_cavity.gds index 320931444c84d073494038e1bf7017c7eb27c8a7..8b316ea3cf9d59b09da48f531c64bb02f7dd7312 100644 GIT binary patch delta 205 zcmZo`V`^(-l4D?FU}B13kYQwEf6TzeAj!bapu(U4V^5UR=S3BW3gR#|GfYi0PBos` zqG4iUVQFBTYM#o#Bf!i611y3J3@q#n3^J@(4c#ojxLz97*vV&PB;e+5<_h>}B#uKf SSS8HX&2MC$8!@x6FaQ7uEF)O} delta 205 zcmZo`V`^(-l4D?FU}B13kYQwEf6TzeAju%Wpu(U4V^5UR=S3BW3gR#@O*Ax0H8Ggj zqG6Jhm}+TkY>>pjBf!i611y3J3@q#n3^J@(4c#ojxLz97*vV&PBsgGZZI%gmZX}LF TGgu|e1)JZ<{4`=_VPOCOK0YJm diff --git a/tests/ref/dbr_cavity_add_fiber_ar_f2ab6ad2.gds b/tests/ref/dbr_cavity_add_fiber_ar_f2ab6ad2.gds index 11fb5110a77882809b1960bd75feea9330226676..0ceb2122893d54161a007e5ddda4eb0d5c2231c5 100644 GIT binary patch delta 363 zcmaF1g!9=FPB{iP1}3Hm1{p>s_Qwod43Z4&3@Qu?F!n?_eO?rS$#QZE6RQ$Y1vkD} zFO4cPeZfse2@VqrO9SIn^VIDJZZdu}LRGPOiA*jdnvk5_L?%?B$$J#g?AolQn9C@F z;wF%T8RXa|J1WRbKCWbjYCs_Qwod43Z223@Qu?F!n?_eO?rS$u@xs6RQ$Y1vkD} zFO4d)`H+7uBbty+;6x@=p~<&`(M;Ox5t7R&f?^}cISg`aljDPBCO-`|Lp7mUBW$}y z7-Q!)RN?9Sc$g$Ok`hxbjg1YGCLfRz*?dFht`Rmx2BwLIMyVzSKt&SUzwt1=MpL!@ kojsGk0Gdv(0Hz=gn9k`X0ZbYQ%hms_Qwod43Z4&3@Qu?F!n?_eO?rSjZt@*QAH;2V-?>V z%@W3lD!h3gYc875WDE9CAtfQUYsduJ=GY+ zYLL4al-SU<$HyDQ7iU(b8XCmM8yYZ7=JEGOHEFXQN2e~D&=u3QXpY<5XO8aP%^a2( zLQPh#0;pz9zT#DiDzZ7u8^d$~-|OfWX87l$3q1+IurMwNL+D1ZETaf!(1@{3PV^Jm JEF0R*2moRaTPpwn delta 465 zcmX@ImT|>eMmYvH1}3Hm1{p>s_Qwod43Z223@Qu?F!n?_eO?rSjZt@*QAH;2V-?>V z%@W3lD!h3gYc8V*ie8Yx3}S4P8$(1U2eVrViwLnL=jRqA78l1GB&HggSXib_UdJwv zYR=?a?5U_Co6m7{>Y@pyn5{*(U(O;IU1)|ShLDi8s{pE5lT*A)QAIXC^TsfJf$w!j xRZQQBuwi9403*y8!?)MFtH3 literal 936 zcma)4F-yZh6#jBaudz)v)>0{SQ0ORV(wNdk5F7+o2XQIaCWBzHrUfY!MCej<>gwX= z>gX@eTz z9Go~v<{G!{o(3 z5tp(DCAz4ksA6Us-vwY#Oe>h}I1C`{@Gqi!{>Htnt{MA|Gz&@1!ISTc03HX)i0;EI K<`HNr3Vs0+Ta%su diff --git a/tests/ref/ring_double_heater_171f554b.gds b/tests/ref/ring_double_heater_171f554b.gds index 32de60a2499939c512a451ba9f2d0e03e320540a..eb9c9e05d1825d70a8454a0664da8465d0efed5c 100644 GIT binary patch delta 60 zcmX@-@ycVvb~Yg;A-3fF+=9g7;`p4z%G4r5qsf!m6ekBL%TIo)EGS?UA8!y}oLQA> QXb>N7XuzW?QV+)2;l^p=*fcz=x(?1AV#_10X6B# z^k5`o&=7)n@Zh<6kU-)=A|zZOBob2-51x#No=l7ooO%0W6P(Lr-+b@;-uvdw?%jNH z=jqNl(@_hiO$sQkgie1?>qxk#Ewu{b?lpuP8}t|tb-zXK@)11#0iTaJx>L2wD*cLk zIh-vPPD{2)Dwd(E^c9Q0+W{ILFWHV}kfP1-nFv?HYZFT?62e>cGcte3BI0r2Q>&y{ zvkb07AL6W3u9-DbF>NN$2iY7&G^1eHMF-d+eP0Il_S6~nlk7)?Sse1JRjuHdCUns{ zIz9b)AL5o}I;^>(E8>B*a>*tZ;owY!vk0LBZdQ912}3EaLqACgF&u|aw|LVuDry;u zKa^5*4@V{2A%<#LIylri^1zqz3S%gU%tuDH)as?vf{at12LVkF{U!IOeG0_y4WaJG z9*IudLIjAIvF$0w65{~ja5d<-Y83T~YFezM9@-H4(|)TS*F`0OcJ$jL0SRlE6$zK- zbB8y-2X|FteU(YA#JMG2mhWfUzqAe!?|wUOj^zN`z6?(AN*Wu!j`(`So2Aat<1!5A z4PV+HK2K)!#s9{Sk0$cS)k1Ght1_0RJTvgtHZIbOjP$+VF9uRnW9w=Ul2|f77 zgkuOPDe-QlI-^&JZfS;tq;3I82%|ne$KFa#jMHzT3LW~>2^|V6VOM`83>~~rJ<8Br zC@Pu$&j@N*(A*jpG^nANuLG4ogFqFoUjY!?{a!`)RnhD6pu9Z^r)YZ;PG^)vvo!Jy F{{?|FmInX; delta 868 zcmaiyF>ljA6vy9Pl8X~N#7Rt?v>8&h607Z8okXZ0Au%DLFff4>+{E5eOgliOq6n!2 zEU4m%6+Qq9mDdbqf`Ngrz=VYO03acS^EtH=38hr=7b>-U_G1YR{!>pfvGau1Hq>w$i|FtabU^4{->9E4uWwa~uaOFF+oI2^&wjTU?mC!*d+=ounh_TN;v~$>n9lTi6$?^7ZB?dL)X0fmzr1y zc=dR(K7(upE+#KKV)E^Oke3rAWG&5HmzhlhN^<*?W0`?9nUBOYrUH2`F2Wr_EIR)O ziD*YDsB=-Ryqsgn#cQ{N3EUNkk$)7gCf;|aj&3?I~PvYs4Z{8|>{xK>cf@4S@7D&&52 my%CaScKYK`t>etN6_wVf4WxX!T$G;vz3O4v(4xcb*W?fXt+ICj diff --git a/tests/ref/ring_single_heater_171f_ac60d9ba.gds b/tests/ref/ring_single_heater_171f_ac60d9ba.gds index b86271211c44145841b16ffb9908dcb725284400..2c1640045b34934c2fffbd71ac82eba07fbb5f6f 100644 GIT binary patch delta 868 zcmZuvO=}ZD7=Aa|q(c+aZK5$kz*aC?z3fM_o7_TAf@nPnIc;XM8x<^V8Vk0C_TZ&n zBw@g-dJ#_|?4^G|sW*?J_y@#8&`VoC#+lg<8rZo!FweZt^StjnukU{8j1CRU(^RWx zsE}9E^!R2SQUe|2c>sA9pi<0ktZhE>?7=2>ZNt!;E_NGa5tYl+l%w^Xrl~d)DBN!~ z98EV9CEs6RA)~@c_oCx}a0~e1E!P z(xvprWBP9}V)v|~=Kn%JC9;DGC?3!lox2L`@RuC92SDdDR|0AGlR$RMdGa!QSyabM zVNKNjJiQ@o|GsStWPyb(3oJ0;g?%S?Hnfla0v9+sI1q)$-`)iRVW*Kmzzc!Z{Go*6 z4F=h-C_&~hdun-st3di*MIZz`&+fk{tV`spd)zu@Dk~`-l$QRq*j)coLa$p zeB*Z=Hhtk$5E&Et4|9PHV}oA9jC+YJ za3aELf+NI#kJway-S9IX#d^RWfc%Tq2GB{*QgR!(8uJ{ITAp9-ZITIf=0}?jFC^~L Ih?=-YKY4_ii2wiq diff --git a/tests/ref/via_stack_627f28a4.gds b/tests/ref/via_stack_627f28a4.gds index f0864f7dcf540dd0d53ff126b9d5dfd0411fc70c..8abc2b4bacbdae3d8af4fc7551378d057061e004 100644 GIT binary patch delta 56 zcmcb>{DyhLdLbntw&eWWg2dwD_?*Pb)FMNpiQS45ugFhMXA~4LijOylFV3t=H8hBi MH#A_F%*J>M070G;9smFU delta 67 zcmaFEe1UnwdSMYEw&eWWg2dwDc!R`LLlXk7#P@inHYE`uVb{H IoX*$^0M^tKNB{r; diff --git a/tests/test_components/test_pdk_settings_add_fiber_array_.yml b/tests/test_components/test_pdk_settings_add_fiber_array_.yml index 4ea919fa..0a5ad43a 100644 --- a/tests/test_components/test_pdk_settings_add_fiber_array_.yml +++ b/tests/test_components/test_pdk_settings_add_fiber_array_.yml @@ -118,7 +118,7 @@ settings: settings: polarization: te taper_angle: 35 - layer_label: TEXT + layer_label: LABEL select_ports: function: select_ports settings: diff --git a/tests/test_components/test_pdk_settings_add_fiber_array_pads_rf_.yml b/tests/test_components/test_pdk_settings_add_fiber_array_pads_rf_.yml index d598b974..480914be 100644 --- a/tests/test_components/test_pdk_settings_add_fiber_array_pads_rf_.yml +++ b/tests/test_components/test_pdk_settings_add_fiber_array_pads_rf_.yml @@ -2,25 +2,97 @@ name: add_fiber_array_pads_rf ports: e1: center: - - 160.055 - - -60.5 + - 160.05 + - -435.5 layer: - 12 - 0 name: e1 - orientation: 180 + orientation: 180.0 port_type: electrical shear_angle: null width: 75 e2: center: - - 160.055 - - 64.5 + - 160.05 + - -310.5 layer: - 12 - 0 name: e2 - orientation: 180 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 75 + e3: + center: + - 160.05 + - -185.5 + layer: + - 12 + - 0 + name: e3 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 75 + e4: + center: + - 160.05 + - -60.5 + layer: + - 12 + - 0 + name: e4 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 75 + e5: + center: + - 160.05 + - 64.5 + layer: + - 12 + - 0 + name: e5 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 75 + e6: + center: + - 160.05 + - 189.5 + layer: + - 12 + - 0 + name: e6 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 75 + e7: + center: + - 160.05 + - 314.5 + layer: + - 12 + - 0 + name: e7 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 75 + e8: + center: + - 160.05 + - 439.5 + layer: + - 12 + - 0 + name: e8 + orientation: 180.0 port_type: electrical shear_angle: null width: 75 diff --git a/tests/test_components/test_pdk_settings_add_pads_dc_.yml b/tests/test_components/test_pdk_settings_add_pads_dc_.yml index cfcb9a1e..e3febb3f 100644 --- a/tests/test_components/test_pdk_settings_add_pads_dc_.yml +++ b/tests/test_components/test_pdk_settings_add_pads_dc_.yml @@ -2,8 +2,8 @@ name: ring_single_heater_171f_5dab5bcc ports: elec-ring_single_heater_171f554b-0: center: - - -64.5 - - 160.055 + - -439.5 + - 160.05 layer: - 12 - 0 @@ -14,8 +14,8 @@ ports: width: 75 elec-ring_single_heater_171f554b-1: center: - - 60.5 - - 160.055 + - -314.5 + - 160.05 layer: - 12 - 0 @@ -24,6 +24,78 @@ ports: port_type: electrical shear_angle: null width: 75 + elec-ring_single_heater_171f554b-2: + center: + - -189.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-2 + orientation: 270 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-3: + center: + - -64.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-3 + orientation: 270 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-4: + center: + - 60.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-4 + orientation: 270 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-5: + center: + - 185.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-5 + orientation: 270 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-6: + center: + - 310.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-6 + orientation: 270 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-7: + center: + - 435.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-7 + orientation: 270 + port_type: electrical + shear_angle: null + width: 75 o1: center: - -17.0 @@ -32,7 +104,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -105,7 +177,7 @@ settings: gap: 0.2 length_x: 4.0 length_y: 0.6 - port_orientation: 90 + port_orientation: null radius: 10.0 via_stack: function: via_stack @@ -139,7 +211,7 @@ settings: gap: 0.2 length_x: 4.0 length_y: 0.6 - port_orientation: 90 + port_orientation: null radius: 10.0 via_stack: function: via_stack diff --git a/tests/test_components/test_pdk_settings_add_pads_rf_.yml b/tests/test_components/test_pdk_settings_add_pads_rf_.yml index 7c0b7063..7f32e4a8 100644 --- a/tests/test_components/test_pdk_settings_add_pads_rf_.yml +++ b/tests/test_components/test_pdk_settings_add_pads_rf_.yml @@ -2,25 +2,97 @@ name: ring_single_heater_171f_ac60d9ba ports: elec-ring_single_heater_171f554b-1: center: - - 60.5 - - 160.055 + - 435.5 + - 160.05 layer: - 12 - 0 name: elec-ring_single_heater_171f554b-1 - orientation: 270 + orientation: 270.0 port_type: electrical shear_angle: null width: 75 elec-ring_single_heater_171f554b-2: center: - - -64.5 - - 160.055 + - 310.5 + - 160.05 layer: - 12 - 0 name: elec-ring_single_heater_171f554b-2 - orientation: 270 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-3: + center: + - 185.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-3 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-4: + center: + - 60.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-4 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-5: + center: + - -64.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-5 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-6: + center: + - -189.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-6 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-7: + center: + - -314.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-7 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 75 + elec-ring_single_heater_171f554b-8: + center: + - -439.5 + - 160.05 + layer: + - 12 + - 0 + name: elec-ring_single_heater_171f554b-8 + orientation: 270.0 port_type: electrical shear_angle: null width: 75 @@ -32,7 +104,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -105,7 +177,7 @@ settings: gap: 0.2 length_x: 4.0 length_y: 0.6 - port_orientation: 90 + port_orientation: null radius: 10.0 via_stack: function: via_stack @@ -139,7 +211,7 @@ settings: gap: 0.2 length_x: 4.0 length_y: 0.6 - port_orientation: 90 + port_orientation: null radius: 10.0 via_stack: function: via_stack diff --git a/tests/test_components/test_pdk_settings_bend_.yml b/tests/test_components/test_pdk_settings_bend_.yml index e22ee971..675ff83e 100644 --- a/tests/test_components/test_pdk_settings_bend_.yml +++ b/tests/test_components/test_pdk_settings_bend_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 90 + orientation: 90.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_bend_euler_.yml b/tests/test_components/test_pdk_settings_bend_euler_.yml index c101a680..829f150c 100644 --- a/tests/test_components/test_pdk_settings_bend_euler_.yml +++ b/tests/test_components/test_pdk_settings_bend_euler_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 90 + orientation: 90.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_bend_s_.yml b/tests/test_components/test_pdk_settings_bend_s_.yml index 6aa79100..023556e8 100644 --- a/tests/test_components/test_pdk_settings_bend_s_.yml +++ b/tests/test_components/test_pdk_settings_bend_s_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_coupler_.yml b/tests/test_components/test_pdk_settings_coupler_.yml index e22cf23c..bd2c1dd8 100644 --- a/tests/test_components/test_pdk_settings_coupler_.yml +++ b/tests/test_components/test_pdk_settings_coupler_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_coupler_ring_.yml b/tests/test_components/test_pdk_settings_coupler_ring_.yml index 285ff5da..116bc7fd 100644 --- a/tests/test_components/test_pdk_settings_coupler_ring_.yml +++ b/tests/test_components/test_pdk_settings_coupler_ring_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 90 + orientation: 90.0 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 90 + orientation: 90.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_dbg_.yml b/tests/test_components/test_pdk_settings_dbg_.yml index 474d9f40..be594894 100644 --- a/tests/test_components/test_pdk_settings_dbg_.yml +++ b/tests/test_components/test_pdk_settings_dbg_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_dbr_cavity_.yml b/tests/test_components/test_pdk_settings_dbr_cavity_.yml index 68220f4a..e946e2c4 100644 --- a/tests/test_components/test_pdk_settings_dbr_cavity_.yml +++ b/tests/test_components/test_pdk_settings_dbr_cavity_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_dbr_cavity_te_.yml b/tests/test_components/test_pdk_settings_dbr_cavity_te_.yml index fb24ad33..887cf596 100644 --- a/tests/test_components/test_pdk_settings_dbr_cavity_te_.yml +++ b/tests/test_components/test_pdk_settings_dbr_cavity_te_.yml @@ -73,7 +73,7 @@ settings: settings: polarization: te taper_angle: 35 - layer_label: TEXT + layer_label: LABEL select_ports: function: select_ports settings: diff --git a/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml index 4e933811..e2697596 100644 --- a/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 0 + orientation: 0.0 port_type: optical shear_angle: null width: 0.5 @@ -44,7 +44,7 @@ ports: - 1 - 0 name: o4 - orientation: 0 + orientation: 0.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml index 7ed22a05..9303b83e 100644 --- a/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 0 + orientation: 0.0 port_type: optical shear_angle: null width: 0.5 @@ -44,7 +44,7 @@ ports: - 1 - 0 name: o4 - orientation: 0 + orientation: 0.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml b/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml index 1ea02118..c0e9a864 100644 --- a/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 90 + orientation: 90.0 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 0 + orientation: 0.0 port_type: optical shear_angle: null width: 0.5 @@ -44,7 +44,7 @@ ports: - 1 - 0 name: o4 - orientation: 270 + orientation: 270.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_crossing4_2ports_.yml b/tests/test_components/test_pdk_settings_ebeam_crossing4_2ports_.yml index a29a6daf..aa988784 100644 --- a/tests/test_components/test_pdk_settings_ebeam_crossing4_2ports_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_crossing4_2ports_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_dc_halfring_straight_.yml b/tests/test_components/test_pdk_settings_ebeam_dc_halfring_straight_.yml index 48f56bc8..6a8a892c 100644 --- a/tests/test_components/test_pdk_settings_ebeam_dc_halfring_straight_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_dc_halfring_straight_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 90 + orientation: 90.0 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 90 + orientation: 90.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_dc_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_dc_te1550_.yml index ab74048b..4ee72f00 100644 --- a/tests/test_components/test_pdk_settings_ebeam_dc_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_dc_te1550_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml b/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml index 0aa5240e..ea29508b 100644 --- a/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 0 + orientation: 0.0 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 0 + orientation: 0.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_tapers_.yml b/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_tapers_.yml index 50858978..01624072 100644 --- a/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_tapers_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_tapers_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_gc_te1310_.yml b/tests/test_components/test_pdk_settings_gc_te1310_.yml index bd4f951a..b53b5021 100644 --- a/tests/test_components/test_pdk_settings_gc_te1310_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1310_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.35 diff --git a/tests/test_components/test_pdk_settings_gc_te1310_8deg_.yml b/tests/test_components/test_pdk_settings_gc_te1310_8deg_.yml index 46d93d72..9cdfdd92 100644 --- a/tests/test_components/test_pdk_settings_gc_te1310_8deg_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1310_8deg_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.35 diff --git a/tests/test_components/test_pdk_settings_gc_te1550_.yml b/tests/test_components/test_pdk_settings_gc_te1550_.yml index 3e32ce8a..fb865ed4 100644 --- a/tests/test_components/test_pdk_settings_gc_te1550_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1550_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml b/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml index 80ab080a..af95c3ff 100644 --- a/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_gc_te1550_broadband_.yml b/tests/test_components/test_pdk_settings_gc_te1550_broadband_.yml index 1eee3bce..235a6f9f 100644 --- a/tests/test_components/test_pdk_settings_gc_te1550_broadband_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1550_broadband_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_gc_tm1550_.yml b/tests/test_components/test_pdk_settings_gc_tm1550_.yml index 2d7ebc3b..abc3ce91 100644 --- a/tests/test_components/test_pdk_settings_gc_tm1550_.yml +++ b/tests/test_components/test_pdk_settings_gc_tm1550_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_mmi1x2_.yml b/tests/test_components/test_pdk_settings_mmi1x2_.yml index b3e02b05..a8155b18 100644 --- a/tests/test_components/test_pdk_settings_mmi1x2_.yml +++ b/tests/test_components/test_pdk_settings_mmi1x2_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -55,6 +55,8 @@ settings: gap_mmi: 0.25 length_mmi: 5.5 length_taper: 10.0 + straight: + function: straight taper: function: taper width: null @@ -76,6 +78,8 @@ settings: gap_mmi: 0.25 length_mmi: 5.5 length_taper: 10.0 + straight: + function: straight taper: function: taper width: null diff --git a/tests/test_components/test_pdk_settings_mzi_.yml b/tests/test_components/test_pdk_settings_mzi_.yml index 88aa2867..daa9b632 100644 --- a/tests/test_components/test_pdk_settings_mzi_.yml +++ b/tests/test_components/test_pdk_settings_mzi_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_mzi_heater_.yml b/tests/test_components/test_pdk_settings_mzi_heater_.yml index 652c22db..2c90ec5b 100644 --- a/tests/test_components/test_pdk_settings_mzi_heater_.yml +++ b/tests/test_components/test_pdk_settings_mzi_heater_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -24,30 +24,102 @@ ports: port_type: optical shear_angle: null width: 0.5 - top_e1: + top_l_e1: center: - 12.395 - 24.75 layer: - 12 - 0 - name: top_e1 - orientation: 180 + name: top_l_e1 + orientation: 180.0 port_type: electrical shear_angle: null width: 10 - top_e2: + top_l_e2: + center: + - 17.395 + - 29.75 + layer: + - 12 + - 0 + name: top_l_e2 + orientation: 90.0 + port_type: electrical + shear_angle: null + width: 10 + top_l_e3: + center: + - 22.395 + - 24.75 + layer: + - 12 + - 0 + name: top_l_e3 + orientation: 0.0 + port_type: electrical + shear_angle: null + width: 10 + top_l_e4: + center: + - 17.395 + - 19.75 + layer: + - 12 + - 0 + name: top_l_e4 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 10 + top_r_e1: + center: + - 232.405 + - 24.75 + layer: + - 12 + - 0 + name: top_r_e1 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 10 + top_r_e2: + center: + - 237.405 + - 29.75 + layer: + - 12 + - 0 + name: top_r_e2 + orientation: 90.0 + port_type: electrical + shear_angle: null + width: 10 + top_r_e3: center: - 242.405 - 24.75 layer: - 12 - 0 - name: top_e2 + name: top_r_e3 orientation: 0.0 port_type: electrical shear_angle: null width: 10 + top_r_e4: + center: + - 237.405 + - 19.75 + layer: + - 12 + - 0 + name: top_r_e4 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 10 settings: changed: length_x: 200 diff --git a/tests/test_components/test_pdk_settings_ring_double_heater_.yml b/tests/test_components/test_pdk_settings_ring_double_heater_.yml index 252a98dd..d72dea04 100644 --- a/tests/test_components/test_pdk_settings_ring_double_heater_.yml +++ b/tests/test_components/test_pdk_settings_ring_double_heater_.yml @@ -1,26 +1,50 @@ name: ring_double_heater_171f554b ports: - e1: + l_e1: + center: + - -10.01 + - 0.0 + layer: + - 12 + - 0 + name: l_e1 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 10 + l_e2: center: - -5.01 - 5.0 layer: - 12 - 0 - name: e1 - orientation: 90 + name: l_e2 + orientation: 90.0 port_type: electrical shear_angle: null width: 10 - e2: + l_e3: center: - - 5.0 - - 5.0 + - -0.01 + - 0.0 layer: - 12 - 0 - name: e2 - orientation: 90 + name: l_e3 + orientation: 0.0 + port_type: electrical + shear_angle: null + width: 10 + l_e4: + center: + - -5.01 + - -5.0 + layer: + - 12 + - 0 + name: l_e4 + orientation: 270.0 port_type: electrical shear_angle: null width: 10 @@ -32,38 +56,38 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 o2: center: - - -13.01 - - 21.41 + - 13.0 + - 0.0 layer: - 1 - 0 name: o2 - orientation: 180 + orientation: 0.0 port_type: optical shear_angle: null width: 0.5 o3: center: - - 13.0 + - -13.01 - 21.41 layer: - 1 - 0 name: o3 - orientation: 0.0 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 o4: center: - 13.0 - - 0.0 + - 21.41 layer: - 1 - 0 @@ -72,6 +96,54 @@ ports: port_type: optical shear_angle: null width: 0.5 + r_e1: + center: + - 0.0 + - 0.0 + layer: + - 12 + - 0 + name: r_e1 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 10 + r_e2: + center: + - 5.0 + - 5.0 + layer: + - 12 + - 0 + name: r_e2 + orientation: 90.0 + port_type: electrical + shear_angle: null + width: 10 + r_e3: + center: + - 10.0 + - 0.0 + layer: + - 12 + - 0 + name: r_e3 + orientation: 0.0 + port_type: electrical + shear_angle: null + width: 10 + r_e4: + center: + - 5.0 + - -5.0 + layer: + - 12 + - 0 + name: r_e4 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 10 settings: changed: via_stack: @@ -94,13 +166,14 @@ settings: function: bend_euler coupler_ring: function: coupler_ring + coupler_ring_top: null cross_section: strip cross_section_heater: heater_metal cross_section_waveguide_heater: strip_heater_metal gap: 0.2 length_x: 0.01 length_y: 0.01 - port_orientation: 90 + port_orientation: null radius: 10.0 straight: function: straight @@ -131,13 +204,14 @@ settings: function: bend_euler coupler_ring: function: coupler_ring + coupler_ring_top: null cross_section: strip cross_section_heater: heater_metal cross_section_waveguide_heater: strip_heater_metal gap: 0.2 length_x: 0.01 length_y: 0.01 - port_orientation: 90 + port_orientation: null radius: 10.0 straight: function: straight diff --git a/tests/test_components/test_pdk_settings_ring_single_.yml b/tests/test_components/test_pdk_settings_ring_single_.yml index 331c9f7f..d74a67bd 100644 --- a/tests/test_components/test_pdk_settings_ring_single_.yml +++ b/tests/test_components/test_pdk_settings_ring_single_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ring_single_heater_.yml b/tests/test_components/test_pdk_settings_ring_single_heater_.yml index b9c1e7c9..25465f3f 100644 --- a/tests/test_components/test_pdk_settings_ring_single_heater_.yml +++ b/tests/test_components/test_pdk_settings_ring_single_heater_.yml @@ -1,26 +1,50 @@ name: ring_single_heater_171f554b ports: - e1: + l_e1: + center: + - -14.0 + - 0.0 + layer: + - 12 + - 0 + name: l_e1 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 10 + l_e2: center: - -9.0 - 5.0 layer: - 12 - 0 - name: e1 - orientation: 90 + name: l_e2 + orientation: 90.0 port_type: electrical shear_angle: null width: 10 - e2: + l_e3: center: - - 5.0 - - 5.0 + - -4.0 + - 0.0 + layer: + - 12 + - 0 + name: l_e3 + orientation: 0.0 + port_type: electrical + shear_angle: null + width: 10 + l_e4: + center: + - -9.0 + - -5.0 layer: - 12 - 0 - name: e2 - orientation: 90 + name: l_e4 + orientation: 270.0 port_type: electrical shear_angle: null width: 10 @@ -32,7 +56,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 @@ -48,6 +72,54 @@ ports: port_type: optical shear_angle: null width: 0.5 + r_e1: + center: + - 0.0 + - 0.0 + layer: + - 12 + - 0 + name: r_e1 + orientation: 180.0 + port_type: electrical + shear_angle: null + width: 10 + r_e2: + center: + - 5.0 + - 5.0 + layer: + - 12 + - 0 + name: r_e2 + orientation: 90.0 + port_type: electrical + shear_angle: null + width: 10 + r_e3: + center: + - 10.0 + - 0.0 + layer: + - 12 + - 0 + name: r_e3 + orientation: 0.0 + port_type: electrical + shear_angle: null + width: 10 + r_e4: + center: + - 5.0 + - -5.0 + layer: + - 12 + - 0 + name: r_e4 + orientation: 270.0 + port_type: electrical + shear_angle: null + width: 10 settings: changed: via_stack: @@ -75,7 +147,7 @@ settings: gap: 0.2 length_x: 4.0 length_y: 0.6 - port_orientation: 90 + port_orientation: null radius: 10.0 via_stack: function: via_stack @@ -109,7 +181,7 @@ settings: gap: 0.2 length_x: 4.0 length_y: 0.6 - port_orientation: 90 + port_orientation: null radius: 10.0 via_stack: function: via_stack diff --git a/tests/test_components/test_pdk_settings_ring_with_crossing_.yml b/tests/test_components/test_pdk_settings_ring_with_crossing_.yml index 34f7fe3b..5fc58117 100644 --- a/tests/test_components/test_pdk_settings_ring_with_crossing_.yml +++ b/tests/test_components/test_pdk_settings_ring_with_crossing_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_spiral_.yml b/tests/test_components/test_pdk_settings_spiral_.yml index c054a327..5b25b27f 100644 --- a/tests/test_components/test_pdk_settings_spiral_.yml +++ b/tests/test_components/test_pdk_settings_spiral_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 270 + orientation: 270.0 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 270 + orientation: 270.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_straight_.yml b/tests/test_components/test_pdk_settings_straight_.yml index 6f1909f6..1acbea1e 100644 --- a/tests/test_components/test_pdk_settings_straight_.yml +++ b/tests/test_components/test_pdk_settings_straight_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_straight_one_pin_.yml b/tests/test_components/test_pdk_settings_straight_one_pin_.yml index bee2bf90..3a757b80 100644 --- a/tests/test_components/test_pdk_settings_straight_one_pin_.yml +++ b/tests/test_components/test_pdk_settings_straight_one_pin_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_terminator_short_.yml b/tests/test_components/test_pdk_settings_terminator_short_.yml index fda2951f..f8175df8 100644 --- a/tests/test_components/test_pdk_settings_terminator_short_.yml +++ b/tests/test_components/test_pdk_settings_terminator_short_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180 + orientation: 180.0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml b/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml index 828506da..98846dea 100644 --- a/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml +++ b/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml @@ -8,7 +8,7 @@ ports: - 12 - 0 name: e1 - orientation: 180 + orientation: 180.0 port_type: electrical shear_angle: null width: 10 @@ -20,7 +20,7 @@ ports: - 12 - 0 name: e2 - orientation: 90 + orientation: 90.0 port_type: electrical shear_angle: null width: 10 @@ -44,7 +44,7 @@ ports: - 12 - 0 name: e4 - orientation: 270 + orientation: 270.0 port_type: electrical shear_angle: null width: 10 diff --git a/ubcpdk/samples/ubc_joaquin_matres1.py b/ubcpdk/samples/ubc_joaquin_matres1.py index c195d618..c495081b 100644 --- a/ubcpdk/samples/ubc_joaquin_matres1.py +++ b/ubcpdk/samples/ubc_joaquin_matres1.py @@ -177,9 +177,9 @@ def test_mask7(): if __name__ == "__main__": # gf.clear_cache() # m, tm = test_mask1() # dbr and mzi - m, tm = test_mask2() # spirals + # m, tm = test_mask2() # spirals # m, tm = test_mask3() # coupler and crossing - # m, tm = test_mask4() # heated mzis + m, tm = test_mask4() # heated mzis # m, tm = test_mask5() # heated rings # m, tm = test_mask6() # 1x2 mmis # m, tm = test_mask7() # 2x2mmis From 9232d4b6902198e7711709de48204066c465eccc Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sat, 5 Aug 2023 19:55:40 -0700 Subject: [PATCH 2/8] update to gdsfactory7 --- CHANGELOG.md | 5 + docs/notebooks | 1 + pyproject.toml | 22 +- ...ngth3_d34ef86b690da3f9c50cb80b5cf3ff11.npz | Bin 0 -> 4651 bytes ...ngth3_d34ef86b690da3f9c50cb80b5cf3ff11.yml | 368 ++++++++++++++ test.schem.yml | 12 + tests/ref/dbg.gds | Bin 1270 -> 1270 bytes .../test_pdk_settings_add_fiber_array_.yml | 268 ++++++++++ .../test_pdk_settings_bend_.yml | 6 + .../test_pdk_settings_bend_euler_.yml | 6 + ...t_pdk_settings_ebeam_adiabatic_te1550_.yml | 8 +- .../test_pdk_settings_ebeam_bdc_te1550_.yml | 8 +- .../test_pdk_settings_ebeam_crossing4_.yml | 8 +- .../test_pdk_settings_ebeam_y_1550_.yml | 6 +- .../test_pdk_settings_ring_double_heater_.yml | 2 +- .../test_pdk_settings_straight_.yml | 89 ++++ ubcpdk/circuits/grating.pic.yml | 42 -- ubcpdk/circuits/mask.pic.yml | 46 -- ubcpdk/circuits/mzi_lattice_filter.pic.yml | 52 -- ubcpdk/circuits/mzi_ubcpdk.pic.yml | 40 -- ubcpdk/circuits/pads.pic.yml | 41 -- .../samples}/notebooks/00_layout.py | 0 .../samples}/notebooks/11_sparameters.py | 55 +- .../notebooks/11_sparameters_gratings.py | 21 +- .../notebooks/12_sim_plugins_tidy3d.py | 22 +- .../samples}/notebooks/13_sim_plugins.py | 10 +- .../samples}/notebooks/14_sax_tidy3d.py | 127 +++-- .../notebooks/21_schematic_driven_layout.py | 4 +- .../notebooks/31_data_analysis_mzi.py | 28 +- .../notebooks/32_data_analysis_ring.py | 0 .../notebooks/33_data_analysis_dbr.py | 0 {docs => ubcpdk/samples}/notebooks/Makefile | 0 .../samples}/notebooks/sdl_demo.pic.yml | 0 .../samples}/notebooks/test.schem.yml | 0 .../samples/report/EBeam_JoaquinMatres.ipynb | 472 ------------------ ubcpdk/samples/report/Makefile | 25 - ubcpdk/samples/report/ieee.csl | 387 -------------- ubcpdk/samples/report/requirements.txt | 2 - ubcpdk/samples/report/splitter_length.py | 43 -- ubcpdk/simulation/circuits_simphony.py | 68 --- ubcpdk/simulation/modes_waveguide.py | 2 +- 41 files changed, 933 insertions(+), 1363 deletions(-) create mode 120000 docs/notebooks create mode 100644 sparameters/straight_length3_d34ef86b690da3f9c50cb80b5cf3ff11.npz create mode 100644 sparameters/straight_length3_d34ef86b690da3f9c50cb80b5cf3ff11.yml create mode 100644 test.schem.yml delete mode 100644 ubcpdk/circuits/grating.pic.yml delete mode 100644 ubcpdk/circuits/mask.pic.yml delete mode 100644 ubcpdk/circuits/mzi_lattice_filter.pic.yml delete mode 100644 ubcpdk/circuits/mzi_ubcpdk.pic.yml delete mode 100644 ubcpdk/circuits/pads.pic.yml rename {docs => ubcpdk/samples}/notebooks/00_layout.py (100%) rename {docs => ubcpdk/samples}/notebooks/11_sparameters.py (80%) rename {docs => ubcpdk/samples}/notebooks/11_sparameters_gratings.py (83%) rename {docs => ubcpdk/samples}/notebooks/12_sim_plugins_tidy3d.py (87%) rename {docs => ubcpdk/samples}/notebooks/13_sim_plugins.py (95%) rename {docs => ubcpdk/samples}/notebooks/14_sax_tidy3d.py (92%) rename {docs => ubcpdk/samples}/notebooks/21_schematic_driven_layout.py (98%) rename {docs => ubcpdk/samples}/notebooks/31_data_analysis_mzi.py (93%) rename {docs => ubcpdk/samples}/notebooks/32_data_analysis_ring.py (100%) rename {docs => ubcpdk/samples}/notebooks/33_data_analysis_dbr.py (100%) rename {docs => ubcpdk/samples}/notebooks/Makefile (100%) rename {docs => ubcpdk/samples}/notebooks/sdl_demo.pic.yml (100%) rename {docs => ubcpdk/samples}/notebooks/test.schem.yml (100%) delete mode 100644 ubcpdk/samples/report/EBeam_JoaquinMatres.ipynb delete mode 100644 ubcpdk/samples/report/Makefile delete mode 100644 ubcpdk/samples/report/ieee.csl delete mode 100644 ubcpdk/samples/report/requirements.txt delete mode 100644 ubcpdk/samples/report/splitter_length.py delete mode 100644 ubcpdk/simulation/circuits_simphony.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e113b96..e475360b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [2.0.0](https://github.com/gdsfactory/ubc/pull/204) + +- update to gdsfactory 7 + + ## [1.21.0](https://github.com/gdsfactory/ubc/pull/203) - use jupyterbook for docs diff --git a/docs/notebooks b/docs/notebooks new file mode 120000 index 00000000..f1ec2756 --- /dev/null +++ b/docs/notebooks @@ -0,0 +1 @@ +../ubcpdk/samples/notebooks \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 91f30f8f..60daef38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,9 +8,6 @@ name="ubcpdk" description="ubcpdk pdk" classifiers = [ "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Operating System :: OS Independent", @@ -22,23 +19,20 @@ authors = [ keywords = ["python"] license = {file = "LICENSE"} dependencies = [ - "gdsfactory==6.115.0", - "modes", + "gdsfactory==7.0.2", + "gplugins[tidy3d]>=0.0.3,<0.1.0", ] readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.10" [project.optional-dependencies] full = [ - "gdsfactory[full]==6.115.0", - "modes", + "femwell" ] - dev = [ "pytest", "pytest-cov", "pytest_regressions", - "femwell" ] docs = [ "autodoc_pydantic", @@ -70,12 +64,12 @@ exclude = ''' # Specify the files/dirs that should be ignored by the black form ''' [tool.pytest.ini_options] -# testpaths = ["tests"] -testpaths = ["ubcpdk/samples", "tests"] +testpaths = ["tests"] +# testpaths = ["ubcpdk/samples", "tests"] # addopts = --tb=no # addopts = '--tb=short' -python_files = ["ubcpdk/samples*.py", "tests/*.py"] -# python_files = ["tests/*.py"] +# python_files = ["ubcpdk/samples*.py", "tests/*.py"] +python_files = ["tests/*.py"] # norecursedirs = ["extra/*.py", 'ubcdpk/simulations/*.py'] [tool.flake8] diff --git a/sparameters/straight_length3_d34ef86b690da3f9c50cb80b5cf3ff11.npz b/sparameters/straight_length3_d34ef86b690da3f9c50cb80b5cf3ff11.npz new file mode 100644 index 0000000000000000000000000000000000000000..dbf73d5e3e04daa8b73bc86ecf25cebb6bec0dbe GIT binary patch literal 4651 zcmeI0XHZjHyT_4Uqy;4c2T?#kS`ZMVMk696R0{$U42E8U1rPxPNUzdCdVo+wK&o^k z2$6%dfOM56Euk9-p}cU;apvfG@7(+GemHB-UTgNA^`A9s*7KYHdLBbv8d@nTDk{dq z_biqE$1A1>e>GOB6I93xmt`c6I%yYI&tp^^R9Q5K^A6jSzsB^?1C;>=s*aU$^6iP` zw`KKZx(m1(Z>4fGN6+>(sNIJfi<2|LaRDWsXn2ZhCP<_6d3bH&LJFv-0<=)xLrEMN zb|@+MhO4fSNvR5E3br|Dg*7+AN;@0h#Pl(YNS<6OmN!lDk=Na+)2Q1hKxPfx5Y$sj zNr=nCXsoQz{5bhX$DmxVm7I$;2IYcLh>DU_~VXzpX}ubcZA7c*f4e%xj&F%tN=4Ny~H?lj0n6WBY)- z09;!TXlC^r8ali#uxOYRDH{<+foRaG*b$RKA@wbZz`#5Y zP4V43jJ1={m8R?23vv9~?4XKO;azp1UgLtyxuVV_Q<(t$*HFuR!-@`v4TFy1Ge}c! zwVT@Sa?oF@HaYpyf&`cafQF14i)>At@Sx<}bQG_FVXtQ6sP$)OdeSyxvhyr+qz^ka zThK$9h3#7b!D;?A4*1I&0t{wJy!J06{3rF6`8oi#Z|^(sG!P-#k48@IjS2#(_wv^x zshQRJW1g$IeG94Q&MmMI$u@nEKlqR(cQ#_|iK-B%o;-L^+B~cGyZ-QArZz%_pY&j% zvW-Vkx|E;-SU3hWck!{Kvq0kQ)`7y34Z$6)TjuxConJgrLQK_770ttrtUA<>(xT(z z=FL?1Q+QBPHa>cIx;ZV?(`%#=xn}N{HG?H}j{$?v7=&MQExp*36o+5kElN_`$yo-T zo@(xKeSKW?tYo>nx5xI$v_uS4yC&`uhbTTddX-bTu==9Y*$auQLa3d1D)gLxsErDs zSuJ$&Lps+PEq4Q-K;5Zw)b-VBRlWiY*IjuzTJebKj6s{~kf)`&q>>ma$N5=1!$PSv zae0juh?t6Q?5ryf#=4(!ma_rP3r zucZyteaAU}XAhMS&04nlQteTWrN@%F)ahu~?^DY`9EfErzoP^dtO32|>7$U*vFX)& zp~Ik%Od@GCY}K(6kPBSjuey#%(y&h7oT94XWL6%B7**4- zcLs~O3kf;V`mvrc(l`@buK0wp^?do2n97BF1oGq(6SLTFea*c~HCs!2)34;0!+YG9 z^J@9se!suAEm-oRD)hr>mk*LgBI1J%kg=H?!>`ZD=(&3k*x^`BekA>y&pgl9rYR6Y zw4j=>`tVB3g->$7ZE!Hi6@aT2^l#GLgyqFn$xI+DwHg*%?t=vM+V(rP{X{$y?aS`3 zeU}(yhg@Gn4{xo5!wGjpw`F815y!*&?2W3USy!IY`T*@O-qY2YXj7dCdnspb`+SHG zKG$i>22IJX>DhqLia7D1a;l-ukYZG!Lg{!!E&XjWQ!Qte1uN#h9(ScCE~#%T>Uo^J zkCKV~wdk2ww^USF-)fGX{$^J;`N35G#^XIPX6ik_v@XF;R|loQlhd)7nEk>dmVeva zBWG1Rfo(LPc;}v_=#>2u{it-**O@atUNebYbUk^I=tcOw?gu!P?m*aghN`h<0e?bH z71xwHFwvwTL@hqAo!t2upTT)Tp|RAw9y5Phk`KL%3ll3FdHo>0%LQ>>+QN1m!y$sR zsJp;_sdotG-mmFbmGP!ut(j@cIt7?NC&qY!zmQ}B&L$4yPme%`Eax`zm8~SSjD*4R zJsOh{!QX&F^(nNUhm1d^o-jU{w!EIk)(?_Ypw|_1bzHQOQk%%FAx6)2e8IRfMNJDv zQ)Y0`oFM#cD^kSAwynpZmAh>QikgDB>7XF+Sq{#8=F*0nN>>I$=-sTbx#^U=sbhGi zZcQ^oqkTrEdzGS%UG7Xp+F8oHP2?$wUVsAk2u4>}E_PdKaVJy*3r&gsRWHC{( zK3BkWjiFb4MfLqiZ{&mL2LybBD>3ZL!OA=EHrnxVui2{U)K{Vbbk2(-rL3T zxqs&*@?y+bM*d1*YNS|FhU|NyLfl3_@^;gxQWOq382%_uvQ4@`xu&Ac*P;)`l@BP+ zg+9f~?2u293Sa`8qfSBx)c*^;f0*te!oQmCzx4h~@4xi^Kcm+`ghlY5-uqwZ_4whv zp$9kO=%|7fn-oWe4V!53tSPJr`hXJajq$pG%e0yfA3a;x5;XxhJGerc-Q#gelL|NE zscV8V1yL4^X*6|P)Ak{r?McON(lOiTrUCsy4_!_n4j?_qo{a%p;%H2cjqLFV?37@7 zQ`y}HQ?W##i0*qp_I7&zde}oEg`78gt?odxh~x{~Dqh-h{QYr{s>_X7VVIyi^MPWq z*Cz^F{lsy0FAHP*tZ1d28h*nzn8y=eTj|(+wOMA!Y!ChZ_#jLLJM+CCIfp|RMcQl@ z!?n#O!Z#6-aSfCbp3JJ@q1#HC{j2SfE91_Z6=LyU5R_oHVx&ce_s0kj@p^5h_gjr% zJ&W;tZTXyo8Xfwpbx=#T)r;y83Rf#Cg!dN-vKH=k_v)l^5mWkkS(j4%-bCB1&qkjw z?it0LU$AO1#dy>sjqZfZU-EHI@e|K>D?>#`Pa!D4lUBl_Ou~ap2J}#JCEl)|PL81USH2yo!m&+h29Y ztggj?n)rIceSAQ4C3Vsdzg2@i8)~?5V{QyTQ&XUHSb=fZo4yR3$uq1tm$%k>0~{bs zc)J*q=Q@Pj5j@BRi)0ipyjT@Od^_Gm$Uoi^B1KGUKL^-=8nsW8sU*295?4(DixSwj zR9osdbK{DBYSI98*&Wq`=`)*=S`jae0L@>F))WgeuwUQEkBuG!xEnYpsix3ndt~BD z(*wFL<|l{3{3=bLCy%p)4(3R$_)VH~cdyevF(1+`X2~{0 zNCi1HU;WxrnCwq)b?(kY2aEnb)E692)Zs2^T_#N<=`uvK9QMsGjMXrwDwe76J!Oh` zd0I;W6Eyj(Xc~i#yzF|>{MIZZ*6^dhTVUYjoxIox=WCO1U(3h{q%h)=F`HQolfAMo z)n1*9U9`Niw}Kc0=Gw>5RkX6w`m0aXIJNXHSrpyo>%2Z)7|>RjJC~Zwi=kJ3smxr( zJVPT*FS89t!3qeElP63UU~jP&>8Dmhov9j;i>I z<95ptAW6J@?K>arL#|}4SW($4^Dr;`ge2}^VUK&#FbnU%gv>M=o^9;24Qv$jAYOo^ zXSx5rxSI?Yz`=N1U^`eCY_aOmLn1rHLpk&t#T+%fQq^2?Zek1DB#JXB@g8NT%nxAw zljioyhKkA%gO>Z)ecPcOfy)S#l{C%|Ovry;thS0(XU!$Fv3tci5<8w*Y{PqY*H^mB zQo#h!o;0j}VUnE^=v~Ua+PDL^%u1Fyw}fZ+3TYJ}c`vIE>U4pLE1IV}Urq1ZH;XXL zOlFb>zb`>PBA$(U=^GzIXOaNAwj&LAvi*T~y{})=f&s-je>6U6WWN&GNVy*Iftc@u z3l_ZByIW~OZ@!D)kF(po-nX4eVz^kMeja*Y4}Qmc!WT?@_s(Pu4+G9j1Z9#?m%Ep? z?NPjl@wQA-g^hoUfftpb?lEd9nxCs3M}>@|q6X`qhx|wH`^Sm@RQvcU;hDS8JJT5 literal 0 HcmV?d00001 diff --git a/sparameters/straight_length3_d34ef86b690da3f9c50cb80b5cf3ff11.yml b/sparameters/straight_length3_d34ef86b690da3f9c50cb80b5cf3ff11.yml new file mode 100644 index 00000000..56d99879 --- /dev/null +++ b/sparameters/straight_length3_d34ef86b690da3f9c50cb80b5cf3ff11.yml @@ -0,0 +1,368 @@ +component: + name: straight_length3 + ports: + o1: + center: + - 0.0 + - 0.0 + layer: + - 1 + - 0 + name: o1 + orientation: 180.0 + port_type: optical + shear_angle: null + width: 0.5 + o2: + center: + - 3.0 + - 0.0 + layer: + - 1 + - 0 + name: o2 + orientation: 0.0 + port_type: optical + shear_angle: null + width: 0.5 + settings: + changed: + length: 3 + child: null + default: + cross_section: strip + length: 10.0 + npoints: 2 + with_bbox: true + full: + cross_section: strip + length: 3 + npoints: 2 + with_bbox: true + function_name: straight + info: + cross_section: strip + function_name: cross_section + length: 3.0 + route_info: + length: 3.0 + type: + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: [] + bbox_offsets: [] + cladding_layers: + - DEVREC + cladding_offsets: + - 0.0 + cladding_simplify: null + end_straight_length: 0.01 + gap: 3.0 + info: + function_name: cross_section + settings: + add_bbox: null + add_pins: + function: add_pins_siepic + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: null + bbox_offsets: null + cladding_layers: + - DEVREC + cladding_offsets: + - 0 + cladding_simplify: null + decorator: null + end_straight_length: 0.01 + gap: 3.0 + info: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0.0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: [] + simplify: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + weight: 3.0 + ? '{''layer'': ''WG'', ''width'': 0.5, ''offset'': 0.0, ''radius'': 10.0, + ''width_wide'': None, ''simplify'': None, ''auto_widen'': False, ''auto_widen_minimum_length'': + 200.0, ''taper_length'': 10.0, ''bbox_layers'': [], ''bbox_offsets'': [], + ''cladding_layers'': [''DEVREC''], ''cladding_offsets'': [0.0], ''cladding_simplify'': + None, ''sections'': [], ''port_names'': [''o1'', ''o2''], ''port_types'': + [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': 0.01, ''start_straight_length'': + 0.01, ''end_straight_length'': 0.01, ''snap_to_grid'': None, ''info'': {''settings'': + {''width'': 0.5, ''offset'': 0, ''layer'': ''WG'', ''width_wide'': None, + ''auto_widen'': False, ''auto_widen_minimum_length'': 200.0, ''taper_length'': + 10.0, ''radius'': 10.0, ''sections'': None, ''port_names'': [''o1'', ''o2''], + ''port_types'': [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': + 0.01, ''start_straight_length'': 0.01, ''end_straight_length'': 0.01, ''snap_to_grid'': + None, ''bbox_layers'': None, ''bbox_offsets'': None, ''cladding_layers'': + [''DEVREC''], ''cladding_offsets'': [0], ''cladding_simplify'': None, ''info'': + None, ''decorator'': None, ''add_pins'': {''function'': ''add_pins_siepic''}, + ''add_bbox'': None, ''mirror'': False, ''name'': None}, ''function_name'': + ''cross_section''}, ''name'': None, ''mirror'': False}_length' + : 3.0 + settings: + add_bbox: null + add_pins: + function: add_pins_siepic + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: null + bbox_offsets: null + cladding_layers: + - DEVREC + cladding_offsets: + - 0 + cladding_simplify: null + decorator: null + end_straight_length: 0.01 + gap: 3.0 + info: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + width: 0.5 + info_version: 2 + module: gdsfactory.components.straight + name: straight_length3 +compute_time_minutes: 0.1275598446528117 +compute_time_seconds: 7.653590679168701 +dispersive: false +is_3d: false +layer_stack: + box: + background_doping_concentration: null + background_doping_ion: null + bias: null + derived_layer: null + info: + mesh_order: 99 + into: null + layer: !!python/tuple + - 99999 + - 0 + layer_type: grow + material: sio2 + mesh_order: 3 + mode: null + orientation: '100' + resistivity: null + sidewall_angle: 0.0 + sidewall_angle_tolerance: null + thickness: 3.0 + thickness_tolerance: null + width_to_z: 0.0 + z_to_bias: null + zmin: -3.0 + zmin_tolerance: null + clad: + background_doping_concentration: null + background_doping_ion: null + bias: null + derived_layer: null + info: + mesh_order: 100 + into: null + layer: !!python/tuple + - 99999 + - 0 + layer_type: grow + material: sio2 + mesh_order: 3 + mode: null + orientation: '100' + resistivity: null + sidewall_angle: 0.0 + sidewall_angle_tolerance: null + thickness: 1.8000000000000003 + thickness_tolerance: null + width_to_z: 0.0 + z_to_bias: null + zmin: 0.0 + zmin_tolerance: null + core: + background_doping_concentration: null + background_doping_ion: null + bias: null + derived_layer: null + info: + mesh_order: 1 + into: null + layer: !!python/tuple + - 1 + - 0 + layer_type: grow + material: si + mesh_order: 3 + mode: null + orientation: '100' + resistivity: null + sidewall_angle: 10.0 + sidewall_angle_tolerance: null + thickness: 0.22 + thickness_tolerance: null + width_to_z: 0.5 + z_to_bias: null + zmin: 0.0 + zmin_tolerance: null + core2: + background_doping_concentration: null + background_doping_ion: null + bias: null + derived_layer: null + info: + mesh_order: 1 + into: null + layer: !!python/tuple + - 31 + - 0 + layer_type: grow + material: si + mesh_order: 3 + mode: null + orientation: '100' + resistivity: null + sidewall_angle: 10.0 + sidewall_angle_tolerance: null + thickness: 0.22 + thickness_tolerance: null + width_to_z: 0.5 + z_to_bias: null + zmin: 0.0 + zmin_tolerance: null + heater: + background_doping_concentration: null + background_doping_ion: null + bias: null + derived_layer: null + info: + mesh_order: 1 + into: null + layer: !!python/tuple + - 11 + - 0 + layer_type: grow + material: TiN + mesh_order: 3 + mode: null + orientation: '100' + resistivity: null + sidewall_angle: 0.0 + sidewall_angle_tolerance: null + thickness: 0.75 + thickness_tolerance: null + width_to_z: 0.0 + z_to_bias: null + zmin: 1.1 + zmin_tolerance: null + metal2: + background_doping_concentration: null + background_doping_ion: null + bias: null + derived_layer: null + info: + mesh_order: 2 + into: null + layer: !!python/tuple + - 12 + - 0 + layer_type: grow + material: Aluminum + mesh_order: 3 + mode: null + orientation: '100' + resistivity: null + sidewall_angle: 0.0 + sidewall_angle_tolerance: null + thickness: 0.7000000000000001 + thickness_tolerance: null + width_to_z: 0.0 + z_to_bias: null + zmin: 1.8000000000000003 + zmin_tolerance: null + substrate: + background_doping_concentration: null + background_doping_ion: null + bias: null + derived_layer: null + info: + mesh_order: 99 + into: null + layer: !!python/tuple + - 99999 + - 0 + layer_type: grow + material: si + mesh_order: 3 + mode: null + orientation: '100' + resistivity: null + sidewall_angle: 0.0 + sidewall_angle_tolerance: null + thickness: 10.0 + thickness_tolerance: null + width_to_z: 0.0 + z_to_bias: null + zmin: -13.0 + zmin_tolerance: null +port_margin: 2 +port_monitor_offset: -0.1 +port_source_offset: -0.1 +port_symmetries: + o2@0,o1@0: + - o1@0,o2@0 +resolution: 30 +wavelength_points: 50 +wavelength_start: 1.5 +wavelength_stop: 1.6 +xmargin_left: 0 +xmargin_right: 0 +ymargin_bot: 3 +ymargin_top: 3 diff --git a/test.schem.yml b/test.schem.yml new file mode 100644 index 00000000..6db43a95 --- /dev/null +++ b/test.schem.yml @@ -0,0 +1,12 @@ +instances: + s1: + component: straight + settings: {length: 20} + s2: + component: straight + settings: {length: 40} +schematic_placements: + s1: {x: null, y: null, port: null, rotation: 0, dx: null, dy: null, mirror: null} + s2: {x: null, y: null, port: null, rotation: 0, dx: null, dy: null, mirror: null} +nets: [] +ports: {} diff --git a/tests/ref/dbg.gds b/tests/ref/dbg.gds index b60200faecb5404551f0f07018cabb7758138b87..991818e0c3c81dbfdb556a25cb2f5f618ca4a274 100644 GIT binary patch delta 84 zcmeyy`HgeKIz|o?6Z51LGlRs*b&Lia21y3y=1EEBlix8KZeGm9%*YOvp6tjZy7>^Z cA>-tqOfr+@nWPa)*RhCAj$qPfW?^9f08Qr?s{jB1 delta 77 zcmeyy`HgeKIz|r56!VmnG-J!jb&Lia#^#0=X@=&Blix8KPVQ!rMhL89ah?2=S!T05 R6Ei~3W-Vq{MrIZk1^~Ev70v(v diff --git a/tests/test_components/test_pdk_settings_add_fiber_array_.yml b/tests/test_components/test_pdk_settings_add_fiber_array_.yml index 0a5ad43a..c4d7994b 100644 --- a/tests/test_components/test_pdk_settings_add_fiber_array_.yml +++ b/tests/test_components/test_pdk_settings_add_fiber_array_.yml @@ -62,6 +62,96 @@ settings: cross_section: strip function_name: cross_section length: 10.0 + route_info: + length: 10.0 + type: + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: [] + bbox_offsets: [] + cladding_layers: + - DEVREC + cladding_offsets: + - 0.0 + cladding_simplify: null + end_straight_length: 0.01 + gap: 3.0 + info: + function_name: cross_section + settings: + add_bbox: null + add_pins: + function: add_pins_siepic + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: null + bbox_offsets: null + cladding_layers: + - DEVREC + cladding_offsets: + - 0 + cladding_simplify: null + decorator: null + end_straight_length: 0.01 + gap: 3.0 + info: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0.0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: [] + simplify: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + weight: 10.0 + ? '{''layer'': ''WG'', ''width'': 0.5, ''offset'': 0.0, ''radius'': 10.0, + ''width_wide'': None, ''simplify'': None, ''auto_widen'': False, ''auto_widen_minimum_length'': + 200.0, ''taper_length'': 10.0, ''bbox_layers'': [], ''bbox_offsets'': + [], ''cladding_layers'': [''DEVREC''], ''cladding_offsets'': [0.0], ''cladding_simplify'': + None, ''sections'': [], ''port_names'': [''o1'', ''o2''], ''port_types'': + [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': 0.01, ''start_straight_length'': + 0.01, ''end_straight_length'': 0.01, ''snap_to_grid'': None, ''info'': + {''settings'': {''width'': 0.5, ''offset'': 0, ''layer'': ''WG'', ''width_wide'': + None, ''auto_widen'': False, ''auto_widen_minimum_length'': 200.0, ''taper_length'': + 10.0, ''radius'': 10.0, ''sections'': None, ''port_names'': [''o1'', ''o2''], + ''port_types'': [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': + 0.01, ''start_straight_length'': 0.01, ''end_straight_length'': 0.01, + ''snap_to_grid'': None, ''bbox_layers'': None, ''bbox_offsets'': None, + ''cladding_layers'': [''DEVREC''], ''cladding_offsets'': [0], ''cladding_simplify'': + None, ''info'': None, ''decorator'': None, ''add_pins'': {''function'': + ''add_pins_siepic''}, ''add_bbox'': None, ''mirror'': False, ''name'': + None}, ''function_name'': ''cross_section''}, ''name'': None, ''mirror'': + False}_length' + : 10.0 settings: add_bbox: null add_pins: @@ -158,6 +248,95 @@ settings: polarization: te wavelength: 1.55 length: 10.0 + route_info: + length: 10.0 + type: + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: [] + bbox_offsets: [] + cladding_layers: + - DEVREC + cladding_offsets: + - 0.0 + cladding_simplify: null + end_straight_length: 0.01 + gap: 3.0 + info: + function_name: cross_section + settings: + add_bbox: null + add_pins: + function: add_pins_siepic + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: null + bbox_offsets: null + cladding_layers: + - DEVREC + cladding_offsets: + - 0 + cladding_simplify: null + decorator: null + end_straight_length: 0.01 + gap: 3.0 + info: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0.0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: [] + simplify: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + weight: 10.0 + ? '{''layer'': ''WG'', ''width'': 0.5, ''offset'': 0.0, ''radius'': 10.0, + ''width_wide'': None, ''simplify'': None, ''auto_widen'': False, ''auto_widen_minimum_length'': + 200.0, ''taper_length'': 10.0, ''bbox_layers'': [], ''bbox_offsets'': [], + ''cladding_layers'': [''DEVREC''], ''cladding_offsets'': [0.0], ''cladding_simplify'': + None, ''sections'': [], ''port_names'': [''o1'', ''o2''], ''port_types'': + [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': 0.01, ''start_straight_length'': + 0.01, ''end_straight_length'': 0.01, ''snap_to_grid'': None, ''info'': {''settings'': + {''width'': 0.5, ''offset'': 0, ''layer'': ''WG'', ''width_wide'': None, + ''auto_widen'': False, ''auto_widen_minimum_length'': 200.0, ''taper_length'': + 10.0, ''radius'': 10.0, ''sections'': None, ''port_names'': [''o1'', ''o2''], + ''port_types'': [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': + 0.01, ''start_straight_length'': 0.01, ''end_straight_length'': 0.01, ''snap_to_grid'': + None, ''bbox_layers'': None, ''bbox_offsets'': None, ''cladding_layers'': + [''DEVREC''], ''cladding_offsets'': [0], ''cladding_simplify'': None, ''info'': + None, ''decorator'': None, ''add_pins'': {''function'': ''add_pins_siepic''}, + ''add_bbox'': None, ''mirror'': False, ''name'': None}, ''function_name'': + ''cross_section''}, ''name'': None, ''mirror'': False}_length' + : 10.0 settings: add_bbox: null add_pins: @@ -243,6 +422,95 @@ settings: polarization: te wavelength: 1.55 length: 10.0 + route_info: + length: 10.0 + type: + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: [] + bbox_offsets: [] + cladding_layers: + - DEVREC + cladding_offsets: + - 0.0 + cladding_simplify: null + end_straight_length: 0.01 + gap: 3.0 + info: + function_name: cross_section + settings: + add_bbox: null + add_pins: + function: add_pins_siepic + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: null + bbox_offsets: null + cladding_layers: + - DEVREC + cladding_offsets: + - 0 + cladding_simplify: null + decorator: null + end_straight_length: 0.01 + gap: 3.0 + info: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0.0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: [] + simplify: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + weight: 10.0 + ? '{''layer'': ''WG'', ''width'': 0.5, ''offset'': 0.0, ''radius'': 10.0, ''width_wide'': + None, ''simplify'': None, ''auto_widen'': False, ''auto_widen_minimum_length'': + 200.0, ''taper_length'': 10.0, ''bbox_layers'': [], ''bbox_offsets'': [], + ''cladding_layers'': [''DEVREC''], ''cladding_offsets'': [0.0], ''cladding_simplify'': + None, ''sections'': [], ''port_names'': [''o1'', ''o2''], ''port_types'': + [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': 0.01, ''start_straight_length'': + 0.01, ''end_straight_length'': 0.01, ''snap_to_grid'': None, ''info'': {''settings'': + {''width'': 0.5, ''offset'': 0, ''layer'': ''WG'', ''width_wide'': None, ''auto_widen'': + False, ''auto_widen_minimum_length'': 200.0, ''taper_length'': 10.0, ''radius'': + 10.0, ''sections'': None, ''port_names'': [''o1'', ''o2''], ''port_types'': + [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': 0.01, ''start_straight_length'': + 0.01, ''end_straight_length'': 0.01, ''snap_to_grid'': None, ''bbox_layers'': + None, ''bbox_offsets'': None, ''cladding_layers'': [''DEVREC''], ''cladding_offsets'': + [0], ''cladding_simplify'': None, ''info'': None, ''decorator'': None, ''add_pins'': + {''function'': ''add_pins_siepic''}, ''add_bbox'': None, ''mirror'': False, + ''name'': None}, ''function_name'': ''cross_section''}, ''name'': None, ''mirror'': + False}_length' + : 10.0 settings: add_bbox: null add_pins: diff --git a/tests/test_components/test_pdk_settings_bend_.yml b/tests/test_components/test_pdk_settings_bend_.yml index 675ff83e..8e42f93a 100644 --- a/tests/test_components/test_pdk_settings_bend_.yml +++ b/tests/test_components/test_pdk_settings_bend_.yml @@ -50,6 +50,12 @@ settings: length: 16.637 radius: 10.0 radius_min: 7.061 + route_info: + length: 16.637 + n_bend_90: 1.0 + strip_length: 16.637 + type: strip + weight: 16.637 settings: add_bbox: null add_pins: diff --git a/tests/test_components/test_pdk_settings_bend_euler_.yml b/tests/test_components/test_pdk_settings_bend_euler_.yml index 829f150c..8db1f09a 100644 --- a/tests/test_components/test_pdk_settings_bend_euler_.yml +++ b/tests/test_components/test_pdk_settings_bend_euler_.yml @@ -51,6 +51,12 @@ settings: length: 16.637 radius: 10.0 radius_min: 7.061 + route_info: + length: 16.637 + n_bend_90: 1.0 + strip_length: 16.637 + type: strip + weight: 16.637 settings: add_bbox: null add_pins: diff --git a/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml index e2697596..4e933811 100644 --- a/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180.0 + orientation: 180 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 180.0 + orientation: 180 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 0.0 + orientation: 0 port_type: optical shear_angle: null width: 0.5 @@ -44,7 +44,7 @@ ports: - 1 - 0 name: o4 - orientation: 0.0 + orientation: 0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml index 9303b83e..7ed22a05 100644 --- a/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180.0 + orientation: 180 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 180.0 + orientation: 180 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 0.0 + orientation: 0 port_type: optical shear_angle: null width: 0.5 @@ -44,7 +44,7 @@ ports: - 1 - 0 name: o4 - orientation: 0.0 + orientation: 0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml b/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml index c0e9a864..1ea02118 100644 --- a/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180.0 + orientation: 180 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 90.0 + orientation: 90 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 0.0 + orientation: 0 port_type: optical shear_angle: null width: 0.5 @@ -44,7 +44,7 @@ ports: - 1 - 0 name: o4 - orientation: 270.0 + orientation: 270 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml b/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml index ea29508b..0aa5240e 100644 --- a/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml @@ -8,7 +8,7 @@ ports: - 1 - 0 name: o1 - orientation: 180.0 + orientation: 180 port_type: optical shear_angle: null width: 0.5 @@ -20,7 +20,7 @@ ports: - 1 - 0 name: o2 - orientation: 0.0 + orientation: 0 port_type: optical shear_angle: null width: 0.5 @@ -32,7 +32,7 @@ ports: - 1 - 0 name: o3 - orientation: 0.0 + orientation: 0 port_type: optical shear_angle: null width: 0.5 diff --git a/tests/test_components/test_pdk_settings_ring_double_heater_.yml b/tests/test_components/test_pdk_settings_ring_double_heater_.yml index d72dea04..8b931a9b 100644 --- a/tests/test_components/test_pdk_settings_ring_double_heater_.yml +++ b/tests/test_components/test_pdk_settings_ring_double_heater_.yml @@ -98,7 +98,7 @@ ports: width: 0.5 r_e1: center: - - 0.0 + - -0.0 - 0.0 layer: - 12 diff --git a/tests/test_components/test_pdk_settings_straight_.yml b/tests/test_components/test_pdk_settings_straight_.yml index 1acbea1e..711745bf 100644 --- a/tests/test_components/test_pdk_settings_straight_.yml +++ b/tests/test_components/test_pdk_settings_straight_.yml @@ -42,6 +42,95 @@ settings: cross_section: strip function_name: cross_section length: 10.0 + route_info: + length: 10.0 + type: + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: [] + bbox_offsets: [] + cladding_layers: + - DEVREC + cladding_offsets: + - 0.0 + cladding_simplify: null + end_straight_length: 0.01 + gap: 3.0 + info: + function_name: cross_section + settings: + add_bbox: null + add_pins: + function: add_pins_siepic + auto_widen: false + auto_widen_minimum_length: 200.0 + bbox_layers: null + bbox_offsets: null + cladding_layers: + - DEVREC + cladding_offsets: + - 0 + cladding_simplify: null + decorator: null + end_straight_length: 0.01 + gap: 3.0 + info: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + layer: WG + min_length: 0.01 + mirror: false + name: null + offset: 0.0 + port_names: + - o1 + - o2 + port_types: + - optical + - optical + radius: 10.0 + sections: [] + simplify: null + snap_to_grid: null + start_straight_length: 0.01 + taper_length: 10.0 + width: 0.5 + width_wide: null + weight: 10.0 + ? '{''layer'': ''WG'', ''width'': 0.5, ''offset'': 0.0, ''radius'': 10.0, ''width_wide'': + None, ''simplify'': None, ''auto_widen'': False, ''auto_widen_minimum_length'': + 200.0, ''taper_length'': 10.0, ''bbox_layers'': [], ''bbox_offsets'': [], + ''cladding_layers'': [''DEVREC''], ''cladding_offsets'': [0.0], ''cladding_simplify'': + None, ''sections'': [], ''port_names'': [''o1'', ''o2''], ''port_types'': + [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': 0.01, ''start_straight_length'': + 0.01, ''end_straight_length'': 0.01, ''snap_to_grid'': None, ''info'': {''settings'': + {''width'': 0.5, ''offset'': 0, ''layer'': ''WG'', ''width_wide'': None, ''auto_widen'': + False, ''auto_widen_minimum_length'': 200.0, ''taper_length'': 10.0, ''radius'': + 10.0, ''sections'': None, ''port_names'': [''o1'', ''o2''], ''port_types'': + [''optical'', ''optical''], ''gap'': 3.0, ''min_length'': 0.01, ''start_straight_length'': + 0.01, ''end_straight_length'': 0.01, ''snap_to_grid'': None, ''bbox_layers'': + None, ''bbox_offsets'': None, ''cladding_layers'': [''DEVREC''], ''cladding_offsets'': + [0], ''cladding_simplify'': None, ''info'': None, ''decorator'': None, ''add_pins'': + {''function'': ''add_pins_siepic''}, ''add_bbox'': None, ''mirror'': False, + ''name'': None}, ''function_name'': ''cross_section''}, ''name'': None, ''mirror'': + False}_length' + : 10.0 settings: add_bbox: null add_pins: diff --git a/ubcpdk/circuits/grating.pic.yml b/ubcpdk/circuits/grating.pic.yml deleted file mode 100644 index cdf5f9a4..00000000 --- a/ubcpdk/circuits/grating.pic.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: sample_different_factory - -settings: - taper_length: -50 - -instances: - bl: - component: pad - tl: - component: pad - br: - component: pad - tr: - component: pad - -placements: - tl: - x: 0 - y: 200 - - br: - x: 400 - y: 400 - - tr: - x: 400 - y: 600 - -routes: - electrical: - settings: - separation: 20 - layer: [31, 0] - width: 10 - links: - tl,e3: tr,e1 - bl,e3: br,e1 - optical: - settings: - radius: 100 - links: - bl,e4: br,e3 diff --git a/ubcpdk/circuits/mask.pic.yml b/ubcpdk/circuits/mask.pic.yml deleted file mode 100644 index 120ca7f1..00000000 --- a/ubcpdk/circuits/mask.pic.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: mask_compact -pdk: ubcpdk - -instances: - rings: - component: pack_doe - settings: - doe: ring_single - settings: - radius: [30, 50, 20, 40] - length_x: [1, 2, 3] - do_permutations: True - function: - function: add_fiber_array - settings: - fanout_length: 200 - - mzis: - component: pack_doe_grid - settings: - doe: mzi - settings: - delta_length: [10, 100, 300, 500, 600] - do_permutations: True - spacing: [10, 10] - function: add_fiber_single - - mmis: - component: pack_doe_grid - settings: - doe: dbr_cavity - settings: - n: [10, 100] - do_permutations: True - spacing: [10, 10] - function: add_fiber_single - -placements: - rings: - xmin: 50 - - mzis: - xmin: rings,east - - mmis: - xmin: mzis,east diff --git a/ubcpdk/circuits/mzi_lattice_filter.pic.yml b/ubcpdk/circuits/mzi_lattice_filter.pic.yml deleted file mode 100644 index b63edb97..00000000 --- a/ubcpdk/circuits/mzi_lattice_filter.pic.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: mzi_lattice_ubcpdk -pdk: ubcpdk - -instances: - mzi1: - component: mzi_ubcpdk - settings: - dy: -100 - - mzi2: - component: mzi_ubcpdk - settings: - dy: -500 - - gc1: - component: ebeam_gc_te1550 - - gc2: - component: ebeam_gc_te1550 - -placements: - mzi2: - ymax: mzi1,north - dy: 100 - xmin: mzi1,east - dx: 50 - - gc1: - xmax: mzi1,west - mirror: True - dx: -100 - dy: -20 - - gc2: - xmin: mzi2,east - dx: 100 - dy: 100 - -routes: - optical: - links: - mzi1,o2: mzi2,o1 - settings: - auto_widen: True - - gc1: - links: - gc1,o1: mzi1,o1 - - gc2: - links: - gc2,o1: mzi2,o2 diff --git a/ubcpdk/circuits/mzi_ubcpdk.pic.yml b/ubcpdk/circuits/mzi_ubcpdk.pic.yml deleted file mode 100644 index 36a123af..00000000 --- a/ubcpdk/circuits/mzi_ubcpdk.pic.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: mzi_ubcpdk -pdk: ubcpdk - -settings: - dy: -100 - -info: - polarization: te - wavelength: 1.55 - description: mzi for ubcpdk - -instances: - yr: - component: ebeam_y_1550 - yl: - component: ebeam_y_1550 - -placements: - yr: - rotation: 180 - x: 100 - y: 0 - -routes: - route_top: - links: - yl,o2: yr,o3 - settings: - cross_section: strip - route_bot: - links: - yl,o3: yr,o2 - routing_strategy: get_bundle_from_steps - settings: - steps: [dx: 30, dy: "${settings.dy}", dx: 20] - cross_section: strip - -ports: - o1: yl,o1 - o2: yr,o1 diff --git a/ubcpdk/circuits/pads.pic.yml b/ubcpdk/circuits/pads.pic.yml deleted file mode 100644 index adfcf160..00000000 --- a/ubcpdk/circuits/pads.pic.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: sample_different_factory -pdk: ubcpdk - -instances: - bl: - component: pad - tl: - component: pad - br: - component: pad - tr: - component: pad - -placements: - tl: - x: -100 - y: 200 - - br: - x: 400 - y: 400 - - tr: - x: 400 - y: 600 - - -routes: - electrical: - settings: - separation: 20 - layer: M2_ROUTER - width: 10 - links: - tl,e3: tr,e1 - bl,e3: br,e1 - optical: - settings: - radius: 10 - links: - bl,e4: br,e3 diff --git a/docs/notebooks/00_layout.py b/ubcpdk/samples/notebooks/00_layout.py similarity index 100% rename from docs/notebooks/00_layout.py rename to ubcpdk/samples/notebooks/00_layout.py diff --git a/docs/notebooks/11_sparameters.py b/ubcpdk/samples/notebooks/11_sparameters.py similarity index 80% rename from docs/notebooks/11_sparameters.py rename to ubcpdk/samples/notebooks/11_sparameters.py index 1bd1a949..9f596423 100644 --- a/docs/notebooks/11_sparameters.py +++ b/ubcpdk/samples/notebooks/11_sparameters.py @@ -1,58 +1,71 @@ # --- # 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] # # Component FDTD simulations # # Thanks to the GDSFactory plugin you can directly run simulations in different FDTD solvers. # # See [tutorial](https://gdsfactory.github.io/gdsfactory/plugins_fdtd.html) +# %% [markdown] # ## Tidy3d # # You can read about the [tidy3d gdsfactory plugin](https://gdsfactory.github.io/gdsfactory/notebooks/plugins/tidy3d/00_tidy3d.html) -# + -import gdsfactory.simulation as sim -import gdsfactory.simulation.gtidy3d as gt +# %% +import gplugins as sim +import gplugins.gtidy3d as gt import ubcpdk import ubcpdk.components as pdk +from ubcpdk.config import PATH -# - +# %% c = pdk.ebeam_y_1550() -c +c.plot() +# %% sp = gt.write_sparameters(c) +# %% sp.keys() +# %% sim.plot.plot_sparameters(sp) +# %% sim.plot.plot_loss1x2(sp) +# %% sim.plot.plot_imbalance1x2(sp) +# %% [markdown] # ## Lumerical FDTD # # You can write the [Sparameters](https://en.wikipedia.org/wiki/Scattering_parameters) for all components in the UBC `ubcpdk.components` PDK using lumerical FDTD plugin in gdsfactory +# %% [markdown] # To run simulations uncomment the following lines -import gdsfactory.simulation as sim +# %% +import gplugins as sim import ubcpdk.components as pdk +# %% for f in [ pdk.bend_euler, pdk.coupler, @@ -65,13 +78,13 @@ # ls.write_sparameters_lumerical(component=component) -# + +# %% # sp = ls.read.read_sparameters_lumerical(component=ubcpdk.components.straight()) -# + +# %% # sim.plot_sparameters(sp) -# - +# %% [markdown] # ## MEEP FDTD # # Meep in an open source FDTD library developed at MIT. @@ -81,25 +94,29 @@ # # The resolution is in pixels/um so you need to run with at least `resolution=100` for 1/100 um/pixel (10 nm/ pixel). +# %% import gdsfactory as gf -import gdsfactory.simulation.gmeep as gm +import gplugins.gmeep as gm +# %% c = ubcpdk.components.straight(length=3) -c +c.plot() +# %% df = gm.write_sparameters_meep_1x1(component=c, run=False) -df = gm.write_sparameters_meep_1x1(component=c, run=True) +# %% +df = gm.write_sparameters_meep_1x1(component=c, run=True, dirpath=PATH.sparameters) +# %% gm.plot.plot_sparameters(df) +# %% gm.plot.plot_sparameters(df, logscale=False) +# %% c = ubcpdk.components.ebeam_y_1550() c +# %% df = gm.write_sparameters_meep(component=c, run=False) # lr stands for left-right ports - -df = gm.write_sparameters_meep( - gf.components.coupler_ring(), xmargin=3, ymargin_bot=3, run=False -) # lr stands for left-right ports diff --git a/docs/notebooks/11_sparameters_gratings.py b/ubcpdk/samples/notebooks/11_sparameters_gratings.py similarity index 83% rename from docs/notebooks/11_sparameters_gratings.py rename to ubcpdk/samples/notebooks/11_sparameters_gratings.py index f872fdf3..8cff546a 100644 --- a/docs/notebooks/11_sparameters_gratings.py +++ b/ubcpdk/samples/notebooks/11_sparameters_gratings.py @@ -26,11 +26,12 @@ import numpy as np import matplotlib.pyplot as plt -import gdsfactory.simulation.gtidy3d as gt +import gplugins.gtidy3d as gt import ubcpdk.components as pdk +from ubcpdk.config import PATH c = pdk.gc_te1550() -c +c.plot() # %% fiber_angle_deg = -31 @@ -50,6 +51,7 @@ is_3d=False, fiber_angle_deg=fiber_angle_deg, fiber_xoffset=fiber_xoffset, + dirpath=PATH.sparameters, ) for fiber_xoffset in offsets ] @@ -64,7 +66,7 @@ def log(x): # %% for offset in offsets: sp = gt.write_sparameters_grating_coupler( - c, is_3d=False, fiber_angle_deg=fiber_angle_deg, fiber_xoffset=offset + c, is_3d=False, fiber_angle_deg=fiber_angle_deg, fiber_xoffset=offset, dirpath=PATH.sparameters ) plt.plot( sp["wavelengths"], @@ -78,15 +80,4 @@ def log(x): plt.legend() # %% -# gt.write_sparameters_grating_coupler? - -# %% -sparams = [ - gt.write_sparameters_grating_coupler( - component=c, - is_3d=False, - fiber_angle_deg=fiber_angle_deg, - fiber_xoffset=fiber_xoffset, - ) - for fiber_xoffset in offsets -] +help(gt.write_sparameters_grating_coupler) diff --git a/docs/notebooks/12_sim_plugins_tidy3d.py b/ubcpdk/samples/notebooks/12_sim_plugins_tidy3d.py similarity index 87% rename from docs/notebooks/12_sim_plugins_tidy3d.py rename to ubcpdk/samples/notebooks/12_sim_plugins_tidy3d.py index beb07d8f..8de5814c 100644 --- a/docs/notebooks/12_sim_plugins_tidy3d.py +++ b/ubcpdk/samples/notebooks/12_sim_plugins_tidy3d.py @@ -27,13 +27,6 @@ # # We will be using SAX which is open source and tidy3d which requires you to create an account to run simulations in tidy3d cloud. # -# -# ``` -# set PIP_FIND_LINKS="https://whls.blob.core.windows.net/unstable/index.html" -# pip install sax jax sklearn -# pip install "jaxlib[cuda111]" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver -# pip install "gdsfactory[tidy3d,sax]" -# ``` # %% [markdown] # ## tidy3d FDTD simulations @@ -47,15 +40,16 @@ # ![cloud_model](https://i.imgur.com/5VTCPLR.png) # %% -import gdsfactory.simulation as sim +import gplugins as sim import gdsfactory as gf -import gdsfactory.simulation.gtidy3d as gt +import gplugins.gtidy3d as gt import ubcpdk.components as pdk +from ubcpdk.config import PATH # %% c = pdk.ebeam_y_1550() -c +c.plot() # %% sp = gt.write_sparameters(c) @@ -72,7 +66,7 @@ # %% mzi10 = gf.components.mzi(splitter=c, delta_length=10) -mzi10 +mzi10.plot() # %% import matplotlib.pyplot as plt @@ -81,7 +75,7 @@ import sax import gdsfactory as gf -import gdsfactory.simulation.sax as gsax +import gplugins.sax as gsax # %% @@ -121,7 +115,7 @@ def bend_euler(wl=1.5, length=20.0): # %% mzi20 = gf.components.mzi(splitter=c, delta_length=20) -mzi20 +mzi20.plot() # %% netlist = mzi20.get_netlist() @@ -144,5 +138,3 @@ def bend_euler(wl=1.5, length=20.0): plt.ylabel("T") plt.grid(True) plt.show() - -# %% diff --git a/docs/notebooks/13_sim_plugins.py b/ubcpdk/samples/notebooks/13_sim_plugins.py similarity index 95% rename from docs/notebooks/13_sim_plugins.py rename to ubcpdk/samples/notebooks/13_sim_plugins.py index 1443641f..3c07d340 100644 --- a/docs/notebooks/13_sim_plugins.py +++ b/ubcpdk/samples/notebooks/13_sim_plugins.py @@ -25,8 +25,8 @@ # ## MEEP FDTD # + -import gdsfactory.simulation.gmeep as gm -import gdsfactory.simulation as sim +import gplugins.gmeep as gm +import gplugins as sim import gdsfactory as gf import ubcpdk as pdk @@ -130,7 +130,7 @@ # ## 3D rendering # + -from gdsfactory.simulation.add_simulation_markers import add_simulation_markers +from gplugins.add_simulation_markers import add_simulation_markers import ubcpdk as pdk y = pdk.components.ebeam_y_1550() @@ -163,8 +163,8 @@ import sax import gdsfactory as gf -import gdsfactory.simulation.sax as gsax -import gdsfactory.simulation.gmeep as gm +import gplugins.sax as gsax +import gplugins.gmeep as gm import ubcpdk as pdk diff --git a/docs/notebooks/14_sax_tidy3d.py b/ubcpdk/samples/notebooks/14_sax_tidy3d.py similarity index 92% rename from docs/notebooks/14_sax_tidy3d.py rename to ubcpdk/samples/notebooks/14_sax_tidy3d.py index e7d2d21d..5072e53a 100644 --- a/docs/notebooks/14_sax_tidy3d.py +++ b/ubcpdk/samples/notebooks/14_sax_tidy3d.py @@ -1,17 +1,20 @@ +# -*- coding: utf-8 -*- # --- # 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] # # SAX circuit simulator # # [SAX](https://flaport.github.io/sax/) is a circuit solver written in JAX, writing your component models in SAX enables you not only to get the function values but the gradients, this is useful for circuit optimization. @@ -21,24 +24,22 @@ # You can install sax with pip (read the SAX install instructions [here](https://github.com/flaport/sax#installation)) # # ``` -# pip install 'gdsfactory[sax]' +# pip install 'gplugins[sax]' # ``` -# + +# %% from pprint import pprint import numpy as np import matplotlib.pyplot as plt import jax.numpy as jnp import gdsfactory as gf -import gdsfactory.simulation.sax as gs +import gplugins.sax as gs import sax -import gdsfactory.simulation.gtidy3d as gt - -gf.config.set_plot_options(show_subports=False) -# - +import gplugins.gtidy3d as gt +# %% [markdown] # ## Scatter *dictionaries* # # The core datastructure for specifying scatter parameters in SAX is a dictionary... more specifically a dictionary which maps a port combination (2-tuple) to a scatter parameter (or an array of scatter parameters when considering multiple wavelengths for example). Such a specific dictionary mapping is called ann `SDict` in SAX (`SDict ≈ Dict[Tuple[str,str], float]`). @@ -53,6 +54,7 @@ # o1 o4 # ``` +# %% nm = 1e-3 coupling = 0.5 kappa = coupling**0.5 @@ -69,9 +71,10 @@ } coupler_dict +# %% [markdown] # it can still be tedious to specify every port in the circuit manually. SAX therefore offers the `reciprocal` function, which auto-fills the reverse connection if the forward connection exist. For example: -# + +# %% coupler_dict = sax.reciprocal( { ("o1", "o4"): tau, @@ -83,16 +86,14 @@ coupler_dict - -# - - +# %% [markdown] # ## Parametrized Models # # Constructing such an `SDict` is easy, however, usually we're more interested in having parametrized models for our components. To parametrize the coupler `SDict`, just wrap it in a function to obtain a SAX `Model`, which is a keyword-only function mapping to an `SDict`: # -# + +# %% def coupler(coupling=0.5) -> sax.SDict: kappa = coupling**0.5 tau = (1 - coupling) ** 0.5 @@ -109,9 +110,7 @@ def coupler(coupling=0.5) -> sax.SDict: coupler(coupling=0.3) -# - - - +# %% def waveguide(wl=1.55, wl0=1.55, neff=2.34, ng=3.4, length=10.0, loss=0.0) -> sax.SDict: dwl = wl - wl0 dneff_dwl = (ng - neff) / wl0 @@ -125,12 +124,15 @@ def waveguide(wl=1.55, wl0=1.55, neff=2.34, ng=3.4, length=10.0, loss=0.0) -> sa ) +# %% [markdown] # ### Waveguide model # # You can create a dispersive waveguide model in SAX. +# %% [markdown] # Lets compute the effective index `neff` and group index `ng` for a 1550nm 500nm straight waveguide +# %% strip = gt.modes.Waveguide( wavelength=1.55, core_width=0.5, @@ -140,27 +142,37 @@ def waveguide(wl=1.55, wl0=1.55, neff=2.34, ng=3.4, length=10.0, loss=0.0) -> sa clad_material="sio2", group_index_step=10 * nm, ) -strip.plot_field(mode_index=0, field_type="Ex") # TE +strip.plot_field(field_name="Ex", mode_index=0) # TE -neff = strip.neffs[0].real -neff +# %% +neff = strip.n_eff[0] +print(neff) + +# %% ng = strip.n_group[0] +print(ng) +# %% straight_sc = gf.partial(gs.models.straight, neff=neff, ng=ng) +# %% gs.plot_model(straight_sc) plt.ylim(-1, 1) +# %% gs.plot_model(straight_sc, phase=True) +# %% [markdown] # ### Coupler model # # Lets define the model for an evanescent coupler +# %% c = gf.components.coupler(length=10, gap=0.2) -c +c.plot() +# %% nm = 1e-3 cp = gt.modes.WaveguideCoupler( wavelength=1.55, @@ -171,29 +183,38 @@ def waveguide(wl=1.55, wl0=1.55, neff=2.34, ng=3.4, length=10.0, loss=0.0) -> sa core_material="si", clad_material="sio2", ) -cp.plot_field(mode_index=0, field_type="Ex") # even mode -cp.plot_field(mode_index=1, field_type="Ex") # odd mode + +cp.plot_field(field_name="Ex", mode_index=0) # even mode +cp.plot_field(field_name="Ex", mode_index=1) # odd mode + +# %% [markdown] # For a 200nm gap the effective index difference `dn` is `0.026`, which means that there is 100% power coupling over 29.4 +# %% [markdown] # If we ignore the coupling from the bend `coupling0 = 0` we know that for a 3dB coupling we need half of the `lc` length, which is the length needed to coupler `100%` of power. +# %% coupler_sc = gf.partial(gs.models.coupler, dn=0.026, length=29.4 / 2, coupling0=0) gs.plot_model(coupler_sc) +# %% [markdown] # ## SAX gdsfactory Compatibility # > From Layout to Circuit Model # # If you define your SAX S parameter models for your components, you can directly simulate your circuits from gdsfactory +# %% mzi = gf.components.mzi(delta_length=10) -mzi +mzi.plot() +# %% netlist = mzi.get_netlist() pprint(netlist["connections"]) +# %% [markdown] # The netlist has three different components: # # 1. straight @@ -203,7 +224,7 @@ def waveguide(wl=1.55, wl0=1.55, neff=2.34, ng=3.4, length=10.0, loss=0.0) -> sa # You need models for each subcomponents to simulate the Component. -# + +# %% def straight(wl=1.5, length=10.0, neff=2.4) -> sax.SDict: return sax.reciprocal({("o1", "o2"): jnp.exp(2j * jnp.pi * neff * length / wl)}) @@ -228,11 +249,11 @@ def bend_euler(wl=1.5, length=20.0): "mmi1x2": mmi1x2, "straight": straight, } -# - +# %% circuit, _ = sax.circuit(netlist=netlist, models=models) -# + +# %% circuit, _ = sax.circuit(netlist=netlist, models=models) wl = np.linspace(1.5, 1.6) S = circuit(wl=wl) @@ -244,12 +265,12 @@ def bend_euler(wl=1.5, length=20.0): plt.ylabel("T") plt.grid(True) plt.show() -# - +# %% mzi = gf.components.mzi(delta_length=20) # Double the length, reduces FSR by 1/2 -mzi +mzi.plot() -# + +# %% circuit, _ = sax.circuit(netlist=mzi.get_netlist(), models=models) wl = np.linspace(1.5, 1.6, 256) @@ -262,20 +283,21 @@ def bend_euler(wl=1.5, length=20.0): plt.ylabel("T") plt.grid(True) plt.show() -# - +# %% [markdown] # ## Heater model # # You can make a phase shifter model that depends on the applied volage. For that you need first to figure out what's the model associated to your phase shifter, and what is the parameter that you need to tune. +# %% delta_length = 10 mzi_component = gf.components.mzi_phase_shifter_top_heater_metal( delta_length=delta_length ) -fig = mzi_component.plot() +mzi_component.plot() -# + +# %% def straight(wl=1.5, length=10.0, neff=2.4) -> sax.SDict: return sax.reciprocal({("o1", "o2"): jnp.exp(2j * jnp.pi * neff * length / wl)}) @@ -320,8 +342,8 @@ def phase_shifter_heater( "straight": straight, "straight_heater_metal_undercut": phase_shifter_heater, } -# - +# %% mzi_component = gf.components.mzi_phase_shifter_top_heater_metal( delta_length=delta_length ) @@ -330,7 +352,7 @@ def phase_shifter_heater( S = mzi_circuit(wl=1.55) S -# + +# %% wl = np.linspace(1.5, 1.6, 256) S = mzi_circuit(wl=wl) @@ -341,26 +363,30 @@ def phase_shifter_heater( plt.ylabel("T") plt.grid(True) plt.show() -# - +# %% [markdown] # Now you can tune the phase shift applied to one of the arms. # # How do you find out what's the name of the netlist component that you want to tune? # # You can backannotate the netlist and read the labels on the backannotated netlist or you can plot the netlist +# %% mzi_component.plot_netlist() +# %% [markdown] # As you can see the top phase shifter instance `sxt` is hard to see on the netlist. # You can also reconstruct the component using the netlist and look at the labels in klayout. +# %% mzi_yaml = mzi_component.get_netlist_yaml() mzi_component2 = gf.read.from_yaml(mzi_yaml) fig = mzi_component2.plot(label_aliases=True) +# %% [markdown] # The best way to get a deterministic name of the `instance` is naming the reference on your Pcell. -# + +# %% voltages = np.linspace(-1, 1, num=5) voltages = [-0.5, 0, 0.5] @@ -378,9 +404,7 @@ def phase_shifter_heater( plt.title("MZI vs voltage") plt.legend() - -# - - +# %% [markdown] # ## Variable splitter # # You can build a variable splitter by adding a delta length between two 50% power splitters @@ -390,7 +414,7 @@ def phase_shifter_heater( # For example adding a 60um delta length you can build a 90% power splitter -# + +# %% @gf.cell def variable_splitter(delta_length: float, splitter=gf.c.mmi2x2): return gf.c.mzi2x2_2x2(splitter=splitter, delta_length=delta_length) @@ -398,9 +422,9 @@ def variable_splitter(delta_length: float, splitter=gf.c.mmi2x2): nm = 1e-3 c = variable_splitter(delta_length=60 * nm, cache=False) -c +c.plot() -# + +# %% models = { "bend_euler": gs.models.bend, "mmi2x2": gs.models.mmi2x2, @@ -419,25 +443,28 @@ def variable_splitter(delta_length: float, splitter=gf.c.mmi2x2): plt.ylabel("T") plt.grid(True) plt.show() -# - +# %% [markdown] # ## Coupler sim # # Lets compare one coupler versus two coupler +# %% c = gf.components.coupler(length=29.4, gap=0.2) -c +c.plot() +# %% coupler50 = gf.partial(gs.models.coupler, dn=0.026, length=29.4 / 2, coupling0=0) gs.plot_model(coupler50) +# %% [markdown] # As you can see the 50% coupling is only at one wavelength (1550nm) # # You can chain two couplers to increase the wavelength range for 50% operation. -# + +# %% @gf.cell def broadband_coupler(delta_length=0, splitter=gf.c.coupler): return gf.c.mzi2x2_2x2( @@ -446,9 +473,9 @@ def broadband_coupler(delta_length=0, splitter=gf.c.coupler): c = broadband_coupler(delta_length=120 * nm, cache=False) -c +c.plot() -# + +# %% c = broadband_coupler(delta_length=164 * nm, cache=False) models = { "bend_euler": gs.models.bend, @@ -470,6 +497,6 @@ def broadband_coupler(delta_length=0, splitter=gf.c.coupler): plt.ylabel("T") plt.legend() plt.grid(True) -# - +# %% [markdown] # As you can see two couplers have more broadband response diff --git a/docs/notebooks/21_schematic_driven_layout.py b/ubcpdk/samples/notebooks/21_schematic_driven_layout.py similarity index 98% rename from docs/notebooks/21_schematic_driven_layout.py rename to ubcpdk/samples/notebooks/21_schematic_driven_layout.py index 3bdcc488..5d926e87 100644 --- a/docs/notebooks/21_schematic_driven_layout.py +++ b/ubcpdk/samples/notebooks/21_schematic_driven_layout.py @@ -25,7 +25,7 @@ from bokeh.io import output_notebook import gdsfactory as gf -from gdsfactory.schematic_editor import SchematicEditor +from gplugins.schematic_editor import SchematicEditor from gdsfactory.config import rich_output # %env BOKEH_ALLOW_WS_ORIGIN=localhost:8888 @@ -161,7 +161,7 @@ # %% import numpy as np import matplotlib.pyplot as plt -import gdsfactory.simulation.sax as gs +import gplugins.sax as gs import jax.numpy as jnp import sax diff --git a/docs/notebooks/31_data_analysis_mzi.py b/ubcpdk/samples/notebooks/31_data_analysis_mzi.py similarity index 93% rename from docs/notebooks/31_data_analysis_mzi.py rename to ubcpdk/samples/notebooks/31_data_analysis_mzi.py index 75fc905d..59afcd6b 100644 --- a/docs/notebooks/31_data_analysis_mzi.py +++ b/ubcpdk/samples/notebooks/31_data_analysis_mzi.py @@ -1,17 +1,19 @@ # --- # 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] # # Data analysis MZI # # We analyze the following MZI samples from the edx course @@ -63,35 +65,42 @@ # dL_wg = dL_path + 2*pi*r - 4*2*r ; dL_wg # = 219.366 +# %% import matplotlib.pyplot as plt import numpy as np import ubcpdk from ubcpdk.simulation.circuits.mzi_spectrum import mzi_spectrum +# %% w, p = ubcpdk.data.read_mat(ubcpdk.PATH.mzi1, port=0) plt.plot(w, p) +# %% [markdown] # For some reason this MZI has an interference pattern. This is strange because the lengths of both arms are the same. This means that there was a strong height variation on the chip. +# %% w, p = ubcpdk.data.read_mat(ubcpdk.PATH.mzi3, port=0) plt.plot(w, p) +# %% wr = np.linspace(1520, 1580, 1200) * 1e-3 pr = mzi_spectrum(L1_um=0, L2_um=214.215, wavelength_um=wr) plt.plot(wr * 1e3, 10 * np.log10(pr)) +# %% w, p = ubcpdk.data.read_mat(ubcpdk.PATH.mzi3, port=0) pb = ubcpdk.data.remove_baseline(w, p) plt.plot(w, pb) +# %% plt.plot(w, pb, label="measurement") plt.plot(wr * 1e3, 10 * np.log10(pr), label="analytical") plt.legend() -# + +# %% # ms.sweep_wavelength? -# + +# %% from scipy.optimize import curve_fit L1_um = 40 @@ -120,17 +129,19 @@ def mzi_logscale(wavelength_um, alpha, n1, n2, n3): plt.plot(w, pb, label="data") plt.plot(w, mzi_logscale(wum, *p0), label="initial condition") plt.legend() -# - +# %% params, params_covariance = curve_fit(mzi_logscale, wum, pb, p0=[1e-3, 2.4, -1, 0]) +# %% params +# %% plt.plot(w, pb, label="data") plt.plot(w, mzi_logscale(wum, *params), label="fit") plt.legend() -# + +# %% L1_um = 40 L2_um = L1_um + 215.932 @@ -156,10 +167,11 @@ def mzi(wavelength_um, alpha, n1, n2, n3): plt.plot(w, pb_linear, label="data") plt.plot(w, mzi(wum, *p0), label="initial condition") plt.legend() -# - +# %% params, params_covariance = curve_fit(mzi, wum, pb, p0=p0) +# %% plt.plot(w, pb_linear, label="data") plt.plot(w, mzi(wum, *params), label="fit") plt.legend() diff --git a/docs/notebooks/32_data_analysis_ring.py b/ubcpdk/samples/notebooks/32_data_analysis_ring.py similarity index 100% rename from docs/notebooks/32_data_analysis_ring.py rename to ubcpdk/samples/notebooks/32_data_analysis_ring.py diff --git a/docs/notebooks/33_data_analysis_dbr.py b/ubcpdk/samples/notebooks/33_data_analysis_dbr.py similarity index 100% rename from docs/notebooks/33_data_analysis_dbr.py rename to ubcpdk/samples/notebooks/33_data_analysis_dbr.py diff --git a/docs/notebooks/Makefile b/ubcpdk/samples/notebooks/Makefile similarity index 100% rename from docs/notebooks/Makefile rename to ubcpdk/samples/notebooks/Makefile diff --git a/docs/notebooks/sdl_demo.pic.yml b/ubcpdk/samples/notebooks/sdl_demo.pic.yml similarity index 100% rename from docs/notebooks/sdl_demo.pic.yml rename to ubcpdk/samples/notebooks/sdl_demo.pic.yml diff --git a/docs/notebooks/test.schem.yml b/ubcpdk/samples/notebooks/test.schem.yml similarity index 100% rename from docs/notebooks/test.schem.yml rename to ubcpdk/samples/notebooks/test.schem.yml diff --git a/ubcpdk/samples/report/EBeam_JoaquinMatres.ipynb b/ubcpdk/samples/report/EBeam_JoaquinMatres.ipynb deleted file mode 100644 index d61eb0ba..00000000 --- a/ubcpdk/samples/report/EBeam_JoaquinMatres.ipynb +++ /dev/null @@ -1,472 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "---\n", - "title: Process control monitors\n", - "author: \"Joaquin Matres\"\n", - "numbersections: true\n", - "autoEqnLabels: true\n", - "geometry:\n", - "- top=30mm\n", - "- left=20mm\n", - "- right=20mm\n", - "- bottom=30mm\n", - "bibliography: library.bib\n", - "header-includes:\n", - " - \\usepackage{float}\n", - "\n", - "---\n", - "\n", - "# Report\n", - "\n", - "## Motivation\n", - "\n", - "As we build more complex photonic systems we need to understand how the\n", - "variability of each component affects the performance of the overall system. In\n", - "this paper we add process control monitor the width and height control for the\n", - "Ebeam process.\n", - "\n", - "Here is a list of components included in the mask\n", - "\n", - "- low and high order MZI to extract group index and effective index\n", - "- different length spirals to extract propagation loss (dB/cm) versus wavelength\n", - "- ring resonators to extract group and effective index variations\n", - "\n", - "\n", - "All the code used, included this report can be found in [this github\n", - "repo](https://github.com/gdsfactory/ubc), which contains:\n", - "\n", - "- GDS layout and circuit models for the components\n", - "- mask code to build GDS, together with JSON metadata\n", - "\n", - "Links:\n", - "\n", - "- [gdsfactory documentation](https://gdsfactory.readthedocs.io/en/latest/)\n", - "[@gdsfactory]\n", - "- [simphony](https://simphonyphotonics.readthedocs.io/en/latest/) for circuit\n", - "simulation.[@simphony]\n", - "- [SiPANN](https://sipann.readthedocs.io/en/latest/) which uses a neural network\n", - "to fit the component models. [@sipann]\n", - "- [modes](https://modes.readthedocs.io/en/latest/index.html)\n", - "\n", - "\n", - "## MZI interferometers\n", - "\n", - "We follow the method described in [@Xing2018] to extract the group index and\n", - "effective index, where we use a low (m=15) and high order (m=150) MZI to extract\n", - "the group and effective index of the waveguide, from which we can extract the\n", - "waveguide width and height.\n", - "\n", - "\n", - "$$m \\lambda_{res} = n_{eff} \\Delta L$$\n", - "\n", - "$$\\Delta L = m \\lambda_{res} / n_{eff}$$\n", - "\n", - "\n", - "According to the ANT [website](https://www.appliednt.com/), waveguides have a\n", - "sidewall angle of 82°. The fabricated 500x220 nm waveguides neff is 2.495 and\n", - "group index 4.12" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import modes\n", - "import gdsfactory as gf\n", - "import ubcpdk.simulation.circuits_simphony as cm\n", - "import gdsfactory.simulation.simphony as gs\n", - "import ubcpdk" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "s = modes.mode_solver_full(angle=82,\n", - " width=500e-3,\n", - " thickness=220e-3,\n", - " plot=True,\n", - " fields_to_write=('Ex',),\n", - " n_modes=1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ng = modes.group_index(thickness=220e-3, width=470e-3, angle=82)\n", - "print(f'group index ng = {ng[0]:.2f}')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "neff = 2.495\n", - "delta_length_short = 15 * 1.55 / neff\n", - "delta_length_long = 150 * 1.55 / neff\n", - "print(f'MZI short = {delta_length_short:.2f} MZI long = {delta_length_long:.2f}')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We can now layout and simulate the MZI responses together with grating couplers." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ubcpdk.components.mzi(delta_length=delta_length_long)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ubcpdk.components.mzi(delta_length=delta_length_short)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "attributes": { - "classes": [], - "id": "", - "n": "1" - } - }, - "outputs": [], - "source": [ - "\n", - "mzi_circuit_short = cm.mzi(delta_length=delta_length_short)\n", - "gs.plot_circuit(mzi_circuit_short)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "mzi_circuit_long = cm.mzi(delta_length=delta_length_long)\n", - "gs.plot_circuit(mzi_circuit_long)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Ring resonators\n", - "\n", - "We add another method to extract group and effective index using Ring resonators\n", - "as described in [@Lu2017].\n", - "\n", - "The ring resonators from the paper had 500 x 220nm waveguides, 4.5um coupler\n", - "length, 200nm gap and 12um bend radius." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "ubcpdk.components.ring_single(length_x=4.5, gap=0.2, radius=12)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import ubcpdk.simulation.circuits_simphony as siepic\n", - "import matplotlib.pyplot as plt\n", - "\n", - "c = siepic.ebeam_dc_halfring_straight(\n", - " gap=200e-9,\n", - " radius=12e-6,\n", - " width=500e-9,\n", - " thickness=220e-9,\n", - " couple_length=4e-6\n", - ")\n", - "gs.plot_model(c, pin_in='o1', pins=('o2', 'o3', 'o4'))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We use [simphony](https://simphonyphotonics.readthedocs.io/en/latest/) for\n", - "circuit simulation. As simphony misses Sparameters for some coupler designs, we\n", - "use [SiPANN](https://sipann.readthedocs.io/en/latest/) which uses a neural\n", - "network to interpolate missing Sparameter values." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np\n", - "from SiPANN import nn\n", - "\n", - "\n", - "def f(radius,\n", - " couplerLength,\n", - " gap,\n", - " width,\n", - " thickness,\n", - " sw_angle,\n", - " couplerWidth,\n", - " wavelength=np.squeeze(np.linspace(1.5,1.6,5000))):\n", - " \"\"\" units in um\n", - " \"\"\" \n", - " E, alpha, t, alpha_s, _ = nn.racetrack_AP_RR_TF(wavelength,\n", - " widthCoupler=couplerWidth,\n", - " radius=radius,\n", - " sw_angle=sw_angle,\n", - " couplerLength=couplerLength,\n", - " gap=gap,\n", - " width=width,\n", - " thickness=thickness)\n", - " \n", - " input = np.squeeze([1,0])\n", - " throughPort = 10*np.log10(np.abs(np.squeeze(E)) ** 2)\n", - " #throughPort = np.unwrap(np.angle(np.squeeze(E)))\n", - "\n", - " plt.figure()\n", - " plt.plot(wavelength, (throughPort), label='Through Port')\n", - " plt.xlabel('Wavelength ($\\mu$m)')\n", - " plt.ylabel('Power (a.u.)')\n", - " plt.grid(True)\n", - " plt.title(f'couplerLength = {couplerLength}')\n", - " plt.legend()\n", - " #plt.ylim(-30, 0.1)\n", - " #plt.xlim(1.55,1.56)\n", - " plt.tight_layout()\n", - " plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "f(radius=12, couplerLength=4.5, gap=0.2, width=0.5, thickness=.22, sw_angle=82, couplerWidth=.5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "f(radius=12, couplerLength=6, gap=0.2, width=0.5, thickness=.22, sw_angle=82, couplerWidth=.5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "f(radius=12, couplerLength=2.5, gap=0.2, width=0.5, thickness=.22, sw_angle=82, couplerWidth=.5)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "As we can see it's hard to distinguish undercoupled from overcoupled regimes, so\n", - "we plot both amplitude and phase." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import numpy as np\n", - "from SiPANN import nn\n", - "\n", - "wavelength = np.squeeze(np.linspace(1.5,1.6,5000))\n", - "\n", - "def f(radius,couplerLength,gap,width,thickness,sw_angle,couplerWidth):\n", - " \"\"\" units in um\n", - " \"\"\"\n", - " E, alpha, t, alpha_s, _ = nn.racetrack_AP_RR_TF(wavelength,\n", - " widthCoupler=couplerWidth,\n", - " radius=radius,\n", - " sw_angle=sw_angle,\n", - " couplerLength=couplerLength,\n", - " gap=gap,\n", - " width=width,\n", - " thickness=thickness)\n", - "\n", - "\n", - " f, (ax1, ax2) = plt.subplots(2, 1, sharex=True)\n", - " # Evaluate response\n", - " input = np.squeeze([1,0])\n", - " throughPort = 10*np.log10(np.abs(np.squeeze(E)) ** 2)\n", - " throughPort_angle = np.unwrap(np.angle(np.squeeze(E)))\n", - "\n", - " ax1.plot(wavelength, (throughPort), label='Through Port')\n", - " ax1.set_ylabel('Power (dB)')\n", - " ax1.grid()\n", - " \n", - " ax2.plot(wavelength, (throughPort_angle), label='Through Port')\n", - " \n", - " plt.xlabel('Wavelength ($\\mu$m)')\n", - " plt.ylabel('Angle (rad)')\n", - " plt.grid(True)\n", - " #plt.legend()\n", - " ax1.set_ylim(-30, 0.1)\n", - " #plt.xlim(1.55,1.56)\n", - " plt.tight_layout()\n", - " ax1.set_title(f'couplerLength = {couplerLength}')\n", - "\n", - " plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "f(radius=12, couplerLength=4.5, gap=0.2, width=0.5, thickness=.22, sw_angle=82, couplerWidth=.5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "f(radius=12, couplerLength=2.5, gap=0.2, width=0.5, thickness=.22, sw_angle=82, couplerWidth=.5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "f(radius=12, couplerLength=6.5, gap=0.2, width=0.5, thickness=.22, sw_angle=82, couplerWidth=.5)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Spirals for waveguide loss\n", - "\n", - "For measuring waveguide loss for different wavelengths we added 3 spirals with\n", - "different length" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "N = 15\n", - "radius = 15\n", - "\n", - "s1 = gf.components.spiral_external_io(\n", - " N=N,\n", - " radius=radius,\n", - " y_straight_inner_top=0,\n", - " x_inner_length_cutback=0,\n", - ")\n", - "\n", - "s2 = gf.components.spiral_external_io(\n", - " N=N,\n", - " radius=radius,\n", - " y_straight_inner_top=30,\n", - " x_inner_length_cutback=85,\n", - ")\n", - "\n", - "print(f\"spiral 1 length = {s1.info['length']/1e4:.2f} cm\")\n", - "s1" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(f\"spiral 2 length = {s2.info['length']/1e4:.2f} cm\")\n", - "s2" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## References\n", - "\n", - "- [1] “Gdsfactory — gdsfactory documentation.” [Online]. Available:\n", - "https://gdsfactory.readthedocs.io/en/latest/.\n", - "- [2] “Simphony Documentation — Simphony Manual.” [Online]. Available:\n", - "https://simphonyphotonics.readthedocs/io/en/latest/.\n", - "- [3] “SiPANN documentation.” [Online]. Available:\n", - "https://sipann.readthedocs.io/en/latest/.\n", - "- [4] Y. Xing, J. Dong, S. Dwivedi, U. Khan, and W. Bogaerts, “Accurate\n", - "extraction of fabricated geometry using optical measurement,” Photonics\n", - "Research, vol. 6, no. 11, p. 1008, 2018, doi: 10.1364/prj.6.001008.\n", - "- [5] Z. Lu et al., “Performance prediction for silicon photonics integrated\n", - "circuits with layout-dependent correlated manufacturing variability,” Optics\n", - "Express, vol. 25, no. 9, p. 9712, 2017, doi: 10.1364/oe.25.009712.\n", - "- [6] [Modes documentation](https://modes.readthedocs.io/en/latest/index.html)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.5" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/ubcpdk/samples/report/Makefile b/ubcpdk/samples/report/Makefile deleted file mode 100644 index 619f4143..00000000 --- a/ubcpdk/samples/report/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -md: - jupyter nbconvert --to markdown report.ipynb - -pdf: - pandoc --highlight=tango --filter pandoc-crossref --filter pandoc-citeproc --csl ieee.csl --bibliography=library.bib JoaquinMatres.md -o JoaquinMatres.pdf - -open: - zathura report.pdf - -pdfc: - jupyter nbconvert --to pdf report.ipynb - -bib: - cp $(HOME)/wikis/library.bib . - - -execute: - jupyter nbconvert --to notebook --execute my_notebook.ipynb - - -clean: - rm *.aux *.tex *.log *.odt *.blg *.out *.html *.json *.epub *.docx *.latex - - -.PHONY: all clean paper diff --git a/ubcpdk/samples/report/ieee.csl b/ubcpdk/samples/report/ieee.csl deleted file mode 100644 index 861bf350..00000000 --- a/ubcpdk/samples/report/ieee.csl +++ /dev/null @@ -1,387 +0,0 @@ - - - diff --git a/ubcpdk/samples/report/requirements.txt b/ubcpdk/samples/report/requirements.txt deleted file mode 100644 index d20f11cc..00000000 --- a/ubcpdk/samples/report/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -modes -SiPANN diff --git a/ubcpdk/samples/report/splitter_length.py b/ubcpdk/samples/report/splitter_length.py deleted file mode 100644 index d0d9ceeb..00000000 --- a/ubcpdk/samples/report/splitter_length.py +++ /dev/null @@ -1,43 +0,0 @@ -"""Equations for MZI. - -w = 1.55 -io/ii = 1/2*(1+cos(beta*dl)) -beta = 2*np.pi*n/w - -beta*l = np.pi -beta = 2*np.pi*n/w - -2*np.pi*n*l/w = np.pi -l = w/2/n -l = np.pi/beta -""" -import numpy as np - - -def get_pi_length(w: float = 1.55, n: float = 2.4) -> float: - return w / 2 / n - - -def get_length(power_per_cent: float = 80, w: float = 1.55, n: float = 2.4) -> float: - """Returns length for a MZI based variable. - - io/ii = 1/2*(1+cos(beta*dl)) = sqrt(power_per_cent) - 1+cos(beta*dl) = 2* power_per_cent - cos(beta*dl) = 2* power_per_cent - 1 - beta*dl = np.arcos(2* power_per_cent - 1) - dl = (np.arcos(2* power_per_cent - 1))/beta - - .. code:: - L+dl - ______ - input __| |__ output - ===____________== - L - """ - beta = 2 * np.pi * n / w - return (np.arccos(2 * power_per_cent / 100 - 1)) / beta - - -if __name__ == "__main__": - # print(get_pi_length()) - print(get_length() * 1e3) diff --git a/ubcpdk/simulation/circuits_simphony.py b/ubcpdk/simulation/circuits_simphony.py deleted file mode 100644 index c640ab6c..00000000 --- a/ubcpdk/simulation/circuits_simphony.py +++ /dev/null @@ -1,68 +0,0 @@ -from functools import partial - -import gdsfactory.simulation.simphony as gs -from simphony.libraries import siepic - - -def ebeam_y_1550(**kwargs): - c = siepic.YBranch(**kwargs) - c.rename_pins("o1", "o2", "o3") - return c - - -def ebeam_bdc_te1550(**kwargs): - c = siepic.BidirectionalCoupler(**kwargs) - c.rename_pins("o1", "o2", "o4", "o3") - return c - - -def ebeam_dc_halfring_straight(**kwargs): - c = siepic.HalfRing(**kwargs) - c.rename_pins("o1", "o2", "o4", "o3") - return c - - -def ebeam_dc_te1550(**kwargs): - c = siepic.DirectionalCoupler(**kwargs) - c.rename_pins("o1", "o2", "o4", "o3") - return c - - -def ebeam_gc_te1550(**kwargs): - c = siepic.GratingCoupler(**kwargs) - c.rename_pins("o1", "o2") - return c - - -def ebeam_terminator_te1550(**kwargs): - c = siepic.Terminator(**kwargs) - c.rename_pins( - "o1", - ) - return c - - -mzi = partial( - gs.components.mzi, - splitter=ebeam_y_1550, -) - - -model_factory = dict( - ebeam_y_1550=ebeam_y_1550, - ebeam_bdc_te1550=ebeam_bdc_te1550, - ebeam_dc_halfring_straight=ebeam_dc_halfring_straight, - ebeam_dc_te1550=ebeam_dc_te1550, - ebeam_gc_te1550=ebeam_gc_te1550, - ebeam_terminator_te1550=ebeam_terminator_te1550, -) - -circuit_factory = dict(mzi=mzi) - - -if __name__ == "__main__": - # from gdsfactory.simulation.simphony.plot_circuit import plot_circuit - # c = mzi() - # plot_circuit(c) - - gs.plot_model(ebeam_gc_te1550) diff --git a/ubcpdk/simulation/modes_waveguide.py b/ubcpdk/simulation/modes_waveguide.py index 09c1aef1..1526624b 100644 --- a/ubcpdk/simulation/modes_waveguide.py +++ b/ubcpdk/simulation/modes_waveguide.py @@ -1,7 +1,7 @@ """MPB mode simulations.""" import gdsfactory as gf -import gdsfactory.simulation.modes as gm +import gplugins.modes as gm from ubcpdk.config import PATH From 164818aa581b410a549c82f25526f0f14ea4e06d Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sat, 5 Aug 2023 19:57:25 -0700 Subject: [PATCH 3/8] update upload artifact --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 0ef49a9c..7eb9732e 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -35,7 +35,7 @@ jobs: make dev plugins make docs - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v2 with: path: "./docs/_build/html/" From 471093e94caa560dff21ab14e2fe3a112902e069 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sat, 5 Aug 2023 20:04:52 -0700 Subject: [PATCH 4/8] modernize type annotations --- .github/write_components_autodoc.py | 4 +- .github/write_components_plot.py | 11 +- .github/write_components_plot_klayout.py | 11 +- .pre-commit-config.yaml | 11 +- CHANGELOG.md | 5 +- Makefile | 4 +- install_tech.py | 4 +- pyproject.toml | 165 ++++++++---------- tests/test_components.py | 6 +- ubcpdk/__init__.py | 9 +- ubcpdk/components.py | 15 +- ubcpdk/config.py | 1 - ubcpdk/data/find_bandwidth.py | 2 +- ubcpdk/data/read_mat.py | 5 +- ubcpdk/data/remove_baseline.py | 2 + ubcpdk/data/windowed_mean.py | 5 +- ubcpdk/import_gds.py | 14 +- ubcpdk/import_pdk.py | 2 +- ubcpdk/samples/notebooks/11_sparameters.py | 3 +- .../notebooks/11_sparameters_gratings.py | 10 +- .../notebooks/12_sim_plugins_tidy3d.py | 13 +- ubcpdk/samples/notebooks/13_sim_plugins.py | 14 +- ubcpdk/samples/notebooks/14_sax_tidy3d.py | 11 +- .../notebooks/21_schematic_driven_layout.py | 10 +- .../samples/notebooks/31_data_analysis_mzi.py | 1 + .../notebooks/32_data_analysis_ring.py | 1 + .../samples/notebooks/33_data_analysis_dbr.py | 4 +- ubcpdk/samples/test_masks.py | 4 +- ubcpdk/samples/ubc_helge.py | 2 +- ubcpdk/samples/ubc_joaquin_matres1.py | 5 +- ubcpdk/samples/ubc_simon.py | 16 +- ubcpdk/samples/write_mask.py | 9 +- ubcpdk/simulation/circuits/mzi_spectrum.py | 1 + ubcpdk/simulation/modes_waveguide.py | 2 +- ubcpdk/tech.py | 9 +- 35 files changed, 176 insertions(+), 215 deletions(-) diff --git a/.github/write_components_autodoc.py b/.github/write_components_autodoc.py index b76efe8d..72c22d53 100644 --- a/.github/write_components_autodoc.py +++ b/.github/write_components_autodoc.py @@ -1,8 +1,8 @@ import inspect + import ubcpdk from ubcpdk.config import PATH - filepath = PATH.repo / "docs" / "components.rst" skip = { @@ -51,7 +51,7 @@ [ f"{p}={repr(sig.parameters[p].default)}" for p in sig.parameters - if isinstance(sig.parameters[p].default, (int, float, str, tuple)) + if isinstance(sig.parameters[p].default, int | float | str | tuple) and p not in skip_settings ] ) diff --git a/.github/write_components_plot.py b/.github/write_components_plot.py index 0c6b2ea0..8ad6bdcd 100644 --- a/.github/write_components_plot.py +++ b/.github/write_components_plot.py @@ -1,8 +1,7 @@ -from typing import Tuple import inspect -from ubcpdk.config import PATH -from ubcpdk import cells +from ubcpdk import cells +from ubcpdk.config import PATH filepath = PATH.repo / "docs" / "components_plot.rst" @@ -20,8 +19,8 @@ "waveguide_template", } -skip_plot: Tuple[str, ...] = ("add_fiber_array_siepic",) -skip_settings: Tuple[str, ...] = ("flatten", "safe_cell_names") +skip_plot: tuple[str, ...] = ("add_fiber_array_siepic",) +skip_settings: tuple[str, ...] = ("flatten", "safe_cell_names") with open(filepath, "w+") as f: @@ -45,7 +44,7 @@ [ f"{p}={repr(sig.parameters[p].default)}" for p in sig.parameters - if isinstance(sig.parameters[p].default, (int, float, str, tuple)) + if isinstance(sig.parameters[p].default, int | float | str | tuple) and p not in skip_settings ] ) diff --git a/.github/write_components_plot_klayout.py b/.github/write_components_plot_klayout.py index c3f9feb9..57d57a5c 100644 --- a/.github/write_components_plot_klayout.py +++ b/.github/write_components_plot_klayout.py @@ -1,8 +1,7 @@ -from typing import Tuple import inspect -from ubcpdk.config import PATH -from ubcpdk import cells +from ubcpdk import cells +from ubcpdk.config import PATH filepath = PATH.repo / "docs" / "components_plot.rst" @@ -20,8 +19,8 @@ "waveguide_template", } -skip_plot: Tuple[str, ...] = ("add_fiber_array_siepic",) -skip_settings: Tuple[str, ...] = ("flatten", "safe_cell_names") +skip_plot: tuple[str, ...] = ("add_fiber_array_siepic",) +skip_settings: tuple[str, ...] = ("flatten", "safe_cell_names") with open(filepath, "w+") as f: @@ -45,7 +44,7 @@ [ f"{p}={repr(sig.parameters[p].default)}" for p in sig.parameters - if isinstance(sig.parameters[p].default, (int, float, str, tuple)) + if isinstance(sig.parameters[p].default, int | float | str | tuple) and p not in skip_settings ] ) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 430965ae..7767172a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,12 +7,6 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - id: requirements-txt-fixer - - repo: https://github.com/pycqa/isort - rev: 7b69d092ae4885dcc45648538ae780a6326bcd1e - hooks: - - id: isort - files: ubcdpk/.* - args: [--profile, black, --filter-files] - repo: https://github.com/psf/black rev: 25d886f52c2bbbb58386ac8050f4e67952507bc7 @@ -23,3 +17,8 @@ repos: rev: "6a0ba1854991b693612486cc84a2254de82d071d" hooks: - id: ruff + - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.10.0 + hooks: + - id: pretty-format-toml + args: [--autofix] diff --git a/CHANGELOG.md b/CHANGELOG.md index e475360b..72ece472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,8 @@ # Changelog -## [2.0.0](https://github.com/gdsfactory/ubc/pull/204) - -- update to gdsfactory 7 +## [2.0.0](https://github.com/gdsfactory/ubc/pull/291) +- update to gdsfactory 7.0.2 ## [1.21.0](https://github.com/gdsfactory/ubc/pull/203) diff --git a/Makefile b/Makefile index 95402ad9..681b0def 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ install: dev: pip install -e .[dev,docs] -update: - pre-commit autoupdate --bleeding-edge +update-pre: + pre-commit autoupdate watch: gf watch ubcpdk diff --git a/install_tech.py b/install_tech.py index 42f63d32..658cb5dc 100644 --- a/install_tech.py +++ b/install_tech.py @@ -1,8 +1,8 @@ """Symlink tech to klayout.""" -import sys import os -import shutil import pathlib +import shutil +import sys def remove_path_or_dir(dest: pathlib.Path): diff --git a/pyproject.toml b/pyproject.toml index 60daef38..1f7f3bac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,52 +1,47 @@ # https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html + [build-system] -requires = ["flit_core >=3.2,<4"] build-backend = "flit_core.buildapi" +requires = ["flit_core >=3.2,<4"] [project] -name="ubcpdk" -description="ubcpdk pdk" +authors = [ + {name = "gdsfactory", email = "contact@gdsfactory.com"} +] classifiers = [ - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Operating System :: OS Independent", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Operating System :: OS Independent" ] -version="1.21.3" -authors = [ - {name = "gdsfactory", email = "contact@gdsfactory.com"}, +dependencies = [ + "gdsfactory==7.0.2", + "gplugins[tidy3d]>=0.0.3,<0.1.0" ] +description = "ubcpdk pdk" keywords = ["python"] license = {file = "LICENSE"} -dependencies = [ - "gdsfactory==7.0.2", - "gplugins[tidy3d]>=0.0.3,<0.1.0", -] +name = "ubcpdk" readme = "README.md" requires-python = ">=3.10" +version = "1.21.3" [project.optional-dependencies] -full = [ - "femwell" - ] dev = [ - "pytest", - "pytest-cov", - "pytest_regressions", - ] + "pytest", + "pytest-cov", + "pytest_regressions" +] docs = [ "autodoc_pydantic", "jupytext", - "jupyter-book==0.15.1", - ] - -[tool.setuptools.packages] -find = {} + "jupyter-book==0.15.1" +] +full = [ + "femwell" +] [tool.black] -line-length = 88 -target-version = ['py310'] -include = '\.pyi?$' exclude = ''' # Specify the files/dirs that should be ignored by the black formatter /( \.eggs @@ -62,83 +57,63 @@ exclude = ''' # Specify the files/dirs that should be ignored by the black form | dist )/ ''' - -[tool.pytest.ini_options] -testpaths = ["tests"] -# testpaths = ["ubcpdk/samples", "tests"] -# addopts = --tb=no -# addopts = '--tb=short' -# python_files = ["ubcpdk/samples*.py", "tests/*.py"] -python_files = ["tests/*.py"] -# norecursedirs = ["extra/*.py", 'ubcdpk/simulations/*.py'] - -[tool.flake8] -max-line-length = 88 -max-complexity = 57 -select = ["B","C","E","F","W","T4","B9"] -ignore = [ "E501", "E503", "E722", "W503", "W503", "E203", "B950", "B305", "B018", "B902", "B020", "B905"] -extend-ignore = "RST303" - -exclude = [ - ".git", - "__pycache__", - "lib", - "docs/source/conf.py", - "build", - "dist", - ".ipynb_checkpoints", - ".tox", - "extra", - "deprecated", - ".mypy_cache", - "venv", - "devsim", - ] - -[tool.commitizen] -name = "cz_conventional_commits" -version = "0.1.0" -version_files = [ - "pyproject.toml:version", -] +include = '\.pyi?$' +line-length = 88 +target-version = ['py310'] [tool.mypy] python_version = "3.10" strict = true +[tool.pydocstyle] +add-ignore = ["D100", "D101", "D102", "D103", "D104", "D203", "D405", "D417"] +convention = "google" +inherit = false +match = "(?!test).*\\.py" + [tool.pylsp-mypy] enabled = true live_mode = true strict = true -[tool.isort] -multi_line_output = 3 -line_length = 88 -include_trailing_comma = true - -[tool.setuptools.package-data] -mypkg = ["*.csv", "*.yaml"] - -[tool.pydocstyle] -inherit = false -match = "(?!test).*\\.py" -add-ignore = ["D100","D101","D102","D103","D104","D203","D405","D417"] -convention = "google" +[tool.pytest.ini_options] +# testpaths = ["ubcpdk/samples", "tests"] +# addopts = --tb=no +# addopts = '--tb=short' +# python_files = ["ubcpdk/samples*.py", "tests/*.py"] +python_files = ["tests/*.py"] +testpaths = ["tests"] [tool.ruff] -select = [ - "E", # pycodestyle errors - "W", # pycodestyle warnings - "F", # pyflakes - # "I", # isort - "C", # flake8-comprehensions - "B", # flake8-bugbear -] +extend-exclude = ["docs/notebooks"] ignore = [ - "E501", # line too long, handled by black - "B008", # do not perform function calls in argument defaults - "C901", # too complex - "B905", # `zip()` without an explicit `strict=` parameter - "C408", # C408 Unnecessary `dict` call (rewrite as a literal) + "E501", # line too long, handled by black + "B008", # do not perform function calls in argument defaults + "C901", # too complex + "B905", # `zip()` without an explicit `strict=` parameter + "C408" # C408 Unnecessary `dict` call (rewrite as a literal) ] -extend-exclude = ["docs/notebooks"] +select = [ + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # pyflakes + "I", # isort + "C", # flake8-comprehensions + "B", # flake8-bugbear + "UP" +] + +[tool.ruff.per-file-ignores] +"ubcpdk/samples/notebooks/11_sparameters.py" = ['E402'] +"ubcpdk/samples/notebooks/12_sim_plugins_tidy3d.py" = ['E402'] +"ubcpdk/samples/notebooks/13_sim_plugins.py" = ['E402'] +"ubcpdk/samples/notebooks/14_sax_tidy3d.py" = ['E402'] +"ubcpdk/samples/notebooks/21_schematic_driven_layout.py" = ['E402'] +"ubcpdk/samples/notebooks/31_data_analysis_mzi.py" = ['E402'] +"ubcpdk/samples/notebooks/33_data_analysis_dbr.py" = ['E402'] + +[tool.setuptools.package-data] +mypkg = ["*.csv", "*.yaml"] + +[tool.setuptools.packages] +find = {} diff --git a/tests/test_components.py b/tests/test_components.py index cf7a091f..88522e41 100644 --- a/tests/test_components.py +++ b/tests/test_components.py @@ -1,11 +1,11 @@ import pathlib -import pytest -from pytest_regressions.data_regression import DataRegressionFixture +import pytest from gdsfactory.component import Component from gdsfactory.difftest import difftest -from ubcpdk import cells +from pytest_regressions.data_regression import DataRegressionFixture +from ubcpdk import cells skip_test = { "add_siepic_labels", diff --git a/ubcpdk/__init__.py b/ubcpdk/__init__.py index 45b3ecbd..8cfebc34 100644 --- a/ubcpdk/__init__.py +++ b/ubcpdk/__init__.py @@ -6,14 +6,9 @@ from gdsfactory.get_factories import get_cells from gdsfactory.pdk import Pdk +from ubcpdk import components, data, tech from ubcpdk.config import CONFIG, PATH, module -from ubcpdk.tech import LAYER, strip, LAYER_STACK, LAYER_VIEWS -from ubcpdk import components -from ubcpdk import tech -from ubcpdk import data - -from ubcpdk.tech import cross_sections - +from ubcpdk.tech import LAYER, LAYER_STACK, LAYER_VIEWS, cross_sections, strip __version__ = "1.21.3" diff --git a/ubcpdk/components.py b/ubcpdk/components.py index 963d473c..6ae929a5 100644 --- a/ubcpdk/components.py +++ b/ubcpdk/components.py @@ -1,30 +1,31 @@ """Cells imported from the PDK.""" from functools import partial + import gdsfactory as gf +from gdsfactory import Component from gdsfactory.typings import ( Callable, ComponentReference, ComponentSpec, CrossSectionSpec, + Label, LayerSpec, List, Optional, Port, Tuple, - Label, ) -from gdsfactory import Component -from ubcpdk.config import CONFIG -from ubcpdk.import_gds import import_gds, import_gc from ubcpdk import tech +from ubcpdk.config import CONFIG +from ubcpdk.import_gds import import_gc, import_gds from ubcpdk.tech import ( - strip, - LAYER_STACK, LAYER, + LAYER_STACK, add_pins_bbox_siepic, add_pins_bbox_siepic_remove_layers, add_pins_siepic_metal, + strip, ) um = 1e-6 @@ -432,7 +433,7 @@ def get_input_label_text( "TM", ], f"Not valid polarization {polarization.upper()!r} in [TE, TM]" assert ( - isinstance(wavelength, (int, float)) and 1.0 < wavelength < 2.0 + isinstance(wavelength, int | float) and 1.0 < wavelength < 2.0 ), f"{wavelength} is Not valid 1000 < wavelength < 2000" name = component_name or port.parent.metadata_child.get("name") diff --git a/ubcpdk/config.py b/ubcpdk/config.py index ef71e406..5d712a35 100644 --- a/ubcpdk/config.py +++ b/ubcpdk/config.py @@ -10,7 +10,6 @@ from omegaconf import OmegaConf - default_config = io.StringIO( """ username: JoaquinMatres diff --git a/ubcpdk/data/find_bandwidth.py b/ubcpdk/data/find_bandwidth.py index 6f4f7dff..b023e216 100644 --- a/ubcpdk/data/find_bandwidth.py +++ b/ubcpdk/data/find_bandwidth.py @@ -41,8 +41,8 @@ def plot_bandwidth(x, y, threshold: float = 3) -> None: if __name__ == "__main__": - from ubcpdk.data.dbr import dbrs from ubcpdk.data.chop import chop + from ubcpdk.data.dbr import dbrs from ubcpdk.data.read_mat import read_mat w, p = read_mat(dbrs["1_5"], port=1) diff --git a/ubcpdk/data/read_mat.py b/ubcpdk/data/read_mat.py index 32bd4c1b..57db56ef 100644 --- a/ubcpdk/data/read_mat.py +++ b/ubcpdk/data/read_mat.py @@ -1,6 +1,6 @@ -from gdsfactory.typings import Tuple, PathType -from scipy.io import loadmat import numpy as np +from gdsfactory.typings import PathType, Tuple +from scipy.io import loadmat def read_mat(filename: PathType, port: int = 0) -> Tuple[np.ndarray, np.ndarray]: @@ -28,6 +28,7 @@ def read_mat(filename: PathType, port: int = 0) -> Tuple[np.ndarray, np.ndarray] if __name__ == "__main__": import matplotlib.pyplot as plt + import ubcpdk w, p = read_mat(ubcpdk.PATH.mzi1) diff --git a/ubcpdk/data/remove_baseline.py b/ubcpdk/data/remove_baseline.py index 5025640e..e208ab1a 100644 --- a/ubcpdk/data/remove_baseline.py +++ b/ubcpdk/data/remove_baseline.py @@ -1,4 +1,5 @@ import numpy as np + from ubcpdk.data.read_mat import read_mat @@ -17,6 +18,7 @@ def remove_baseline(wavelength: np.ndarray, power: np.ndarray, deg: int = 4): if __name__ == "__main__": import matplotlib.pyplot as plt + import ubcpdk w, p = read_mat(ubcpdk.PATH.mzi1) diff --git a/ubcpdk/data/windowed_mean.py b/ubcpdk/data/windowed_mean.py index 1d881a7a..d6607241 100644 --- a/ubcpdk/data/windowed_mean.py +++ b/ubcpdk/data/windowed_mean.py @@ -16,10 +16,11 @@ def windowed_mean(data: np.array, n: int = 60) -> np.array: if __name__ == "__main__": - from ubcpdk.data.read_mat import read_mat - from ubcpdk.config import PATH import matplotlib.pyplot as plt + from ubcpdk.config import PATH + from ubcpdk.data.read_mat import read_mat + wavelength, power = read_mat(PATH.ring_te_r3_g100) power_envelope = windowed_mean(power, 60) plt.plot(wavelength, power, label="power") diff --git a/ubcpdk/import_gds.py b/ubcpdk/import_gds.py index 91519fa8..05269b67 100644 --- a/ubcpdk/import_gds.py +++ b/ubcpdk/import_gds.py @@ -1,14 +1,10 @@ -from typing import Optional - -from numpy import ndarray -from numpy import arctan2, degrees, isclose - import gdsfactory as gf from gdsfactory.component import Component from gdsfactory.typings import LayerSpec -from ubcpdk.tech import LAYER -from ubcpdk.config import PATH +from numpy import arctan2, degrees, isclose, ndarray +from ubcpdk.config import PATH +from ubcpdk.tech import LAYER layer = LAYER.WG port_width = 0.5 @@ -80,9 +76,9 @@ def add_ports(component: Component) -> Component: def add_ports_from_siepic_pins( component: Component, pin_layer_optical: LayerSpec = "PORT", - port_layer_optical: Optional[LayerSpec] = None, + port_layer_optical: LayerSpec | None = None, pin_layer_electrical: LayerSpec = "PORTE", - port_layer_electrical: Optional[LayerSpec] = None, + port_layer_electrical: LayerSpec | None = None, ) -> Component: """Add ports from SiEPIC-type cells, where the pins are defined as paths. diff --git a/ubcpdk/import_pdk.py b/ubcpdk/import_pdk.py index df4ce341..fea688dc 100644 --- a/ubcpdk/import_pdk.py +++ b/ubcpdk/import_pdk.py @@ -1,6 +1,6 @@ import gdsfactory as gf -from ubcpdk.config import PATH +from ubcpdk.config import PATH if __name__ == "__main__": print( diff --git a/ubcpdk/samples/notebooks/11_sparameters.py b/ubcpdk/samples/notebooks/11_sparameters.py index 9f596423..5ff0a782 100644 --- a/ubcpdk/samples/notebooks/11_sparameters.py +++ b/ubcpdk/samples/notebooks/11_sparameters.py @@ -33,7 +33,6 @@ import ubcpdk.components as pdk from ubcpdk.config import PATH - # %% c = pdk.ebeam_y_1550() c.plot() @@ -63,6 +62,7 @@ # %% import gplugins as sim + import ubcpdk.components as pdk # %% @@ -95,7 +95,6 @@ # The resolution is in pixels/um so you need to run with at least `resolution=100` for 1/100 um/pixel (10 nm/ pixel). # %% -import gdsfactory as gf import gplugins.gmeep as gm # %% diff --git a/ubcpdk/samples/notebooks/11_sparameters_gratings.py b/ubcpdk/samples/notebooks/11_sparameters_gratings.py index 8cff546a..d0914a8b 100644 --- a/ubcpdk/samples/notebooks/11_sparameters_gratings.py +++ b/ubcpdk/samples/notebooks/11_sparameters_gratings.py @@ -23,10 +23,10 @@ # ## tidy3d # %% -import numpy as np +import gplugins.gtidy3d as gt import matplotlib.pyplot as plt +import numpy as np -import gplugins.gtidy3d as gt import ubcpdk.components as pdk from ubcpdk.config import PATH @@ -66,7 +66,11 @@ def log(x): # %% for offset in offsets: sp = gt.write_sparameters_grating_coupler( - c, is_3d=False, fiber_angle_deg=fiber_angle_deg, fiber_xoffset=offset, dirpath=PATH.sparameters + c, + is_3d=False, + fiber_angle_deg=fiber_angle_deg, + fiber_xoffset=offset, + dirpath=PATH.sparameters, ) plt.plot( sp["wavelengths"], diff --git a/ubcpdk/samples/notebooks/12_sim_plugins_tidy3d.py b/ubcpdk/samples/notebooks/12_sim_plugins_tidy3d.py index 8de5814c..33732332 100644 --- a/ubcpdk/samples/notebooks/12_sim_plugins_tidy3d.py +++ b/ubcpdk/samples/notebooks/12_sim_plugins_tidy3d.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: @@ -40,12 +39,11 @@ # ![cloud_model](https://i.imgur.com/5VTCPLR.png) # %% -import gplugins as sim import gdsfactory as gf +import gplugins as sim import gplugins.gtidy3d as gt -import ubcpdk.components as pdk -from ubcpdk.config import PATH +import ubcpdk.components as pdk # %% c = pdk.ebeam_y_1550() @@ -69,14 +67,13 @@ mzi10.plot() # %% +import gdsfactory as gf +import gplugins.sax as gsax +import jax.numpy as jnp import matplotlib.pyplot as plt import numpy as np -import jax.numpy as jnp import sax -import gdsfactory as gf -import gplugins.sax as gsax - # %% def straight(wl=1.5, length=10.0, neff=2.4) -> sax.SDict: diff --git a/ubcpdk/samples/notebooks/13_sim_plugins.py b/ubcpdk/samples/notebooks/13_sim_plugins.py index 3c07d340..9def6ad6 100644 --- a/ubcpdk/samples/notebooks/13_sim_plugins.py +++ b/ubcpdk/samples/notebooks/13_sim_plugins.py @@ -25,9 +25,9 @@ # ## MEEP FDTD # + -import gplugins.gmeep as gm -import gplugins as sim import gdsfactory as gf +import gplugins as sim +import gplugins.gmeep as gm import ubcpdk as pdk @@ -131,6 +131,7 @@ # + from gplugins.add_simulation_markers import add_simulation_markers + import ubcpdk as pdk y = pdk.components.ebeam_y_1550() @@ -157,15 +158,14 @@ mzi10 # + +import gdsfactory as gf +import gplugins.gmeep as gm +import gplugins.sax as gsax +import jax.numpy as jnp import matplotlib.pyplot as plt import numpy as np -import jax.numpy as jnp import sax -import gdsfactory as gf -import gplugins.sax as gsax -import gplugins.gmeep as gm - import ubcpdk as pdk # - diff --git a/ubcpdk/samples/notebooks/14_sax_tidy3d.py b/ubcpdk/samples/notebooks/14_sax_tidy3d.py index 5072e53a..67a55cf8 100644 --- a/ubcpdk/samples/notebooks/14_sax_tidy3d.py +++ b/ubcpdk/samples/notebooks/14_sax_tidy3d.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: @@ -29,16 +28,15 @@ # %% from pprint import pprint -import numpy as np -import matplotlib.pyplot as plt -import jax.numpy as jnp import gdsfactory as gf +import gplugins.gtidy3d as gt import gplugins.sax as gs +import jax.numpy as jnp +import matplotlib.pyplot as plt +import numpy as np import sax -import gplugins.gtidy3d as gt - # %% [markdown] # ## Scatter *dictionaries* # @@ -188,7 +186,6 @@ def waveguide(wl=1.55, wl0=1.55, neff=2.34, ng=3.4, length=10.0, loss=0.0) -> sa cp.plot_field(field_name="Ex", mode_index=1) # odd mode - # %% [markdown] # For a 200nm gap the effective index difference `dn` is `0.026`, which means that there is 100% power coupling over 29.4 diff --git a/ubcpdk/samples/notebooks/21_schematic_driven_layout.py b/ubcpdk/samples/notebooks/21_schematic_driven_layout.py index 5d926e87..3d689018 100644 --- a/ubcpdk/samples/notebooks/21_schematic_driven_layout.py +++ b/ubcpdk/samples/notebooks/21_schematic_driven_layout.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: @@ -22,11 +21,10 @@ # The Jupyter notebook interface allows you to get the best of both worlds of GUI and python driven based flows. # %% -from bokeh.io import output_notebook - import gdsfactory as gf -from gplugins.schematic_editor import SchematicEditor +from bokeh.io import output_notebook from gdsfactory.config import rich_output +from gplugins.schematic_editor import SchematicEditor # %env BOKEH_ALLOW_WS_ORIGIN=localhost:8888 @@ -159,10 +157,10 @@ # ## Circuit simulations # %% -import numpy as np -import matplotlib.pyplot as plt import gplugins.sax as gs import jax.numpy as jnp +import matplotlib.pyplot as plt +import numpy as np import sax netlist = c.get_netlist() diff --git a/ubcpdk/samples/notebooks/31_data_analysis_mzi.py b/ubcpdk/samples/notebooks/31_data_analysis_mzi.py index 59afcd6b..d6e1a753 100644 --- a/ubcpdk/samples/notebooks/31_data_analysis_mzi.py +++ b/ubcpdk/samples/notebooks/31_data_analysis_mzi.py @@ -68,6 +68,7 @@ # %% import matplotlib.pyplot as plt import numpy as np + import ubcpdk from ubcpdk.simulation.circuits.mzi_spectrum import mzi_spectrum diff --git a/ubcpdk/samples/notebooks/32_data_analysis_ring.py b/ubcpdk/samples/notebooks/32_data_analysis_ring.py index 1521e1c1..ae093241 100644 --- a/ubcpdk/samples/notebooks/32_data_analysis_ring.py +++ b/ubcpdk/samples/notebooks/32_data_analysis_ring.py @@ -32,6 +32,7 @@ # + attributes={"classes": [], "id": "", "n": "2"} import matplotlib.pyplot as plt + import ubcpdk # + attributes={"classes": [], "id": "", "n": "3"} diff --git a/ubcpdk/samples/notebooks/33_data_analysis_dbr.py b/ubcpdk/samples/notebooks/33_data_analysis_dbr.py index 9150cfb4..b2a9daf8 100644 --- a/ubcpdk/samples/notebooks/33_data_analysis_dbr.py +++ b/ubcpdk/samples/notebooks/33_data_analysis_dbr.py @@ -20,6 +20,7 @@ # + attributes={"classes": [], "id": "", "n": "2"} import matplotlib.pyplot as plt + import ubcpdk from ubcpdk.data.dbr import dbrs @@ -37,8 +38,9 @@ plt.xlim([1530, 1600]) # + -import numpy as np import matplotlib.pyplot as plt +import numpy as np + from ubcpdk import data from ubcpdk.data.dbr import dbrs diff --git a/ubcpdk/samples/test_masks.py b/ubcpdk/samples/test_masks.py index 9b74745a..28c77d78 100644 --- a/ubcpdk/samples/test_masks.py +++ b/ubcpdk/samples/test_masks.py @@ -1,10 +1,10 @@ """Write all mask for the course.""" import shutil -from ubcpdk.config import PATH -import ubcpdk.samples.ubc_joaquin_matres1 as m11 import ubcpdk.samples.ubc_helge as m12 +import ubcpdk.samples.ubc_joaquin_matres1 as m11 import ubcpdk.samples.ubc_simon as m13 +from ubcpdk.config import PATH def test_masks_2023_v1(): diff --git a/ubcpdk/samples/ubc_helge.py b/ubcpdk/samples/ubc_helge.py index 4147bfbd..7b714968 100644 --- a/ubcpdk/samples/ubc_helge.py +++ b/ubcpdk/samples/ubc_helge.py @@ -2,8 +2,8 @@ import ubcpdk import ubcpdk.components as pdk +from ubcpdk.samples.write_mask import pack, size, write_mask_gds_with_metadata from ubcpdk.tech import LAYER -from ubcpdk.samples.write_mask import write_mask_gds_with_metadata, pack, size add_gc = ubcpdk.components.add_fiber_array nm = 1e-3 diff --git a/ubcpdk/samples/ubc_joaquin_matres1.py b/ubcpdk/samples/ubc_joaquin_matres1.py index c495081b..0007b09b 100644 --- a/ubcpdk/samples/ubc_joaquin_matres1.py +++ b/ubcpdk/samples/ubc_joaquin_matres1.py @@ -4,11 +4,10 @@ import ubcpdk import ubcpdk.components as pdk - from ubcpdk import tech -from ubcpdk.tech import LAYER -from ubcpdk.samples.write_mask import write_mask_gds_with_metadata, add_gc, pack, size from ubcpdk.cutback_2x2 import cutback_2x2 +from ubcpdk.samples.write_mask import add_gc, pack, size, write_mask_gds_with_metadata +from ubcpdk.tech import LAYER def test_mask1(): diff --git a/ubcpdk/samples/ubc_simon.py b/ubcpdk/samples/ubc_simon.py index d885ef7b..91f34d64 100644 --- a/ubcpdk/samples/ubc_simon.py +++ b/ubcpdk/samples/ubc_simon.py @@ -1,20 +1,18 @@ """Sample mask for the edx course Q1 2023.""" -from typing import Optional, List - -import ubcpdk -import ubcpdk.components as pdk -from ubcpdk.tech import LAYER -from ubcpdk.samples.write_mask import write_mask_gds_with_metadata import gdsfactory as gf from gdsfactory.components.bend_euler import bend_euler from gdsfactory.components.coupler_ring import coupler_ring as _coupler_ring -from gdsfactory.components.via_stack import via_stack_heater_m3 from gdsfactory.components.straight import straight - +from gdsfactory.components.via_stack import via_stack_heater_m3 from gdsfactory.typings import ComponentSpec, CrossSectionSpec, Float2 +import ubcpdk +import ubcpdk.components as pdk +from ubcpdk.samples.write_mask import write_mask_gds_with_metadata +from ubcpdk.tech import LAYER + via_stack_heater_m3_mini = gf.partial(via_stack_heater_m3, size=(4, 4)) @@ -35,7 +33,7 @@ def ring_single_heater( cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal", cross_section: CrossSectionSpec = "strip", via_stack: ComponentSpec = via_stack_heater_m3_mini, - port_orientation: Optional[List[float]] = (180, 0), + port_orientation: list[float] | None = (180, 0), via_stack_offset: Float2 = (0, 0), **kwargs, ) -> gf.Component: diff --git a/ubcpdk/samples/write_mask.py b/ubcpdk/samples/write_mask.py index e39050ad..8582479a 100644 --- a/ubcpdk/samples/write_mask.py +++ b/ubcpdk/samples/write_mask.py @@ -1,14 +1,13 @@ """Sample mask for the course.""" from functools import partial - -from typing import Tuple from pathlib import Path -from omegaconf import OmegaConf + import gdsfactory as gf +from omegaconf import OmegaConf import ubcpdk -from ubcpdk.tech import LAYER from ubcpdk.config import PATH +from ubcpdk.tech import LAYER size = (440, 470) add_gc = ubcpdk.components.add_fiber_array @@ -17,7 +16,7 @@ ) -def write_mask_gds_with_metadata(m) -> Tuple[Path, Path]: +def write_mask_gds_with_metadata(m) -> tuple[Path, Path]: """Returns""" gdspath = PATH.mask / f"{m.name}.gds" m.write_gds_with_metadata(gdspath=gdspath) diff --git a/ubcpdk/simulation/circuits/mzi_spectrum.py b/ubcpdk/simulation/circuits/mzi_spectrum.py index 6df7e88f..8a2d9b99 100644 --- a/ubcpdk/simulation/circuits/mzi_spectrum.py +++ b/ubcpdk/simulation/circuits/mzi_spectrum.py @@ -4,6 +4,7 @@ """ import numpy as np + from ubcpdk.simulation.circuits.waveguide import beta, neff, wavelength_um diff --git a/ubcpdk/simulation/modes_waveguide.py b/ubcpdk/simulation/modes_waveguide.py index 1526624b..6eff4bc4 100644 --- a/ubcpdk/simulation/modes_waveguide.py +++ b/ubcpdk/simulation/modes_waveguide.py @@ -2,8 +2,8 @@ import gdsfactory as gf import gplugins.modes as gm -from ubcpdk.config import PATH +from ubcpdk.config import PATH nm = 1e-3 diff --git a/ubcpdk/tech.py b/ubcpdk/tech.py index 56735a48..a4e2def0 100644 --- a/ubcpdk/tech.py +++ b/ubcpdk/tech.py @@ -7,14 +7,13 @@ import sys from functools import partial -from pydantic import BaseModel - import gdsfactory as gf -from gdsfactory.cross_section import get_cross_section_factories -from gdsfactory.technology import LayerStack, LayerLevel -from gdsfactory.typings import Layer, LayerSpec, Callable, LayerSpecs, Optional from gdsfactory.add_pins import add_pin_path from gdsfactory.component import Component +from gdsfactory.cross_section import get_cross_section_factories +from gdsfactory.technology import LayerLevel, LayerStack +from gdsfactory.typings import Callable, Layer, LayerSpec, LayerSpecs, Optional +from pydantic import BaseModel from ubcpdk.config import PATH From b52a5ceb6882653e3c3073c707413d68da3991e7 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sat, 5 Aug 2023 20:11:29 -0700 Subject: [PATCH 5/8] fix pre-commit --- .pre-commit-config.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7767172a..78c7e3a6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,8 +2,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: 9260cbc9c84c06022993bfbcc42fdbf0305c5b8e hooks: - - id: check-yaml - exclude: ^(conda\.recipe/meta\.yaml|conda_build/templates/.*\.yaml|docs/click/meta\.yaml|conda/meta\.yaml|construct.yaml) - id: end-of-file-fixer - id: trailing-whitespace - id: requirements-txt-fixer From 063714b1f418aa06ebd3a145815fc9f04d193cd5 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sat, 5 Aug 2023 20:18:03 -0700 Subject: [PATCH 6/8] README --- README.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/README.md b/README.md index aec812eb..3be7b854 100644 --- a/README.md +++ b/README.md @@ -48,18 +48,3 @@ python install_tech.py - Run notebooks on [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/gdsfactory/binder-sandbox/HEAD) - [UBCpdk docs](https://gdsfactory.github.io/ubc/) and [code](https://github.com/gdsfactory/ubc) - [gdsfactory docs](https://gdsfactory.github.io/gdsfactory/) - -## Acks - -UBCpdk top contributors: - -- Joaquin Matres (Google): maintainer of gdsfactory -- Thomas Dorch (Freedom Photonics): for Meep's material database access, MPB sidewall angles, and add_pin_path -- Lukas Chrostowski (UBC professor): creator of the course and maintainer of the PDK cells - -Links: - -- [UBC docs](https://gdsfactory.github.io/ubc/) and [repo](https://github.com/gdsfactory/ubc) -- [gdsfactory docs](https://gdsfactory.github.io/gdsfactory/) -- [edx course](https://www.edx.org/course/silicon-photonics-design-fabrication-and-data-ana) -- [awesome photonics list](https://github.com/joamatab/awesome_photonics) From b4568c6ee98f8b3b0e6f7501b01d340770b296c5 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sat, 5 Aug 2023 20:27:38 -0700 Subject: [PATCH 7/8] update tests --- .github/workflows/pages.yml | 12 +- .github/workflows/test_code.yml | 22 ++- Makefile | 63 -------- tests/test_components.py | 4 +- .../test_pdk_settings_add_fiber_array_.yml | 25 --- ..._pdk_settings_add_fiber_array_pads_rf_.yml | 121 --------------- .../test_pdk_settings_add_pads_dc_.yml | 121 --------------- .../test_pdk_settings_add_pads_rf_.yml | 121 --------------- .../test_pdk_settings_bend_.yml | 25 --- .../test_pdk_settings_bend_euler_.yml | 25 --- .../test_pdk_settings_bend_s_.yml | 25 --- .../test_pdk_settings_coupler_.yml | 49 ------ .../test_pdk_settings_coupler_ring_.yml | 49 ------ .../test_pdk_settings_dbg_.yml | 25 --- .../test_pdk_settings_dbr_cavity_.yml | 25 --- .../test_pdk_settings_dbr_cavity_te_.yml | 25 --- .../test_pdk_settings_ebeam_BondPad_.yml | 49 ------ ...t_pdk_settings_ebeam_adiabatic_te1550_.yml | 49 ------ ...t_pdk_settings_ebeam_adiabatic_tm1550_.yml | 49 ------ .../test_pdk_settings_ebeam_bdc_te1550_.yml | 49 ------ .../test_pdk_settings_ebeam_bdc_tm1550_.yml | 49 ------ .../test_pdk_settings_ebeam_crossing4_.yml | 49 ------ ...t_pdk_settings_ebeam_crossing4_2ports_.yml | 25 --- ...k_settings_ebeam_dc_halfring_straight_.yml | 49 ------ .../test_pdk_settings_ebeam_dc_te1550_.yml | 49 ------ ...s_ebeam_splitter_adiabatic_swg_te1550_.yml | 49 ------ ...ings_ebeam_splitter_swg_assist_te1310_.yml | 49 ------ ...ings_ebeam_splitter_swg_assist_te1550_.yml | 37 ----- ...st_pdk_settings_ebeam_swg_edgecoupler_.yml | 13 -- ..._pdk_settings_ebeam_terminator_te1310_.yml | 13 -- ..._pdk_settings_ebeam_terminator_te1550_.yml | 13 -- ..._pdk_settings_ebeam_terminator_tm1550_.yml | 13 -- .../test_pdk_settings_ebeam_y_1550_.yml | 37 ----- .../test_pdk_settings_ebeam_y_adiabatic_.yml | 37 ----- ...t_pdk_settings_ebeam_y_adiabatic_1310_.yml | 37 ----- ...pdk_settings_ebeam_y_adiabatic_tapers_.yml | 37 ----- .../test_pdk_settings_gc_te1310_.yml | 25 --- .../test_pdk_settings_gc_te1310_8deg_.yml | 25 --- ...test_pdk_settings_gc_te1310_broadband_.yml | 25 --- .../test_pdk_settings_gc_te1550_.yml | 25 --- .../test_pdk_settings_gc_te1550_90nmSlab_.yml | 25 --- ...test_pdk_settings_gc_te1550_broadband_.yml | 25 --- .../test_pdk_settings_gc_tm1550_.yml | 25 --- .../test_pdk_settings_metal_via_.yml | 49 ------ .../test_pdk_settings_mmi1x2_.yml | 37 ----- .../test_pdk_settings_mzi_.yml | 25 --- .../test_pdk_settings_mzi_heater_.yml | 121 --------------- .../test_pdk_settings_pad_array_.yml | 73 --------- ...s_photonic_wirebond_surfacetaper_1310_.yml | 13 -- ...s_photonic_wirebond_surfacetaper_1550_.yml | 13 -- .../test_pdk_settings_ring_double_heater_.yml | 145 ------------------ .../test_pdk_settings_ring_single_.yml | 25 --- .../test_pdk_settings_ring_single_heater_.yml | 121 --------------- .../test_pdk_settings_ring_with_crossing_.yml | 25 --- .../test_pdk_settings_spiral_.yml | 25 --- .../test_pdk_settings_straight_.yml | 25 --- .../test_pdk_settings_straight_one_pin_.yml | 25 --- .../test_pdk_settings_taper_.yml | 25 --- .../test_pdk_settings_terminator_short_.yml | 13 -- ...t_pdk_settings_thermal_phase_shifter0_.yml | 49 ------ ...t_pdk_settings_thermal_phase_shifter1_.yml | 49 ------ ...t_pdk_settings_thermal_phase_shifter2_.yml | 49 ------ ...t_pdk_settings_thermal_phase_shifter3_.yml | 49 ------ ...st_pdk_settings_via_stack_heater_mtop_.yml | 49 ------ ubcpdk/samples/notebooks/11_sparameters.py | 40 +---- 65 files changed, 19 insertions(+), 2690 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 7eb9732e..d426f2a0 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -12,15 +12,18 @@ jobs: name: Sphinx docs to gh-pages steps: - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + cache: "pip" + cache-dependency-path: pyproject.toml - uses: actions/cache@v3 with: path: | ~/.gdsfactory/ key: 0.0.1 restore-keys: 0.0.1 - - name: Add conda to system path - run: | - echo $CONDA/bin >> $GITHUB_PATH - name: Installing the library env: TIDY3D_USER: ${{ secrets.TIDY3D_EMAIL }} @@ -31,8 +34,7 @@ jobs: GDSFACTORY_LAYOUT_PLOTTER: klayout shell: bash -l {0} run: | - sudo apt install libglu1-mesa - make dev plugins + make dev make docs - name: Upload artifact uses: actions/upload-pages-artifact@v2 diff --git a/.github/workflows/test_code.yml b/.github/workflows/test_code.yml index fa31c8da..0c9cbf1b 100644 --- a/.github/workflows/test_code.yml +++ b/.github/workflows/test_code.yml @@ -19,8 +19,8 @@ jobs: strategy: max-parallel: 12 matrix: - python-version: ["3.10"] - os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.11"] + os: [ubuntu-latest] steps: - uses: actions/checkout@v3 @@ -67,27 +67,23 @@ jobs: strategy: max-parallel: 12 matrix: - python-version: [3.9] + python-version: [3.11] os: [ubuntu-latest] steps: - uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@v2 + - name: Set up Python + uses: actions/setup-python@v4 with: - python-version: 3.9 - channels: conda-forge,defaults - channel-priority: true - activate-environment: anaconda-client-env - - name: Add conda to system path - run: | - echo $CONDA/bin >> $GITHUB_PATH + python-version: "3.11" + cache: "pip" + cache-dependency-path: pyproject.toml - name: Install dependencies run: | - sudo apt install pandoc make plugins pip install -e .[docs] --upgrade pip install numpy --upgrade - conda list > requirements.txt + pip freeze > requirements.txt - uses: actions/upload-artifact@v3 with: name: requirements diff --git a/Makefile b/Makefile index 681b0def..8522bb1d 100644 --- a/Makefile +++ b/Makefile @@ -13,25 +13,6 @@ update-pre: watch: gf watch ubcpdk -link: - lygadgets_link lygadgets - lygadgets_link gdsfactory - lygadgets_link toolz - lygadgets_link gdspy - lygadgets_link numpy - lygadgets_link matplotlib - lygadgets_link cycler - lygadgets_link pyparsing - lygadgets_link dateutil - lygadgets_link kiwisolver - lygadgets_link ubcpdk/klayout/tech - lygadgets_link ubcpdk - lygadgets_link scipy # [because of splines in the nanowires] - lygadgets_link omegaconf - lygadgets_link loguru - lygadgets_link pydantic - lygadgets_link shapely - test: pytest -s @@ -47,34 +28,9 @@ meep: conda config --set solver libmamba conda install -c conda-forge pymeep=*=mpi_mpich_* nlopt -y -plugins: meep - pip install gdsfactory[docs,dev,full,gmsh,tidy3d,devsim,meow,sax] - pip install -e .[full] --upgrade - -diff: - pf merge-cells gds_diff - cov: pytest --cov=ubcpdk -mypy: - mypy . --ignore-missing-imports - -lint: - flake8 . - -pylint: - pylint ubcpdk - -lintd: - flake8 --select RST - -pydocstyle: - pydocstyle ubcpdk - -doc8: - doc8 docs/ - git-rm-merged: git branch -D `git branch --merged | grep -v \* | xargs` @@ -82,25 +38,6 @@ release: git push git push origin --tags -build: - rm -rf dist - pip install build - python -m build - -notebooks: - nbstripout --drop-empty-cells docs/notebooks/*.ipynb - -mask: - python ubcpdk/samples/test_masks.py - -jupytext: - jupytext docs/**/*.ipynb --to py - -notebooks: - jupytext docs/**/*.py --to ipynb - -notebooks-rm: - rm docs/notebooks/*.ipynb docs: jb build docs diff --git a/tests/test_components.py b/tests/test_components.py index 88522e41..58279767 100644 --- a/tests/test_components.py +++ b/tests/test_components.py @@ -36,8 +36,8 @@ def test_pdk_settings( component: Component, data_regression: DataRegressionFixture ) -> None: """Avoid regressions when exporting settings.""" - data_regression.check(component.to_dict()) + data_regression.check(component.to_dict(with_ports=False)) -def test_assert_ports_on_grid(component: Component): +def test_assert_ports_on_grid(component: Component) -> None: component.assert_ports_on_grid() diff --git a/tests/test_components/test_pdk_settings_add_fiber_array_.yml b/tests/test_components/test_pdk_settings_add_fiber_array_.yml index c4d7994b..07b7cccd 100644 --- a/tests/test_components/test_pdk_settings_add_fiber_array_.yml +++ b/tests/test_components/test_pdk_settings_add_fiber_array_.yml @@ -1,29 +1,4 @@ name: straight_add_fiber_arra_448312f9 -ports: - opt-mirror_948d7eaf_gc_te1550-straight-o1: - center: - - -16.2 - - 58.5 - layer: - - 1 - - 0 - name: opt-mirror_948d7eaf_gc_te1550-straight-o1 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - opt-mirror_948d7eaf_gc_te1550-straight-o2: - center: - - -16.2 - - -68.5 - layer: - - 1 - - 0 - name: opt-mirror_948d7eaf_gc_te1550-straight-o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: diff --git a/tests/test_components/test_pdk_settings_add_fiber_array_pads_rf_.yml b/tests/test_components/test_pdk_settings_add_fiber_array_pads_rf_.yml index 480914be..bf074037 100644 --- a/tests/test_components/test_pdk_settings_add_fiber_array_pads_rf_.yml +++ b/tests/test_components/test_pdk_settings_add_fiber_array_pads_rf_.yml @@ -1,125 +1,4 @@ name: add_fiber_array_pads_rf -ports: - e1: - center: - - 160.05 - - -435.5 - layer: - - 12 - - 0 - name: e1 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 75 - e2: - center: - - 160.05 - - -310.5 - layer: - - 12 - - 0 - name: e2 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 75 - e3: - center: - - 160.05 - - -185.5 - layer: - - 12 - - 0 - name: e3 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 75 - e4: - center: - - 160.05 - - -60.5 - layer: - - 12 - - 0 - name: e4 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 75 - e5: - center: - - 160.05 - - 64.5 - layer: - - 12 - - 0 - name: e5 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 75 - e6: - center: - - 160.05 - - 189.5 - layer: - - 12 - - 0 - name: e6 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 75 - e7: - center: - - 160.05 - - 314.5 - layer: - - 12 - - 0 - name: e7 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 75 - e8: - center: - - 160.05 - - 439.5 - layer: - - 12 - - 0 - name: e8 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 75 - opt-mirror_948d7eaf_gc_te1550-ring_single_heater_171f554b-o1: - center: - - -21.0 - - 65.5 - layer: - - 1 - - 0 - name: opt-mirror_948d7eaf_gc_te1550-ring_single_heater_171f554b-o1 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - opt-mirror_948d7eaf_gc_te1550-ring_single_heater_171f554b-o2: - center: - - -21.0 - - -61.5 - layer: - - 1 - - 0 - name: opt-mirror_948d7eaf_gc_te1550-ring_single_heater_171f554b-o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_add_pads_dc_.yml b/tests/test_components/test_pdk_settings_add_pads_dc_.yml index e3febb3f..9fee3316 100644 --- a/tests/test_components/test_pdk_settings_add_pads_dc_.yml +++ b/tests/test_components/test_pdk_settings_add_pads_dc_.yml @@ -1,125 +1,4 @@ name: ring_single_heater_171f_5dab5bcc -ports: - elec-ring_single_heater_171f554b-0: - center: - - -439.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-0 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-1: - center: - - -314.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-1 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-2: - center: - - -189.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-2 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-3: - center: - - -64.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-3 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-4: - center: - - 60.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-4 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-5: - center: - - 185.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-5 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-6: - center: - - 310.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-6 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-7: - center: - - 435.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-7 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - o1: - center: - - -17.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 13.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: component: ring_single_heater diff --git a/tests/test_components/test_pdk_settings_add_pads_rf_.yml b/tests/test_components/test_pdk_settings_add_pads_rf_.yml index 7f32e4a8..bc1eaa05 100644 --- a/tests/test_components/test_pdk_settings_add_pads_rf_.yml +++ b/tests/test_components/test_pdk_settings_add_pads_rf_.yml @@ -1,125 +1,4 @@ name: ring_single_heater_171f_ac60d9ba -ports: - elec-ring_single_heater_171f554b-1: - center: - - 435.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-1 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-2: - center: - - 310.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-2 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-3: - center: - - 185.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-3 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-4: - center: - - 60.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-4 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-5: - center: - - -64.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-5 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-6: - center: - - -189.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-6 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-7: - center: - - -314.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-7 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 75 - elec-ring_single_heater_171f554b-8: - center: - - -439.5 - - 160.05 - layer: - - 12 - - 0 - name: elec-ring_single_heater_171f554b-8 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 75 - o1: - center: - - -17.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 13.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: component: ring_single_heater diff --git a/tests/test_components/test_pdk_settings_bend_.yml b/tests/test_components/test_pdk_settings_bend_.yml index 8e42f93a..cd418723 100644 --- a/tests/test_components/test_pdk_settings_bend_.yml +++ b/tests/test_components/test_pdk_settings_bend_.yml @@ -1,29 +1,4 @@ name: bend_euler -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 10.0 - - 10.0 - layer: - - 1 - - 0 - name: o2 - orientation: 90.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_bend_euler_.yml b/tests/test_components/test_pdk_settings_bend_euler_.yml index 8db1f09a..7be5b665 100644 --- a/tests/test_components/test_pdk_settings_bend_euler_.yml +++ b/tests/test_components/test_pdk_settings_bend_euler_.yml @@ -1,29 +1,4 @@ name: bend_euler_npoints100 -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 10.0 - - 10.0 - layer: - - 1 - - 0 - name: o2 - orientation: 90.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: npoints: 100 diff --git a/tests/test_components/test_pdk_settings_bend_s_.yml b/tests/test_components/test_pdk_settings_bend_s_.yml index 023556e8..e96b3c98 100644 --- a/tests/test_components/test_pdk_settings_bend_s_.yml +++ b/tests/test_components/test_pdk_settings_bend_s_.yml @@ -1,29 +1,4 @@ name: bezier_c3570097_bend_s -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 11.0 - - 2.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: diff --git a/tests/test_components/test_pdk_settings_coupler_.yml b/tests/test_components/test_pdk_settings_coupler_.yml index bd2c1dd8..c837fbac 100644 --- a/tests/test_components/test_pdk_settings_coupler_.yml +++ b/tests/test_components/test_pdk_settings_coupler_.yml @@ -1,53 +1,4 @@ name: coupler_50c22d89 -ports: - o1: - center: - - -10.0 - - -1.632 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - -10.0 - - 2.368 - layer: - - 1 - - 0 - name: o2 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 30.0 - - 2.368 - layer: - - 1 - - 0 - name: o3 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 30.0 - - -1.632 - layer: - - 1 - - 0 - name: o4 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: cross_section: diff --git a/tests/test_components/test_pdk_settings_coupler_ring_.yml b/tests/test_components/test_pdk_settings_coupler_ring_.yml index 116bc7fd..b674ce32 100644 --- a/tests/test_components/test_pdk_settings_coupler_ring_.yml +++ b/tests/test_components/test_pdk_settings_coupler_ring_.yml @@ -1,53 +1,4 @@ name: coupler_ring -ports: - o1: - center: - - -12.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - -9.0 - - 5.7 - layer: - - 1 - - 0 - name: o2 - orientation: 90.0 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 5.0 - - 5.7 - layer: - - 1 - - 0 - name: o3 - orientation: 90.0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 8.0 - - 0.0 - layer: - - 1 - - 0 - name: o4 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_dbg_.yml b/tests/test_components/test_pdk_settings_dbg_.yml index be594894..8525fe6f 100644 --- a/tests/test_components/test_pdk_settings_dbg_.yml +++ b/tests/test_components/test_pdk_settings_dbg_.yml @@ -1,29 +1,4 @@ name: dbg -ports: - o1: - center: - - -0.079 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 15.879 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_dbr_cavity_.yml b/tests/test_components/test_pdk_settings_dbr_cavity_.yml index e946e2c4..70bdbbac 100644 --- a/tests/test_components/test_pdk_settings_dbr_cavity_.yml +++ b/tests/test_components/test_pdk_settings_dbr_cavity_.yml @@ -1,29 +1,4 @@ name: dbr_cavity -ports: - o1: - center: - - -10.0 - - -1.65 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 10.1 - - -1.65 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_dbr_cavity_te_.yml b/tests/test_components/test_pdk_settings_dbr_cavity_te_.yml index 887cf596..2e536242 100644 --- a/tests/test_components/test_pdk_settings_dbr_cavity_te_.yml +++ b/tests/test_components/test_pdk_settings_dbr_cavity_te_.yml @@ -1,29 +1,4 @@ name: dbr_cavity_add_fiber_ar_f2ab6ad2 -ports: - opt-mirror_948d7eaf_gc_te1550-dbr_cavity-o1: - center: - - -17.9 - - 63.5 - layer: - - 1 - - 0 - name: opt-mirror_948d7eaf_gc_te1550-dbr_cavity-o1 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - opt-mirror_948d7eaf_gc_te1550-dbr_cavity-o2: - center: - - -17.9 - - -63.5 - layer: - - 1 - - 0 - name: opt-mirror_948d7eaf_gc_te1550-dbr_cavity-o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: component: diff --git a/tests/test_components/test_pdk_settings_ebeam_BondPad_.yml b/tests/test_components/test_pdk_settings_ebeam_BondPad_.yml index 3716504b..a6cf540f 100644 --- a/tests/test_components/test_pdk_settings_ebeam_BondPad_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_BondPad_.yml @@ -1,53 +1,4 @@ name: ebeam_BondPad -ports: - e1: - center: - - -50.0 - - 0.0 - layer: - - 1 - - 11 - name: e1 - orientation: 180 - port_type: electrical - shear_angle: null - width: 15.0 - e2: - center: - - 0.0 - - 50.0 - layer: - - 1 - - 11 - name: e2 - orientation: 90 - port_type: electrical - shear_angle: null - width: 15.0 - e3: - center: - - 50.0 - - 0.0 - layer: - - 1 - - 11 - name: e3 - orientation: 0 - port_type: electrical - shear_angle: null - width: 15.0 - e4: - center: - - 0.0 - - -50.0 - layer: - - 1 - - 11 - name: e4 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml index 4e933811..4f6c280b 100644 --- a/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_adiabatic_te1550_.yml @@ -1,53 +1,4 @@ name: ebeam_adiabatic_te1550 -ports: - o1: - center: - - 0.1 - - -1.5 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 0.1 - - 1.5 - layer: - - 1 - - 0 - name: o2 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 195.9 - - 1.5 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 195.9 - - -1.5 - layer: - - 1 - - 0 - name: o4 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_adiabatic_tm1550_.yml b/tests/test_components/test_pdk_settings_ebeam_adiabatic_tm1550_.yml index bf8f0abf..215384f5 100644 --- a/tests/test_components/test_pdk_settings_ebeam_adiabatic_tm1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_adiabatic_tm1550_.yml @@ -1,53 +1,4 @@ name: ebeam_adiabatic_tm1550 -ports: - o1: - center: - - 0.1 - - -1.5 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 0.1 - - 1.5 - layer: - - 1 - - 0 - name: o2 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 217.9 - - 1.5 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 217.9 - - -1.5 - layer: - - 1 - - 0 - name: o4 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml index 7ed22a05..d7b19a21 100644 --- a/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_bdc_te1550_.yml @@ -1,53 +1,4 @@ name: ebeam_bdc_te1550 -ports: - o1: - center: - - -35.45 - - -2.35 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - -35.45 - - 2.35 - layer: - - 1 - - 0 - name: o2 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 35.3 - - 2.35 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 35.3 - - -2.35 - layer: - - 1 - - 0 - name: o4 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_bdc_tm1550_.yml b/tests/test_components/test_pdk_settings_ebeam_bdc_tm1550_.yml index 3c2f97d9..0b848934 100644 --- a/tests/test_components/test_pdk_settings_ebeam_bdc_tm1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_bdc_tm1550_.yml @@ -1,53 +1,4 @@ name: ebeam_bdc_tm1550 -ports: - o1: - center: - - 0.1 - - 2.4 - layer: - - 1 - - 0 - name: o1 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 35.7 - - 2.4 - layer: - - 1 - - 0 - name: o2 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 0.1 - - -2.4 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 35.7 - - -2.4 - layer: - - 1 - - 0 - name: o4 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml b/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml index 1ea02118..3d4e8b6f 100644 --- a/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_crossing4_.yml @@ -1,53 +1,4 @@ name: ebeam_crossing4 -ports: - o1: - center: - - -4.8 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 0.0 - - 4.8 - layer: - - 1 - - 0 - name: o2 - orientation: 90 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 4.8 - - 0.0 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 0.0 - - -4.8 - layer: - - 1 - - 0 - name: o4 - orientation: 270 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_crossing4_2ports_.yml b/tests/test_components/test_pdk_settings_ebeam_crossing4_2ports_.yml index aa988784..bbe9c5c2 100644 --- a/tests/test_components/test_pdk_settings_ebeam_crossing4_2ports_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_crossing4_2ports_.yml @@ -1,29 +1,4 @@ name: ebeam_crossing4_2ports -ports: - o1: - center: - - -4.8 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 4.8 - - 0.0 - layer: - - 1 - - 0 - name: o4 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_dc_halfring_straight_.yml b/tests/test_components/test_pdk_settings_ebeam_dc_halfring_straight_.yml index 6a8a892c..f984fcc7 100644 --- a/tests/test_components/test_pdk_settings_ebeam_dc_halfring_straight_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_dc_halfring_straight_.yml @@ -1,53 +1,4 @@ name: ebeam_dc_halfring_straight -ports: - o1: - center: - - -12.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - -9.0 - - 5.7 - layer: - - 1 - - 0 - name: o2 - orientation: 90.0 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 5.0 - - 5.7 - layer: - - 1 - - 0 - name: o3 - orientation: 90.0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 8.0 - - 0.0 - layer: - - 1 - - 0 - name: o4 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_dc_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_dc_te1550_.yml index 4ee72f00..a0e7a922 100644 --- a/tests/test_components/test_pdk_settings_ebeam_dc_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_dc_te1550_.yml @@ -1,53 +1,4 @@ name: coupler_d51b16db -ports: - o1: - center: - - -10.0 - - -1.632 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - -10.0 - - 2.368 - layer: - - 1 - - 0 - name: o2 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 30.0 - - 2.368 - layer: - - 1 - - 0 - name: o3 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 30.0 - - -1.632 - layer: - - 1 - - 0 - name: o4 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: decorator: diff --git a/tests/test_components/test_pdk_settings_ebeam_splitter_adiabatic_swg_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_splitter_adiabatic_swg_te1550_.yml index 5a8b6851..5ddc00b8 100644 --- a/tests/test_components/test_pdk_settings_ebeam_splitter_adiabatic_swg_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_splitter_adiabatic_swg_te1550_.yml @@ -1,53 +1,4 @@ name: ebeam_splitter_adiabati_f8376e78 -ports: - o1: - center: - - 0.0 - - 20.31 - layer: - - 1 - - 0 - name: o1 - orientation: 90 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 0.0 - - -20.31 - layer: - - 1 - - 0 - name: o2 - orientation: 90 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 82.0 - - 20.31 - layer: - - 1 - - 0 - name: o3 - orientation: 90 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 82.0 - - -20.31 - layer: - - 1 - - 0 - name: o4 - orientation: 270 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_splitter_swg_assist_te1310_.yml b/tests/test_components/test_pdk_settings_ebeam_splitter_swg_assist_te1310_.yml index 46f36f28..fb197526 100644 --- a/tests/test_components/test_pdk_settings_ebeam_splitter_swg_assist_te1310_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_splitter_swg_assist_te1310_.yml @@ -1,53 +1,4 @@ name: ebeam_splitter_swg_assist_te1310 -ports: - o1: - center: - - -63.001 - - -2.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.35 - o2: - center: - - -63.001 - - 2.0 - layer: - - 1 - - 0 - name: o2 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.35 - o3: - center: - - 63.001 - - 2.0 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.35 - o4: - center: - - 63.001 - - -2.0 - layer: - - 1 - - 0 - name: o4 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.35 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_splitter_swg_assist_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_splitter_swg_assist_te1550_.yml index 9e00c807..6bfa80f7 100644 --- a/tests/test_components/test_pdk_settings_ebeam_splitter_swg_assist_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_splitter_swg_assist_te1550_.yml @@ -1,41 +1,4 @@ name: ebeam_splitter_swg_assist_te1550 -ports: - o1: - center: - - -63.001 - - -1.975 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - -63.001 - - 1.975 - layer: - - 1 - - 0 - name: o2 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 63.001 - - -1.975 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_swg_edgecoupler_.yml b/tests/test_components/test_pdk_settings_ebeam_swg_edgecoupler_.yml index ae4a2a93..9c3d7de1 100644 --- a/tests/test_components/test_pdk_settings_ebeam_swg_edgecoupler_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_swg_edgecoupler_.yml @@ -1,17 +1,4 @@ name: ebeam_swg_edgecoupler -ports: - o1: - center: - - -79.3 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_terminator_te1310_.yml b/tests/test_components/test_pdk_settings_ebeam_terminator_te1310_.yml index 71e59328..081c9017 100644 --- a/tests/test_components/test_pdk_settings_ebeam_terminator_te1310_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_terminator_te1310_.yml @@ -1,17 +1,4 @@ name: ebeam_terminator_te1310 -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.35 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_terminator_te1550_.yml b/tests/test_components/test_pdk_settings_ebeam_terminator_te1550_.yml index 1906ff4b..f279b0a5 100644 --- a/tests/test_components/test_pdk_settings_ebeam_terminator_te1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_terminator_te1550_.yml @@ -1,17 +1,4 @@ name: ebeam_terminator_te1550 -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_terminator_tm1550_.yml b/tests/test_components/test_pdk_settings_ebeam_terminator_tm1550_.yml index 2a4a40ff..de0478fd 100644 --- a/tests/test_components/test_pdk_settings_ebeam_terminator_tm1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_terminator_tm1550_.yml @@ -1,17 +1,4 @@ name: ebeam_terminator_tm1550 -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml b/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml index 0aa5240e..2aec46be 100644 --- a/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_y_1550_.yml @@ -1,41 +1,4 @@ name: ebeam_y_1550 -ports: - o1: - center: - - -7.4 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 7.4 - - 2.75 - layer: - - 1 - - 0 - name: o2 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 7.4 - - -2.75 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_.yml b/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_.yml index 4feb1d9a..21e9ef3b 100644 --- a/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_.yml @@ -1,41 +1,4 @@ name: ebeam_y_adiabatic -ports: - o1: - center: - - 0.05 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.45 - o2: - center: - - 50.05 - - 1.25 - layer: - - 1 - - 0 - name: o2 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.45 - o3: - center: - - 50.05 - - -1.25 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.45 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_1310_.yml b/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_1310_.yml index 262a16e5..d2acc807 100644 --- a/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_1310_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_1310_.yml @@ -1,41 +1,4 @@ name: ebeam_y_adiabatic_1310 -ports: - o1: - center: - - 0.05 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.35 - o2: - center: - - 52.05 - - 1.25 - layer: - - 1 - - 0 - name: o2 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.35 - o3: - center: - - 52.05 - - -1.25 - layer: - - 1 - - 0 - name: o3 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.35 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_tapers_.yml b/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_tapers_.yml index 01624072..c4446aab 100644 --- a/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_tapers_.yml +++ b/tests/test_components/test_pdk_settings_ebeam_y_adiabatic_tapers_.yml @@ -1,41 +1,4 @@ name: ebeam_y_adiabatic_tapers -ports: - o1: - center: - - -9.95 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 60.05 - - 1.25 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 60.05 - - -1.25 - layer: - - 1 - - 0 - name: o3 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_gc_te1310_.yml b/tests/test_components/test_pdk_settings_gc_te1310_.yml index b53b5021..d8a081bf 100644 --- a/tests/test_components/test_pdk_settings_gc_te1310_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1310_.yml @@ -1,29 +1,4 @@ name: mirror_b611a4d8_gc_te1310 -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.35 - opt_in_TE_1310_device_JoaquinMatres: - center: - - 25.0 - - 0.0 - layer: - - 1 - - 0 - name: opt_in_TE_1310_device_JoaquinMatres - orientation: null - port_type: opt_in_TE_1310_device_JoaquinMatres - shear_angle: null - width: 9 settings: changed: {} child: diff --git a/tests/test_components/test_pdk_settings_gc_te1310_8deg_.yml b/tests/test_components/test_pdk_settings_gc_te1310_8deg_.yml index 9cdfdd92..99784c09 100644 --- a/tests/test_components/test_pdk_settings_gc_te1310_8deg_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1310_8deg_.yml @@ -1,29 +1,4 @@ name: mirror_58e2a10b_gc_te1310_8deg -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.35 - opt_in_TE_1310_device_JoaquinMatres: - center: - - 25.0 - - 0.0 - layer: - - 1 - - 0 - name: opt_in_TE_1310_device_JoaquinMatres - orientation: null - port_type: opt_in_TE_1310_device_JoaquinMatres - shear_angle: null - width: 9 settings: changed: {} child: diff --git a/tests/test_components/test_pdk_settings_gc_te1310_broadband_.yml b/tests/test_components/test_pdk_settings_gc_te1310_broadband_.yml index a8e866a5..a644be88 100644 --- a/tests/test_components/test_pdk_settings_gc_te1310_broadband_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1310_broadband_.yml @@ -1,29 +1,4 @@ name: mirror_cd7472ae_gc_te13_d32e5c2e -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.35 - opt_in_TE_1310_device_JoaquinMatres: - center: - - 25.0 - - 0.0 - layer: - - 1 - - 0 - name: opt_in_TE_1310_device_JoaquinMatres - orientation: null - port_type: opt_in_TE_1310_device_JoaquinMatres - shear_angle: null - width: 9 settings: changed: {} child: diff --git a/tests/test_components/test_pdk_settings_gc_te1550_.yml b/tests/test_components/test_pdk_settings_gc_te1550_.yml index fb865ed4..55231c5b 100644 --- a/tests/test_components/test_pdk_settings_gc_te1550_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1550_.yml @@ -1,29 +1,4 @@ name: mirror_948d7eaf_gc_te1550 -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - opt_in_TE_1550_device_JoaquinMatres: - center: - - 25.0 - - 0.0 - layer: - - 1 - - 0 - name: opt_in_TE_1550_device_JoaquinMatres - orientation: null - port_type: opt_in_TE_1550_device_JoaquinMatres - shear_angle: null - width: 9 settings: changed: {} child: diff --git a/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml b/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml index af95c3ff..a016429e 100644 --- a/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1550_90nmSlab_.yml @@ -1,29 +1,4 @@ name: mirror_d2cc2b58_gc_te15_311df1af -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - opt_in_TE_1550_device_JoaquinMatres: - center: - - 25.0 - - 0.0 - layer: - - 1 - - 0 - name: opt_in_TE_1550_device_JoaquinMatres - orientation: null - port_type: opt_in_TE_1550_device_JoaquinMatres - shear_angle: null - width: 9 settings: changed: {} child: diff --git a/tests/test_components/test_pdk_settings_gc_te1550_broadband_.yml b/tests/test_components/test_pdk_settings_gc_te1550_broadband_.yml index 235a6f9f..cd6aa54d 100644 --- a/tests/test_components/test_pdk_settings_gc_te1550_broadband_.yml +++ b/tests/test_components/test_pdk_settings_gc_te1550_broadband_.yml @@ -1,29 +1,4 @@ name: mirror_a38c0f84_gc_te15_79b73d72 -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - opt_in_TE_1550_device_JoaquinMatres: - center: - - 25.0 - - 0.0 - layer: - - 1 - - 0 - name: opt_in_TE_1550_device_JoaquinMatres - orientation: null - port_type: opt_in_TE_1550_device_JoaquinMatres - shear_angle: null - width: 9 settings: changed: {} child: diff --git a/tests/test_components/test_pdk_settings_gc_tm1550_.yml b/tests/test_components/test_pdk_settings_gc_tm1550_.yml index abc3ce91..0686b0bd 100644 --- a/tests/test_components/test_pdk_settings_gc_tm1550_.yml +++ b/tests/test_components/test_pdk_settings_gc_tm1550_.yml @@ -1,29 +1,4 @@ name: mirror_355ecc08_gc_tm1550 -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - opt_in_TM_1550_device_JoaquinMatres: - center: - - 25.0 - - 0.0 - layer: - - 1 - - 0 - name: opt_in_TM_1550_device_JoaquinMatres - orientation: null - port_type: opt_in_TM_1550_device_JoaquinMatres - shear_angle: null - width: 9 settings: changed: {} child: diff --git a/tests/test_components/test_pdk_settings_metal_via_.yml b/tests/test_components/test_pdk_settings_metal_via_.yml index 256df153..7b50d5d5 100644 --- a/tests/test_components/test_pdk_settings_metal_via_.yml +++ b/tests/test_components/test_pdk_settings_metal_via_.yml @@ -1,53 +1,4 @@ name: metal_via -ports: - e1: - center: - - -7.5 - - 0.0 - layer: - - 1 - - 11 - name: e1 - orientation: 180 - port_type: electrical - shear_angle: null - width: 15.0 - e2: - center: - - 0.0 - - 7.5 - layer: - - 1 - - 11 - name: e2 - orientation: 90 - port_type: electrical - shear_angle: null - width: 15.0 - e3: - center: - - 7.5 - - 0.0 - layer: - - 1 - - 11 - name: e3 - orientation: 0 - port_type: electrical - shear_angle: null - width: 15.0 - e4: - center: - - 0.0 - - -7.5 - layer: - - 1 - - 11 - name: e4 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_mmi1x2_.yml b/tests/test_components/test_pdk_settings_mmi1x2_.yml index a8155b18..eda61b47 100644 --- a/tests/test_components/test_pdk_settings_mmi1x2_.yml +++ b/tests/test_components/test_pdk_settings_mmi1x2_.yml @@ -1,41 +1,4 @@ name: mmi1x2_50c22d89 -ports: - o1: - center: - - -10.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 15.5 - - 0.625 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - 15.5 - - -0.625 - layer: - - 1 - - 0 - name: o3 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: cross_section: diff --git a/tests/test_components/test_pdk_settings_mzi_.yml b/tests/test_components/test_pdk_settings_mzi_.yml index daa9b632..203ccd78 100644 --- a/tests/test_components/test_pdk_settings_mzi_.yml +++ b/tests/test_components/test_pdk_settings_mzi_.yml @@ -1,29 +1,4 @@ name: mzi_55c1098f -ports: - o1: - center: - - -7.4 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 62.325 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: bend: diff --git a/tests/test_components/test_pdk_settings_mzi_heater_.yml b/tests/test_components/test_pdk_settings_mzi_heater_.yml index 2c90ec5b..9deca562 100644 --- a/tests/test_components/test_pdk_settings_mzi_heater_.yml +++ b/tests/test_components/test_pdk_settings_mzi_heater_.yml @@ -1,125 +1,4 @@ name: mzi_ab5edfa6 -ports: - o1: - center: - - -7.4 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 262.225 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - top_l_e1: - center: - - 12.395 - - 24.75 - layer: - - 12 - - 0 - name: top_l_e1 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 10 - top_l_e2: - center: - - 17.395 - - 29.75 - layer: - - 12 - - 0 - name: top_l_e2 - orientation: 90.0 - port_type: electrical - shear_angle: null - width: 10 - top_l_e3: - center: - - 22.395 - - 24.75 - layer: - - 12 - - 0 - name: top_l_e3 - orientation: 0.0 - port_type: electrical - shear_angle: null - width: 10 - top_l_e4: - center: - - 17.395 - - 19.75 - layer: - - 12 - - 0 - name: top_l_e4 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 10 - top_r_e1: - center: - - 232.405 - - 24.75 - layer: - - 12 - - 0 - name: top_r_e1 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 10 - top_r_e2: - center: - - 237.405 - - 29.75 - layer: - - 12 - - 0 - name: top_r_e2 - orientation: 90.0 - port_type: electrical - shear_angle: null - width: 10 - top_r_e3: - center: - - 242.405 - - 24.75 - layer: - - 12 - - 0 - name: top_r_e3 - orientation: 0.0 - port_type: electrical - shear_angle: null - width: 10 - top_r_e4: - center: - - 237.405 - - 19.75 - layer: - - 12 - - 0 - name: top_r_e4 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 10 settings: changed: length_x: 200 diff --git a/tests/test_components/test_pdk_settings_pad_array_.yml b/tests/test_components/test_pdk_settings_pad_array_.yml index 7ca21327..d3da77f1 100644 --- a/tests/test_components/test_pdk_settings_pad_array_.yml +++ b/tests/test_components/test_pdk_settings_pad_array_.yml @@ -1,77 +1,4 @@ name: pad_array_71569d1c -ports: - e11: - center: - - 0.0 - - 0.0 - layer: - - 12 - - 0 - name: e11 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - e12: - center: - - 125.0 - - 0.0 - layer: - - 12 - - 0 - name: e12 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - e13: - center: - - 250.0 - - 0.0 - layer: - - 12 - - 0 - name: e13 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - e14: - center: - - 375.0 - - 0.0 - layer: - - 12 - - 0 - name: e14 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - e15: - center: - - 500.0 - - 0.0 - layer: - - 12 - - 0 - name: e15 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 - e16: - center: - - 625.0 - - 0.0 - layer: - - 12 - - 0 - name: e16 - orientation: 270 - port_type: electrical - shear_angle: null - width: 75 settings: changed: pad: diff --git a/tests/test_components/test_pdk_settings_photonic_wirebond_surfacetaper_1310_.yml b/tests/test_components/test_pdk_settings_photonic_wirebond_surfacetaper_1310_.yml index 0983264c..20c33e40 100644 --- a/tests/test_components/test_pdk_settings_photonic_wirebond_surfacetaper_1310_.yml +++ b/tests/test_components/test_pdk_settings_photonic_wirebond_surfacetaper_1310_.yml @@ -1,17 +1,4 @@ name: photonic_wirebond_surfa_b165631b -ports: - o1: - center: - - 110.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.35 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_photonic_wirebond_surfacetaper_1550_.yml b/tests/test_components/test_pdk_settings_photonic_wirebond_surfacetaper_1550_.yml index c99288f1..11c0b9d5 100644 --- a/tests/test_components/test_pdk_settings_photonic_wirebond_surfacetaper_1550_.yml +++ b/tests/test_components/test_pdk_settings_photonic_wirebond_surfacetaper_1550_.yml @@ -1,17 +1,4 @@ name: photonic_wirebond_surfa_8365a94f -ports: - o1: - center: - - 110.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ring_double_heater_.yml b/tests/test_components/test_pdk_settings_ring_double_heater_.yml index 8b931a9b..b78ea14c 100644 --- a/tests/test_components/test_pdk_settings_ring_double_heater_.yml +++ b/tests/test_components/test_pdk_settings_ring_double_heater_.yml @@ -1,149 +1,4 @@ name: ring_double_heater_171f554b -ports: - l_e1: - center: - - -10.01 - - 0.0 - layer: - - 12 - - 0 - name: l_e1 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 10 - l_e2: - center: - - -5.01 - - 5.0 - layer: - - 12 - - 0 - name: l_e2 - orientation: 90.0 - port_type: electrical - shear_angle: null - width: 10 - l_e3: - center: - - -0.01 - - 0.0 - layer: - - 12 - - 0 - name: l_e3 - orientation: 0.0 - port_type: electrical - shear_angle: null - width: 10 - l_e4: - center: - - -5.01 - - -5.0 - layer: - - 12 - - 0 - name: l_e4 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 10 - o1: - center: - - -13.01 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 13.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - o3: - center: - - -13.01 - - 21.41 - layer: - - 1 - - 0 - name: o3 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o4: - center: - - 13.0 - - 21.41 - layer: - - 1 - - 0 - name: o4 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - r_e1: - center: - - -0.0 - - 0.0 - layer: - - 12 - - 0 - name: r_e1 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 10 - r_e2: - center: - - 5.0 - - 5.0 - layer: - - 12 - - 0 - name: r_e2 - orientation: 90.0 - port_type: electrical - shear_angle: null - width: 10 - r_e3: - center: - - 10.0 - - 0.0 - layer: - - 12 - - 0 - name: r_e3 - orientation: 0.0 - port_type: electrical - shear_angle: null - width: 10 - r_e4: - center: - - 5.0 - - -5.0 - layer: - - 12 - - 0 - name: r_e4 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 10 settings: changed: via_stack: diff --git a/tests/test_components/test_pdk_settings_ring_single_.yml b/tests/test_components/test_pdk_settings_ring_single_.yml index d74a67bd..5fe67485 100644 --- a/tests/test_components/test_pdk_settings_ring_single_.yml +++ b/tests/test_components/test_pdk_settings_ring_single_.yml @@ -1,29 +1,4 @@ name: ring_single -ports: - o1: - center: - - -17.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 13.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_ring_single_heater_.yml b/tests/test_components/test_pdk_settings_ring_single_heater_.yml index 25465f3f..e131fb58 100644 --- a/tests/test_components/test_pdk_settings_ring_single_heater_.yml +++ b/tests/test_components/test_pdk_settings_ring_single_heater_.yml @@ -1,125 +1,4 @@ name: ring_single_heater_171f554b -ports: - l_e1: - center: - - -14.0 - - 0.0 - layer: - - 12 - - 0 - name: l_e1 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 10 - l_e2: - center: - - -9.0 - - 5.0 - layer: - - 12 - - 0 - name: l_e2 - orientation: 90.0 - port_type: electrical - shear_angle: null - width: 10 - l_e3: - center: - - -4.0 - - 0.0 - layer: - - 12 - - 0 - name: l_e3 - orientation: 0.0 - port_type: electrical - shear_angle: null - width: 10 - l_e4: - center: - - -9.0 - - -5.0 - layer: - - 12 - - 0 - name: l_e4 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 10 - o1: - center: - - -17.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 13.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 - r_e1: - center: - - 0.0 - - 0.0 - layer: - - 12 - - 0 - name: r_e1 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 10 - r_e2: - center: - - 5.0 - - 5.0 - layer: - - 12 - - 0 - name: r_e2 - orientation: 90.0 - port_type: electrical - shear_angle: null - width: 10 - r_e3: - center: - - 10.0 - - 0.0 - layer: - - 12 - - 0 - name: r_e3 - orientation: 0.0 - port_type: electrical - shear_angle: null - width: 10 - r_e4: - center: - - 5.0 - - -5.0 - layer: - - 12 - - 0 - name: r_e4 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 10 settings: changed: via_stack: diff --git a/tests/test_components/test_pdk_settings_ring_with_crossing_.yml b/tests/test_components/test_pdk_settings_ring_with_crossing_.yml index 5fc58117..29db1354 100644 --- a/tests/test_components/test_pdk_settings_ring_with_crossing_.yml +++ b/tests/test_components/test_pdk_settings_ring_with_crossing_.yml @@ -1,29 +1,4 @@ name: ring_single_dut_2f65884a -ports: - o1: - center: - - -12.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 8.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: bend: diff --git a/tests/test_components/test_pdk_settings_spiral_.yml b/tests/test_components/test_pdk_settings_spiral_.yml index 5b25b27f..c62430cb 100644 --- a/tests/test_components/test_pdk_settings_spiral_.yml +++ b/tests/test_components/test_pdk_settings_spiral_.yml @@ -1,29 +1,4 @@ name: spiral_external_io -ports: - o1: - center: - - 383.0 - - -43.0 - layer: - - 1 - - 0 - name: o1 - orientation: 270.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 386.0 - - -46.0 - layer: - - 1 - - 0 - name: o2 - orientation: 270.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_straight_.yml b/tests/test_components/test_pdk_settings_straight_.yml index 711745bf..3dd448fb 100644 --- a/tests/test_components/test_pdk_settings_straight_.yml +++ b/tests/test_components/test_pdk_settings_straight_.yml @@ -1,29 +1,4 @@ name: straight -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 10.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_straight_one_pin_.yml b/tests/test_components/test_pdk_settings_straight_one_pin_.yml index 3a757b80..1f873d9a 100644 --- a/tests/test_components/test_pdk_settings_straight_one_pin_.yml +++ b/tests/test_components/test_pdk_settings_straight_one_pin_.yml @@ -1,29 +1,4 @@ name: straight_one_pin -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 1.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_taper_.yml b/tests/test_components/test_pdk_settings_taper_.yml index 1e4e8267..cf22722b 100644 --- a/tests/test_components/test_pdk_settings_taper_.yml +++ b/tests/test_components/test_pdk_settings_taper_.yml @@ -1,29 +1,4 @@ name: taper -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 10.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_terminator_short_.yml b/tests/test_components/test_pdk_settings_terminator_short_.yml index f8175df8..6b6fe5d2 100644 --- a/tests/test_components/test_pdk_settings_terminator_short_.yml +++ b/tests/test_components/test_pdk_settings_terminator_short_.yml @@ -1,17 +1,4 @@ name: terminator_short -ports: - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180.0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_thermal_phase_shifter0_.yml b/tests/test_components/test_pdk_settings_thermal_phase_shifter0_.yml index f107ae8f..4d1c2a7f 100644 --- a/tests/test_components/test_pdk_settings_thermal_phase_shifter0_.yml +++ b/tests/test_components/test_pdk_settings_thermal_phase_shifter0_.yml @@ -1,53 +1,4 @@ name: thermal_phase_shifter0 -ports: - e1: - center: - - 492.5 - - -3.0 - layer: - - 1 - - 11 - name: e1 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 - e2: - center: - - 7.5 - - -3.0 - layer: - - 1 - - 11 - name: e2 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 3.0 - o2: - center: - - 500.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0 - port_type: optical - shear_angle: null - width: 3.0 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_thermal_phase_shifter1_.yml b/tests/test_components/test_pdk_settings_thermal_phase_shifter1_.yml index d0f7c57f..941f9336 100644 --- a/tests/test_components/test_pdk_settings_thermal_phase_shifter1_.yml +++ b/tests/test_components/test_pdk_settings_thermal_phase_shifter1_.yml @@ -1,53 +1,4 @@ name: thermal_phase_shifter1 -ports: - e1: - center: - - 492.5 - - -3.0 - layer: - - 1 - - 11 - name: e1 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 - e2: - center: - - 7.5 - - -3.0 - layer: - - 1 - - 11 - name: e2 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.35 - o2: - center: - - 500.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.35 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_thermal_phase_shifter2_.yml b/tests/test_components/test_pdk_settings_thermal_phase_shifter2_.yml index a5b8acdf..06ba2110 100644 --- a/tests/test_components/test_pdk_settings_thermal_phase_shifter2_.yml +++ b/tests/test_components/test_pdk_settings_thermal_phase_shifter2_.yml @@ -1,53 +1,4 @@ name: thermal_phase_shifter2 -ports: - e1: - center: - - 492.5 - - -3.0 - layer: - - 1 - - 11 - name: e1 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 - e2: - center: - - 7.5 - - -3.0 - layer: - - 1 - - 11 - name: e2 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.35 - o2: - center: - - 500.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.35 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_thermal_phase_shifter3_.yml b/tests/test_components/test_pdk_settings_thermal_phase_shifter3_.yml index ae7339f8..29007e21 100644 --- a/tests/test_components/test_pdk_settings_thermal_phase_shifter3_.yml +++ b/tests/test_components/test_pdk_settings_thermal_phase_shifter3_.yml @@ -1,53 +1,4 @@ name: thermal_phase_shifter3 -ports: - e1: - center: - - 492.5 - - -3.0 - layer: - - 1 - - 11 - name: e1 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 - e2: - center: - - 7.5 - - -3.0 - layer: - - 1 - - 11 - name: e2 - orientation: 270 - port_type: electrical - shear_angle: null - width: 15.0 - o1: - center: - - 0.0 - - 0.0 - layer: - - 1 - - 0 - name: o1 - orientation: 180 - port_type: optical - shear_angle: null - width: 0.5 - o2: - center: - - 500.0 - - 0.0 - layer: - - 1 - - 0 - name: o2 - orientation: 0 - port_type: optical - shear_angle: null - width: 0.5 settings: changed: {} child: null diff --git a/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml b/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml index 98846dea..d7cdf023 100644 --- a/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml +++ b/tests/test_components/test_pdk_settings_via_stack_heater_mtop_.yml @@ -1,53 +1,4 @@ name: via_stack_627f28a4 -ports: - e1: - center: - - -5.0 - - 0.0 - layer: - - 12 - - 0 - name: e1 - orientation: 180.0 - port_type: electrical - shear_angle: null - width: 10 - e2: - center: - - 0.0 - - 5.0 - layer: - - 12 - - 0 - name: e2 - orientation: 90.0 - port_type: electrical - shear_angle: null - width: 10 - e3: - center: - - 5.0 - - 0.0 - layer: - - 12 - - 0 - name: e3 - orientation: 0.0 - port_type: electrical - shear_angle: null - width: 10 - e4: - center: - - 0.0 - - -5.0 - layer: - - 12 - - 0 - name: e4 - orientation: 270.0 - port_type: electrical - shear_angle: null - width: 10 settings: changed: layers: diff --git a/ubcpdk/samples/notebooks/11_sparameters.py b/ubcpdk/samples/notebooks/11_sparameters.py index 5ff0a782..06ea6d3a 100644 --- a/ubcpdk/samples/notebooks/11_sparameters.py +++ b/ubcpdk/samples/notebooks/11_sparameters.py @@ -29,9 +29,7 @@ import gplugins as sim import gplugins.gtidy3d as gt -import ubcpdk import ubcpdk.components as pdk -from ubcpdk.config import PATH # %% c = pdk.ebeam_y_1550() @@ -55,7 +53,7 @@ # %% [markdown] # ## Lumerical FDTD # -# You can write the [Sparameters](https://en.wikipedia.org/wiki/Scattering_parameters) for all components in the UBC `ubcpdk.components` PDK using lumerical FDTD plugin in gdsfactory +# You can write the [Sparameters](https://en.wikipedia.org/wiki/Scattering_parameters) for all components in the UBC `ubcpdk.components` PDK using lumerical FDTD plugin in gplugins # %% [markdown] # To run simulations uncomment the following lines @@ -83,39 +81,3 @@ # %% # sim.plot_sparameters(sp) - -# %% [markdown] -# ## MEEP FDTD -# -# Meep in an open source FDTD library developed at MIT. -# See [docs](https://meep.readthedocs.io/en/latest/Python_Tutorials/GDSII_Import/) and [code](https://github.com/NanoComp/meep). -# -# You can use the gdsfactory meep plugin to run simulation using meep. You can run examples with `resolution=20` so they run fast. -# -# The resolution is in pixels/um so you need to run with at least `resolution=100` for 1/100 um/pixel (10 nm/ pixel). - -# %% -import gplugins.gmeep as gm - -# %% -c = ubcpdk.components.straight(length=3) -c.plot() - -# %% -df = gm.write_sparameters_meep_1x1(component=c, run=False) - -# %% -df = gm.write_sparameters_meep_1x1(component=c, run=True, dirpath=PATH.sparameters) - -# %% -gm.plot.plot_sparameters(df) - -# %% -gm.plot.plot_sparameters(df, logscale=False) - -# %% -c = ubcpdk.components.ebeam_y_1550() -c - -# %% -df = gm.write_sparameters_meep(component=c, run=False) # lr stands for left-right ports From e0da73ab0204a7e08a97a37fb28b3968be6b8909 Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Sat, 5 Aug 2023 20:36:12 -0700 Subject: [PATCH 8/8] fix cicd --- .github/workflows/test_code.yml | 11 +- .github/write_components_plot.py | 2 +- .github/write_components_plot_klayout.py | 79 ------------- Makefile | 7 +- docs/components_plot.rst | 134 +++++++++++------------ pyproject.toml | 8 +- 6 files changed, 77 insertions(+), 164 deletions(-) delete mode 100644 .github/write_components_plot_klayout.py diff --git a/.github/workflows/test_code.yml b/.github/workflows/test_code.yml index 0c9cbf1b..3353738f 100644 --- a/.github/workflows/test_code.yml +++ b/.github/workflows/test_code.yml @@ -32,8 +32,7 @@ jobs: cache-dependency-path: pyproject.toml - name: Install dependencies run: | - pip install . - pip install pytest pytest_regressions + make dev - name: Test with pytest run: pytest tests/ test_code_coverage: @@ -50,11 +49,9 @@ jobs: cache-dependency-path: pyproject.toml - name: Install dependencies run: | - pip install -e . + make dev - name: Test with pytest run: | - python -m pip install --upgrade pip - pip install pytest klayout lytest scikit-image pytest-cov pytest_regressions pytest --cov=ubcpdk tests/ - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 @@ -80,9 +77,7 @@ jobs: cache-dependency-path: pyproject.toml - name: Install dependencies run: | - make plugins - pip install -e .[docs] --upgrade - pip install numpy --upgrade + make dev pip freeze > requirements.txt - uses: actions/upload-artifact@v3 with: diff --git a/.github/write_components_plot.py b/.github/write_components_plot.py index 8ad6bdcd..14bae7e9 100644 --- a/.github/write_components_plot.py +++ b/.github/write_components_plot.py @@ -74,7 +74,7 @@ import ubcpdk c = ubcpdk.components.{name}({kwargs}) - c.plot_matplotlib() + c.plot_klayout() """ ) diff --git a/.github/write_components_plot_klayout.py b/.github/write_components_plot_klayout.py deleted file mode 100644 index 57d57a5c..00000000 --- a/.github/write_components_plot_klayout.py +++ /dev/null @@ -1,79 +0,0 @@ -import inspect - -from ubcpdk import cells -from ubcpdk.config import PATH - -filepath = PATH.repo / "docs" / "components_plot.rst" - -skip = { - "LIBRARY", - "circuit_names", - "component_factory", - "component_names", - "container_names", - "component_names_test_ports", - "component_names_skip_test", - "component_names_skip_test_ports", - "dataclasses", - "library", - "waveguide_template", -} - -skip_plot: tuple[str, ...] = ("add_fiber_array_siepic",) -skip_settings: tuple[str, ...] = ("flatten", "safe_cell_names") - - -with open(filepath, "w+") as f: - f.write( - """ - -Here are the components available in the PDK - - -Cells -============================= -""" - ) - - for name in sorted(cells.keys()): - if name in skip or name.startswith("_"): - continue - print(name) - sig = inspect.signature(cells[name]) - kwargs = ", ".join( - [ - f"{p}={repr(sig.parameters[p].default)}" - for p in sig.parameters - if isinstance(sig.parameters[p].default, int | float | str | tuple) - and p not in skip_settings - ] - ) - if name in skip_plot: - f.write( - f""" - -{name} ----------------------------------------------------- - -.. autofunction:: ubcpdk.components.{name} - -""" - ) - else: - f.write( - f""" - -{name} ----------------------------------------------------- - -.. autofunction:: ubcpdk.components.{name} - - .. code-block:: python - - import ubcpdk - - c = ubcpdk.components.{name}({kwargs}) - c.plot_klayout() - -""" - ) diff --git a/Makefile b/Makefile index 8522bb1d..b14d8033 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,10 @@ install: - pip install -e . + pip install -e .[dev,docs] pip install pre-commit pre-commit install python install_tech.py -dev: - pip install -e .[dev,docs] +dev: install update-pre: pre-commit autoupdate @@ -42,4 +41,4 @@ release: docs: jb build docs -.PHONY: drc doc docs +.PHONY: drc doc docs install diff --git a/docs/components_plot.rst b/docs/components_plot.rst index ad3c834c..f90a9aa3 100644 --- a/docs/components_plot.rst +++ b/docs/components_plot.rst @@ -18,7 +18,7 @@ add_fiber_array import ubcpdk c = ubcpdk.components.add_fiber_array(gc_port_name='o1', with_loopback=False, optical_routing_type=0, fanout_length=0.0, cross_section='strip', layer_label=(66, 0)) - c.plot_matplotlib() + c.plot_klayout() @@ -33,7 +33,7 @@ add_fiber_array_pads_rf import ubcpdk c = ubcpdk.components.add_fiber_array_pads_rf(component='ring_single_heater', username='JoaquinMatres') - c.plot_matplotlib() + c.plot_klayout() @@ -48,7 +48,7 @@ add_pads import ubcpdk c = ubcpdk.components.add_pads(component='ring_single_heater', username='JoaquinMatres') - c.plot_matplotlib() + c.plot_klayout() @@ -63,7 +63,7 @@ add_pads_dc import ubcpdk c = ubcpdk.components.add_pads_dc(component='ring_single_heater', spacing=(0.0, 100.0)) - c.plot_matplotlib() + c.plot_klayout() @@ -78,7 +78,7 @@ add_pads_rf import ubcpdk c = ubcpdk.components.add_pads_rf(component='ring_single_heater', direction='top', spacing=(0.0, 100.0), layer='MTOP') - c.plot_matplotlib() + c.plot_klayout() @@ -93,7 +93,7 @@ add_pins_bbox_siepic import ubcpdk c = ubcpdk.components.add_pins_bbox_siepic(port_type='optical', layer_pin=(1, 10), pin_length=0.01, bbox_layer=(68, 0), padding=0, remove_layers=False) - c.plot_matplotlib() + c.plot_klayout() @@ -108,7 +108,7 @@ add_pins_bbox_siepic_remove_layers import ubcpdk c = ubcpdk.components.add_pins_bbox_siepic_remove_layers(port_type='optical', layer_pin=(1, 10), pin_length=0.01, bbox_layer=(68, 0), padding=0, remove_layers=True) - c.plot_matplotlib() + c.plot_klayout() @@ -123,7 +123,7 @@ add_pins_siepic_metal import ubcpdk c = ubcpdk.components.add_pins_siepic_metal(port_type='placement', layer_pin=(1, 11), pin_length=0.01) - c.plot_matplotlib() + c.plot_klayout() @@ -138,7 +138,7 @@ bend import ubcpdk c = ubcpdk.components.bend(angle=90.0, p=0.5, with_arc_floorplan=True, direction='ccw', with_bbox=True, cross_section='strip') - c.plot_matplotlib() + c.plot_klayout() @@ -153,7 +153,7 @@ bend_euler import ubcpdk c = ubcpdk.components.bend_euler(angle=90.0, p=0.5, with_arc_floorplan=True, npoints=100, direction='ccw', with_bbox=True, cross_section='strip') - c.plot_matplotlib() + c.plot_klayout() @@ -168,7 +168,7 @@ bend_s import ubcpdk c = ubcpdk.components.bend_s(size=(11.0, 2.0), npoints=99, cross_section='strip', check_min_radius=False) - c.plot_matplotlib() + c.plot_klayout() @@ -183,7 +183,7 @@ coupler import ubcpdk c = ubcpdk.components.coupler(gap=0.236, length=20.0, dy=4.0, dx=10.0) - c.plot_matplotlib() + c.plot_klayout() @@ -198,7 +198,7 @@ coupler_ring import ubcpdk c = ubcpdk.components.coupler_ring(gap=0.2, radius=5.0, length_x=4.0, cross_section='strip', length_extension=3) - c.plot_matplotlib() + c.plot_klayout() @@ -213,7 +213,7 @@ dbg import ubcpdk c = ubcpdk.components.dbg(w0=0.5, dw=0.1, n=100, l1=0.07940573770491803, l2=0.07940573770491803) - c.plot_matplotlib() + c.plot_klayout() @@ -228,7 +228,7 @@ dbr import ubcpdk c = ubcpdk.components.dbr(w0=0.5, dw=0.1, n=100, l1=0.07940573770491803, l2=0.07940573770491803) - c.plot_matplotlib() + c.plot_klayout() @@ -243,7 +243,7 @@ dbr_cavity import ubcpdk c = ubcpdk.components.dbr_cavity() - c.plot_matplotlib() + c.plot_klayout() @@ -258,7 +258,7 @@ dbr_cavity_te import ubcpdk c = ubcpdk.components.dbr_cavity_te(component='dbr_cavity') - c.plot_matplotlib() + c.plot_klayout() @@ -273,7 +273,7 @@ ebeam_BondPad import ubcpdk c = ubcpdk.components.ebeam_BondPad() - c.plot_matplotlib() + c.plot_klayout() @@ -288,7 +288,7 @@ ebeam_adiabatic_te1550 import ubcpdk c = ubcpdk.components.ebeam_adiabatic_te1550() - c.plot_matplotlib() + c.plot_klayout() @@ -303,7 +303,7 @@ ebeam_adiabatic_tm1550 import ubcpdk c = ubcpdk.components.ebeam_adiabatic_tm1550() - c.plot_matplotlib() + c.plot_klayout() @@ -318,7 +318,7 @@ ebeam_bdc_te1550 import ubcpdk c = ubcpdk.components.ebeam_bdc_te1550() - c.plot_matplotlib() + c.plot_klayout() @@ -333,7 +333,7 @@ ebeam_bdc_tm1550 import ubcpdk c = ubcpdk.components.ebeam_bdc_tm1550() - c.plot_matplotlib() + c.plot_klayout() @@ -348,7 +348,7 @@ ebeam_crossing4 import ubcpdk c = ubcpdk.components.ebeam_crossing4() - c.plot_matplotlib() + c.plot_klayout() @@ -363,7 +363,7 @@ ebeam_crossing4_2ports import ubcpdk c = ubcpdk.components.ebeam_crossing4_2ports() - c.plot_matplotlib() + c.plot_klayout() @@ -378,7 +378,7 @@ ebeam_dc_halfring_straight import ubcpdk c = ubcpdk.components.ebeam_dc_halfring_straight(gap=0.2, radius=5.0, length_x=4.0, cross_section='strip', siepic=True, model='ebeam_dc_halfring_straight') - c.plot_matplotlib() + c.plot_klayout() @@ -393,7 +393,7 @@ ebeam_dc_te1550 import ubcpdk c = ubcpdk.components.ebeam_dc_te1550(gap=0.236, length=20.0, dy=4.0, dx=10.0, cross_section='strip') - c.plot_matplotlib() + c.plot_klayout() @@ -408,7 +408,7 @@ ebeam_splitter_adiabatic_swg_te1550 import ubcpdk c = ubcpdk.components.ebeam_splitter_adiabatic_swg_te1550() - c.plot_matplotlib() + c.plot_klayout() @@ -423,7 +423,7 @@ ebeam_splitter_swg_assist_te1310 import ubcpdk c = ubcpdk.components.ebeam_splitter_swg_assist_te1310() - c.plot_matplotlib() + c.plot_klayout() @@ -438,7 +438,7 @@ ebeam_splitter_swg_assist_te1550 import ubcpdk c = ubcpdk.components.ebeam_splitter_swg_assist_te1550() - c.plot_matplotlib() + c.plot_klayout() @@ -453,7 +453,7 @@ ebeam_swg_edgecoupler import ubcpdk c = ubcpdk.components.ebeam_swg_edgecoupler() - c.plot_matplotlib() + c.plot_klayout() @@ -468,7 +468,7 @@ ebeam_terminator_te1310 import ubcpdk c = ubcpdk.components.ebeam_terminator_te1310() - c.plot_matplotlib() + c.plot_klayout() @@ -483,7 +483,7 @@ ebeam_terminator_te1550 import ubcpdk c = ubcpdk.components.ebeam_terminator_te1550() - c.plot_matplotlib() + c.plot_klayout() @@ -498,7 +498,7 @@ ebeam_terminator_tm1550 import ubcpdk c = ubcpdk.components.ebeam_terminator_tm1550() - c.plot_matplotlib() + c.plot_klayout() @@ -513,7 +513,7 @@ ebeam_y_1550 import ubcpdk c = ubcpdk.components.ebeam_y_1550() - c.plot_matplotlib() + c.plot_klayout() @@ -528,7 +528,7 @@ ebeam_y_adiabatic import ubcpdk c = ubcpdk.components.ebeam_y_adiabatic() - c.plot_matplotlib() + c.plot_klayout() @@ -543,7 +543,7 @@ ebeam_y_adiabatic_1310 import ubcpdk c = ubcpdk.components.ebeam_y_adiabatic_1310() - c.plot_matplotlib() + c.plot_klayout() @@ -558,7 +558,7 @@ ebeam_y_adiabatic_tapers import ubcpdk c = ubcpdk.components.ebeam_y_adiabatic_tapers() - c.plot_matplotlib() + c.plot_klayout() @@ -573,7 +573,7 @@ gc_te1310 import ubcpdk c = ubcpdk.components.gc_te1310() - c.plot_matplotlib() + c.plot_klayout() @@ -588,7 +588,7 @@ gc_te1310_8deg import ubcpdk c = ubcpdk.components.gc_te1310_8deg() - c.plot_matplotlib() + c.plot_klayout() @@ -603,7 +603,7 @@ gc_te1310_broadband import ubcpdk c = ubcpdk.components.gc_te1310_broadband() - c.plot_matplotlib() + c.plot_klayout() @@ -618,7 +618,7 @@ gc_te1550 import ubcpdk c = ubcpdk.components.gc_te1550() - c.plot_matplotlib() + c.plot_klayout() @@ -633,7 +633,7 @@ gc_te1550_90nmSlab import ubcpdk c = ubcpdk.components.gc_te1550_90nmSlab() - c.plot_matplotlib() + c.plot_klayout() @@ -648,7 +648,7 @@ gc_te1550_broadband import ubcpdk c = ubcpdk.components.gc_te1550_broadband() - c.plot_matplotlib() + c.plot_klayout() @@ -663,7 +663,7 @@ gc_tm1550 import ubcpdk c = ubcpdk.components.gc_tm1550() - c.plot_matplotlib() + c.plot_klayout() @@ -678,7 +678,7 @@ metal_via import ubcpdk c = ubcpdk.components.metal_via() - c.plot_matplotlib() + c.plot_klayout() @@ -693,7 +693,7 @@ mmi1x2 import ubcpdk c = ubcpdk.components.mmi1x2(width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, with_bbox=True) - c.plot_matplotlib() + c.plot_klayout() @@ -708,7 +708,7 @@ mzi import ubcpdk c = ubcpdk.components.mzi(delta_length=10.0, length_y=2.0, length_x=0.1, with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False) - c.plot_matplotlib() + c.plot_klayout() @@ -723,7 +723,7 @@ mzi_heater import ubcpdk c = ubcpdk.components.mzi_heater(delta_length=10.0, length_y=2.0, length_x=200, straight_x_top='straight_heater_metal', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False) - c.plot_matplotlib() + c.plot_klayout() @@ -738,7 +738,7 @@ pad_array import ubcpdk c = ubcpdk.components.pad_array(spacing=(125, 125), columns=6, rows=1, orientation=270) - c.plot_matplotlib() + c.plot_klayout() @@ -753,7 +753,7 @@ photonic_wirebond_surfacetaper_1310 import ubcpdk c = ubcpdk.components.photonic_wirebond_surfacetaper_1310() - c.plot_matplotlib() + c.plot_klayout() @@ -768,7 +768,7 @@ photonic_wirebond_surfacetaper_1550 import ubcpdk c = ubcpdk.components.photonic_wirebond_surfacetaper_1550() - c.plot_matplotlib() + c.plot_klayout() @@ -782,8 +782,8 @@ ring_double_heater import ubcpdk - c = ubcpdk.components.ring_double_heater(gap=0.2, radius=10.0, length_x=0.01, length_y=0.01, cross_section_heater='heater_metal', cross_section_waveguide_heater='strip_heater_metal', cross_section='strip', port_orientation=90, via_stack_offset=(0, 0)) - c.plot_matplotlib() + c = ubcpdk.components.ring_double_heater(gap=0.2, radius=10.0, length_x=0.01, length_y=0.01, cross_section_heater='heater_metal', cross_section_waveguide_heater='strip_heater_metal', cross_section='strip', via_stack_offset=(0, 0)) + c.plot_klayout() @@ -798,7 +798,7 @@ ring_single import ubcpdk c = ubcpdk.components.ring_single(gap=0.2, radius=10.0, length_x=4.0, length_y=0.6, cross_section='strip') - c.plot_matplotlib() + c.plot_klayout() @@ -812,8 +812,8 @@ ring_single_heater import ubcpdk - c = ubcpdk.components.ring_single_heater(gap=0.2, radius=10.0, length_x=4.0, length_y=0.6, cross_section_waveguide_heater='strip_heater_metal', cross_section='strip', port_orientation=90, via_stack_offset=(0, 0)) - c.plot_matplotlib() + c = ubcpdk.components.ring_single_heater(gap=0.2, radius=10.0, length_x=4.0, length_y=0.6, cross_section_waveguide_heater='strip_heater_metal', cross_section='strip', via_stack_offset=(0, 0)) + c.plot_klayout() @@ -828,7 +828,7 @@ ring_with_crossing import ubcpdk c = ubcpdk.components.ring_with_crossing(gap=0.2, length_x=4, length_y=0, radius=5.0, with_component=True, port_name='o4') - c.plot_matplotlib() + c.plot_klayout() @@ -843,7 +843,7 @@ spiral import ubcpdk c = ubcpdk.components.spiral(N=6, x_inner_length_cutback=300.0, x_inner_offset=0.0, y_straight_inner_top=0.0, xspacing=3.0, yspacing=3.0, cross_section='strip', with_inner_ports=False, y_straight_outer_offset=0.0, inner_loop_spacing_offset=0.0) - c.plot_matplotlib() + c.plot_klayout() @@ -858,7 +858,7 @@ straight import ubcpdk c = ubcpdk.components.straight(length=10.0, npoints=2, with_bbox=True, cross_section='strip') - c.plot_matplotlib() + c.plot_klayout() @@ -873,7 +873,7 @@ straight_one_pin import ubcpdk c = ubcpdk.components.straight_one_pin(length=1) - c.plot_matplotlib() + c.plot_klayout() @@ -888,7 +888,7 @@ taper import ubcpdk c = ubcpdk.components.taper(length=10.0, width1=0.5, with_bbox=True, with_two_ports=True, cross_section='strip') - c.plot_matplotlib() + c.plot_klayout() @@ -903,7 +903,7 @@ terminator_short import ubcpdk c = ubcpdk.components.terminator_short() - c.plot_matplotlib() + c.plot_klayout() @@ -918,7 +918,7 @@ thermal_phase_shifter0 import ubcpdk c = ubcpdk.components.thermal_phase_shifter0() - c.plot_matplotlib() + c.plot_klayout() @@ -933,7 +933,7 @@ thermal_phase_shifter1 import ubcpdk c = ubcpdk.components.thermal_phase_shifter1() - c.plot_matplotlib() + c.plot_klayout() @@ -948,7 +948,7 @@ thermal_phase_shifter2 import ubcpdk c = ubcpdk.components.thermal_phase_shifter2() - c.plot_matplotlib() + c.plot_klayout() @@ -963,7 +963,7 @@ thermal_phase_shifter3 import ubcpdk c = ubcpdk.components.thermal_phase_shifter3() - c.plot_matplotlib() + c.plot_klayout() @@ -978,4 +978,4 @@ via_stack_heater_mtop import ubcpdk c = ubcpdk.components.via_stack_heater_mtop(size=(10, 10), layers=((11, 0), (12, 0)), vias=(None, None), correct_size=True) - c.plot_matplotlib() + c.plot_klayout() diff --git a/pyproject.toml b/pyproject.toml index 1f7f3bac..671edb61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ "Operating System :: OS Independent" ] dependencies = [ - "gdsfactory==7.0.2", + "gdsfactory>=7.1.0,<7.2.0", "gplugins[tidy3d]>=0.0.3,<0.1.0" ] description = "ubcpdk pdk" @@ -30,16 +30,14 @@ version = "1.21.3" dev = [ "pytest", "pytest-cov", - "pytest_regressions" + "pytest_regressions", + "pre-commit" ] docs = [ "autodoc_pydantic", "jupytext", "jupyter-book==0.15.1" ] -full = [ - "femwell" -] [tool.black] exclude = ''' # Specify the files/dirs that should be ignored by the black formatter