diff --git a/klayout/EBeam/pymacros/Example_scripted_layouts/example_Ring_resonator_sweep.lym b/klayout/EBeam/pymacros/Example_scripted_layouts/example_Ring_resonator_sweep.py similarity index 86% rename from klayout/EBeam/pymacros/Example_scripted_layouts/example_Ring_resonator_sweep.lym rename to klayout/EBeam/pymacros/Example_scripted_layouts/example_Ring_resonator_sweep.py index 139b2d3c..1644fddf 100644 --- a/klayout/EBeam/pymacros/Example_scripted_layouts/example_Ring_resonator_sweep.lym +++ b/klayout/EBeam/pymacros/Example_scripted_layouts/example_Ring_resonator_sweep.py @@ -1,33 +1,41 @@ - - - Double-bus ring resonator sweep (EBeam) - - pymacros - - - - false - false - 0 - - true - Examples_EBeam - siepic_menu.exlayout.begin - python - - ''' +# $description: Double-bus ring resonator sweep (EBeam) +# $show-in-menu +# $group-name: Examples_EBeam +# $menu-path: siepic_menu.exlayout.begin +# Unit testing for all library layout fixed cells and PCells + +''' Scripted layout for ring resonators using SiEPIC-Tools in the SiEPIC-EBeam-PDK "EBeam" technology -by Lukas Chrostowski, 2020-2022 +by Lukas Chrostowski, 2020-2023 ''' +print('SiEPIC_EBeam_PDK: example_Ring_resonator_sweep.py') +import pya from pya import * +import SiEPIC +import os + +from SiEPIC._globals import Python_Env +from SiEPIC.scripts import load_klayout_technology + +if Python_Env == 'Script': + path_GitHub = '/Users/lukasc/Documents/GitHub/' + path_module = os.path.join(path_GitHub, 'SiEPIC_EBeam_PDK/klayout') + path_lyt_file = os.path.join(path_GitHub, 'SiEPIC_EBeam_PDK/klayout/EBeam/EBeam.lyt') + tech = load_klayout_technology('EBeam', path_module, path_lyt_file) + # Example layout function def dbl_bus_ring_res(): + # Import functions from SiEPIC-Tools + from SiEPIC.extend import to_itype + from SiEPIC.scripts import connect_cell, connect_pins_with_waveguide, zoom_out, export_layout + from SiEPIC.utils.layout import new_layout, floorplan + # Create a layout for testing a double-bus ring resonator. # uses: # - the SiEPIC EBeam Library @@ -55,17 +63,12 @@ def dbl_bus_ring_res(): and Draw the floor plan ''' tech_name = 'EBeam' - from SiEPIC.utils.layout import new_layout, floorplan cell, ly = new_layout(tech_name, 'top', GUI=True, overwrite = True) floorplan(cell, 605e3, 410e3) - if SiEPIC.__version__ < '0.4.7': + if SiEPIC.__version__ < '0.4.7': pya.MessageBox.warning("Errors", "This example requires SiEPIC-Tools version 0.4.7 or greater.", pya.MessageBox.Ok) - # Import functions from SiEPIC-Tools - from SiEPIC.extend import to_itype - from SiEPIC.scripts import connect_cell, connect_pins_with_waveguide - # Layer mapping: LayerSiN = ly.layer(ly.TECHNOLOGY['Si']) fpLayerN = cell.layout().layer(ly.TECHNOLOGY['FloorPlan']) @@ -152,13 +155,12 @@ def dbl_bus_ring_res(): connect_pins_with_waveguide(instGCs[3], 'opt1', inst_dc2, 'pin3', waveguide_type=waveguide_type) # Zoom out - from SiEPIC.scripts import zoom_out zoom_out(cell) - - from SiEPIC.scripts import export_layout + + # Save path = os.path.dirname(os.path.realpath(__file__)) export_layout(cell, path, 'Test_structures_ring_resonators', relative_path = '', format='oas', screenshot=True) dbl_bus_ring_res() - - + +print('SiEPIC_EBeam_PDK: example_Ring_resonator_sweep.py - done') diff --git a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library.py b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library.py index 902d9281..3527b5bd 100644 --- a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library.py +++ b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library.py @@ -96,6 +96,9 @@ Lukas 2021/04/01 - fixing loading library (previous collisions with other PDKs) + +Lukas 2023/11 + - compatibility with PyPI usage of KLayout """ diff --git a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Beta.py b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Beta.py index 2f9ff6b6..208621ae 100644 --- a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Beta.py +++ b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Beta.py @@ -111,6 +111,9 @@ def PCell_get_parameters ( pcell ): Lukas Chrostowski 2020/04/03 - SWG_assisted_Strip_WG based on SWG waveguide: adds a strip waveguide + +Lukas 2023/11 + - compatibility with PyPI usage of KLayout todo: replace: diff --git a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_SiN.py b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_SiN.py index 26dfddc3..362f8cb8 100644 --- a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_SiN.py +++ b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_SiN.py @@ -18,6 +18,7 @@ - components for 1550 and 1310 - waveguides for 1550 and 1310 - compound waveguide + - compatibility with PyPI usage of KLayout """ print('siepic_ebeam_library_SiN') diff --git a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_Bend.py b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_Bend.py index 6ad89f23..f3c68c40 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_Bend.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_Bend.py @@ -1,6 +1,7 @@ from pya import * +import pya -class Waveguide_Bend(PCellDeclarationHelper): +class Waveguide_Bend(pya.PCellDeclarationHelper): """ The PCell declaration for the waveguide bend. """ diff --git a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_SBend.py b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_SBend.py index 0506a8ea..14f5d5ab 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_SBend.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_SBend.py @@ -1,6 +1,7 @@ from pya import * +import pya -class Waveguide_SBend(PCellDeclarationHelper): +class Waveguide_SBend(pya.PCellDeclarationHelper): """ Input: """ diff --git a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_Straight.py b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_Straight.py index 65d8e2e3..51f84be1 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_Straight.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_Straight.py @@ -1,6 +1,7 @@ from pya import * +import pya -class Waveguide_Straight(PCellDeclarationHelper): +class Waveguide_Straight(pya.PCellDeclarationHelper): """ Input: length, width draws a straight waveguide with pins. centred at the instantiation point. diff --git a/klayout/EBeam/pymacros/pcells_EBeam/Wireguide.py b/klayout/EBeam/pymacros/pcells_EBeam/Wireguide.py index 5e0839f1..498da743 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/Wireguide.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/Wireguide.py @@ -1,6 +1,7 @@ from pya import * +import pya -class Wireguide(PCellDeclarationHelper): +class Wireguide(pya.PCellDeclarationHelper): ''' RIT Integrated Photonics Group of Stefan Preble (Karl McNulty) new wireguide class (essentially the metal path equivalent to a waveguide but no bend is allowed) diff --git a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_bragg_te1550.py b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_bragg_te1550.py index 0bea19da..bf23dd1a 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_bragg_te1550.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_bragg_te1550.py @@ -1,6 +1,7 @@ +import pya from pya import * import math -class ebeam_bragg_te1550(PCellDeclarationHelper): +class ebeam_bragg_te1550(pya.PCellDeclarationHelper): """ Input: length, width """ diff --git a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py index 7506e281..f6864e13 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py @@ -1,6 +1,7 @@ +import pya from pya import * -class ebeam_dc_halfring_straight(PCellDeclarationHelper): +class ebeam_dc_halfring_straight(pya.PCellDeclarationHelper): """ The PCell declaration for the ebeam_dc_halfring_straight. Consists of a half-ring with 1 waveguides. diff --git a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_te1550.py b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_te1550.py index be86adb7..95ec7b62 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_te1550.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_te1550.py @@ -1,6 +1,7 @@ from pya import * +import pya -class ebeam_dc_te1550(PCellDeclarationHelper): +class ebeam_dc_te1550(pya.PCellDeclarationHelper): """ The PCell declaration for the Directional Coupler by Lukas Chrostowski, 2018/09 diff --git a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_taper_te1550.py b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_taper_te1550.py index a025e398..a941c6a7 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_taper_te1550.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_taper_te1550.py @@ -1,6 +1,7 @@ +import pya from pya import * -class ebeam_taper_te1550(PCellDeclarationHelper): +class ebeam_taper_te1550(pya.PCellDeclarationHelper): """ The PCell declaration for the strip waveguide taper. """ diff --git a/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py b/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py index a6d0e144..23ca7b2f 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py @@ -15,8 +15,6 @@ class wg_heater(pya.PCellDeclarationHelper): def __init__(self): - print('pcells_EBeam/wg_heater: __init__ start') - # Important: initialize the super class super(wg_heater, self).__init__()