diff --git a/submissions/KLayout Python/EBeam_LukasChrostowski_MZI.py b/submissions/KLayout Python/EBeam_LukasChrostowski_MZI.py index 715f13b7..e8154eb2 100644 --- a/submissions/KLayout Python/EBeam_LukasChrostowski_MZI.py +++ b/submissions/KLayout Python/EBeam_LukasChrostowski_MZI.py @@ -21,6 +21,7 @@ designer_name = 'LukasChrostowski' top_cell_name = 'EBeam_%s_MZI' % designer_name +export_type = 'PCell' # static: for fabrication, PCell: include PCells in file import pya from pya import * @@ -156,10 +157,14 @@ # Zoom out zoom_out(cell) -# Save +# Export for fabrication, removing PCells path = os.path.dirname(os.path.realpath(__file__)) filename = os.path.splitext(os.path.basename(__file__))[0] -file_out = export_layout(cell, path, filename, relative_path = '..', format='oas', screenshot=True) +if export_type == 'static': + file_out = export_layout(cell, path, filename, relative_path = '..', format='oas', screenshot=True) +else: + file_out = os.path.join(path,'..',filename+'.oas') + ly.write(file_out) # Verify file_lyrdb = os.path.join(path,filename+'.lyrdb') diff --git a/submissions/KLayout Python/EBeam_LukasChrostowski_rings.py b/submissions/KLayout Python/EBeam_LukasChrostowski_rings.py index ebb20b70..d75761e1 100644 --- a/submissions/KLayout Python/EBeam_LukasChrostowski_rings.py +++ b/submissions/KLayout Python/EBeam_LukasChrostowski_rings.py @@ -15,6 +15,7 @@ designer_name = 'LukasChrostowski' top_cell_name = 'EBeam_%s_rings' % designer_name +export_type = 'PCell' # static: for fabrication, PCell: include PCells in file import pya from pya import * @@ -156,17 +157,20 @@ def dbl_bus_ring_res(): num_errors = layout_check(cell=cell, verbose=False, GUI=True) print('Number of errors: %s' % num_errors) -# Save +# Export for fabrication, removing PCells path = os.path.dirname(os.path.realpath(__file__)) filename = os.path.splitext(os.path.basename(__file__))[0] -file_out = export_layout(cell, path, filename, relative_path = '..', format='oas', screenshot=True) +if export_type == 'static': + file_out = export_layout(cell, path, filename, relative_path = '..', format='oas', screenshot=True) +else: + file_out = os.path.join(path,'..',filename+'.oas') + ly.write(file_out) from SiEPIC.verification import layout_check print('SiEPIC_EBeam_PDK: example_Ring_resonator_sweep.py - verification') file_lyrdb = os.path.join(path,filename+'.lyrdb') num_errors = layout_check(cell = cell, verbose=False, GUI=True, file_rdb=file_lyrdb) - # Display the layout in KLayout, using KLayout Package "klive", which needs to be installed in the KLayout Application if Python_Env == 'Script': from SiEPIC.utils import klive