Skip to content

Commit

Permalink
Update example_Ring_resonator_sweep.py
Browse files Browse the repository at this point in the history
add verification to the example
  • Loading branch information
lukasc-ubc committed Nov 19, 2023
1 parent af549b3 commit 665eabe
Showing 1 changed file with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
print('SiEPIC_EBeam_PDK: example_Ring_resonator_sweep.py')
import pya
from pya import *

# SiEPIC - can be loaded from PyPI or in KLayout Application, or loaded from a local folder such as GitHub
import os, sys
path_GitHub = '/Users/lukasc/Documents/GitHub/'
if os.path.exists(path_GitHub):
path_siepic = os.path.join(path_GitHub, 'SiEPIC-Tools/klayout_dot_config/python')
if not path_siepic in sys.path:
sys.path.insert(0,path_siepic) # put SiEPIC at the beginning so that it is overrides the system-installed module
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)
Expand Down Expand Up @@ -160,7 +166,15 @@ def dbl_bus_ring_res():
# Save
path = os.path.dirname(os.path.realpath(__file__))
export_layout(cell, path, 'Test_structures_ring_resonators', relative_path = '', format='oas', screenshot=True)

return ly, cell

dbl_bus_ring_res()
ly, cell = dbl_bus_ring_res()

from SiEPIC.verification import layout_check
print('SiEPIC_EBeam_PDK: example_Ring_resonator_sweep.py - verification')

layout_check(cell = cell, verbose=True, GUI=True)


print('SiEPIC_EBeam_PDK: example_Ring_resonator_sweep.py - done')

0 comments on commit 665eabe

Please sign in to comment.