From 8b637c3e2a9c780bc80c471fbe7c1ea6f3fd656f Mon Sep 17 00:00:00 2001 From: Lukas Chrostowski Date: Mon, 29 Jul 2024 03:24:41 -0700 Subject: [PATCH] Ruff --fix linting --- .../EBeam/CDC_SM/MATLAB/matlabenginestart.py | 12 ++++---- .../EBeam/source_data/CDC/contraDC_CMT_TMM.py | 4 +-- .../EBeam/source_data/CDC/lumerical_tools.py | 6 ++-- .../EBeam/CML/EBeam/source_data/CDC/main.py | 4 ++- klayout/EBeam/__init__.py | 3 +- .../UnitTest_All_Library_Cells.py | 11 ++++--- klayout/EBeam/pymacros/PCMSpiral_PCells.py | 3 +- .../EBeam/pymacros/SiEPIC_EBeam_Library.py | 6 ++-- .../pymacros/SiEPIC_EBeam_Library_ANT.py | 6 ++-- .../pymacros/SiEPIC_EBeam_Library_Beta.py | 5 ++-- .../pymacros/SiEPIC_EBeam_Library_Dream.py | 2 -- .../pymacros/SiEPIC_EBeam_Library_SiN.py | 6 ++-- .../broken/TestStruct_DoubleBus_Ring.py | 2 +- klayout/EBeam/pymacros/broken/phc_test.py | 3 +- .../EBeam/pymacros/pcells_EBeam/Waveguide.py | 2 +- .../pymacros/pcells_EBeam/Waveguide_SBend.py | 2 +- .../pymacros/pcells_EBeam/Waveguide_bump.py | 7 ++--- .../EBeam/pymacros/pcells_EBeam/Wireguide.py | 3 +- .../EBeam/pymacros/pcells_EBeam/__init__.py | 3 +- .../contra_directional_coupler.py | 1 - .../ebeam_dc_halfring_straight.py | 3 +- .../EBeam/pymacros/pcells_EBeam/wg_heater.py | 3 +- .../pymacros/pcells_EBeam_Beta/Bezier_Bend.py | 1 - .../pcells_EBeam_Beta/BraggWaveguide_holes.py | 1 - .../pcells_EBeam_Beta/Bragg_encoder.py | 2 +- .../pcells_EBeam_Beta/Contra_DC_Bent.py | 13 ++++---- .../Contra_DC_CouplerApodized.py | 4 +-- .../pcells_EBeam_Beta/Contra_DC_chirped.py | 9 +++--- .../DirectionalCoupler_Bent.py | 1 - .../DirectionalCoupler_SeriesRings.py | 1 - .../Grating_Coupler_FSWGC.py | 2 +- .../pymacros/pcells_EBeam_Beta/MMI_2x2.py | 1 - .../MultiBox_BraggGrating.py | 1 - .../pcells_EBeam_Beta/SWG_MultiBox_Ring.py | 1 - .../pymacros/pcells_EBeam_Beta/SWG_Ring.py | 2 -- .../pymacros/pcells_EBeam_Beta/SWG_bentWG.py | 1 - .../pcells_EBeam_Beta/Tapered_Ring.py | 3 -- .../pcells_EBeam_Beta/Universal_GC.py | 10 +++---- .../pcells_EBeam_Beta/Waveguide_Arc.py | 1 - .../pcells_EBeam_Beta/Waveguide_Bend.py | 3 +- .../pymacros/pcells_EBeam_Beta/__init__.py | 3 +- .../pymacros/pcells_EBeam_Beta/cavity_hole.py | 5 +--- .../ebeam_PWB_surface_taper.py | 1 - .../pcells_EBeam_Beta/ebeam_bragg_apodized.py | 4 +-- .../pcells_EBeam_Beta/ebeam_irph_mrr.py | 5 ++-- .../pcells_EBeam_Beta/ebeam_irph_wg.py | 18 +++++------ .../ebeam_rib_phase_shifter.py | 12 +++----- .../ebeam_rib_phase_shifter_folded.py | 22 +++++++------- .../ebeam_rib_phase_shifter_folded_inside.py | 22 +++++++------- .../pcells_EBeam_Beta/ebeam_test_bends.py | 6 ++-- .../pymacros/pcells_EBeam_Beta/phc_H0c.py | 3 +- .../pymacros/pcells_EBeam_Beta/phc_H0c_new.py | 3 +- .../pcells_EBeam_Beta/phc_H0c_oxide.py | 3 +- .../pymacros/pcells_EBeam_Beta/phc_L3c.py | 3 +- .../pymacros/pcells_EBeam_Beta/phc_gc_hex.py | 3 +- .../pymacros/pcells_EBeam_Beta/phc_wg_w1.py | 3 +- .../pcells_EBeam_Beta/ring_singlebus.py | 3 +- .../pymacros/pcells_EBeam_Beta/spiral.py | 28 +++++++++--------- .../pcells_EBeam_Beta/spiral_paperclip.py | 4 +-- .../pcells_EBeam_Beta/strip_to_slot.py | 7 +---- .../pymacros/pcells_EBeam_Beta/swg_fc.py | 7 ++--- .../pymacros/pcells_EBeam_Beta/swg_fc_test.py | 5 ++-- .../pcells_EBeam_Beta/taper_bezier.oas | Bin 0 -> 4489 bytes .../pcells_EBeam_Beta/taper_bezier.py | 4 +-- .../ebeam_dream_PWB_edge_couplers_BB.py | 5 +--- .../ebeam_dream_splitter_1x2_te1550_BB.py | 2 +- .../EBeam/pymacros/pcells_SiN/Universal_GC.py | 13 ++++---- .../pymacros/pcells_SiN/Waveguide_bump.py | 7 ++--- .../pcells_SiN/ebeam_dc_halfring_straight.py | 3 +- .../photonic_crystals/photonic_crystals.py | 4 +-- .../pymacros/tests/test_All_Library_Cells.py | 9 ++---- .../pymacros/tests/test_waveguide_sliver.oas | Bin 0 -> 1626 bytes .../pymacros/tests/test_waveguide_sliver.py | 9 ++---- 73 files changed, 157 insertions(+), 223 deletions(-) create mode 100644 klayout/EBeam/pymacros/pcells_EBeam_Beta/taper_bezier.oas create mode 100644 klayout/EBeam/pymacros/tests/test_waveguide_sliver.oas diff --git a/klayout/EBeam/CDC_SM/MATLAB/matlabenginestart.py b/klayout/EBeam/CDC_SM/MATLAB/matlabenginestart.py index bb01b840..cc9e1bfc 100644 --- a/klayout/EBeam/CDC_SM/MATLAB/matlabenginestart.py +++ b/klayout/EBeam/CDC_SM/MATLAB/matlabenginestart.py @@ -5,7 +5,9 @@ @author: Mustafa Hammood """ -import os,time, math +import os +import time +import math import numpy as np #import matplotlib.pyplot as plt @@ -43,10 +45,10 @@ _lambda = np.linspace(1500,1600,10001)*1e-9 -n_eff1 = n_eff1_fit[0] + n_eff1_fit[1]*_lambda; -n_eff2 = n_eff2_fit[0] + n_eff2_fit[1]*_lambda; -n_g1 = n_g1_fit[0] + n_g1_fit[1]*_lambda; -n_g2 = n_g2_fit[0] + n_g2_fit[1]*_lambda; +n_eff1 = n_eff1_fit[0] + n_eff1_fit[1]*_lambda +n_eff2 = n_eff2_fit[0] + n_eff2_fit[1]*_lambda +n_g1 = n_g1_fit[0] + n_g1_fit[1]*_lambda +n_g2 = n_g2_fit[0] + n_g2_fit[1]*_lambda def find_nearest(a, a0): "Element in nd array `a` closest to the scalar value `a0`" diff --git a/klayout/EBeam/CML/EBeam/source_data/CDC/contraDC_CMT_TMM.py b/klayout/EBeam/CML/EBeam/source_data/CDC/contraDC_CMT_TMM.py index 61488fea..f775a0f2 100644 --- a/klayout/EBeam/CML/EBeam/source_data/CDC/contraDC_CMT_TMM.py +++ b/klayout/EBeam/CML/EBeam/source_data/CDC/contraDC_CMT_TMM.py @@ -6,8 +6,8 @@ """ #%% import dependencies -import cmath, math -import sys, os, time +import cmath +import math import numpy as np import scipy.linalg diff --git a/klayout/EBeam/CML/EBeam/source_data/CDC/lumerical_tools.py b/klayout/EBeam/CML/EBeam/source_data/CDC/lumerical_tools.py index 53583784..bc09691c 100644 --- a/klayout/EBeam/CML/EBeam/source_data/CDC/lumerical_tools.py +++ b/klayout/EBeam/CML/EBeam/source_data/CDC/lumerical_tools.py @@ -10,7 +10,9 @@ #%% find lumapi -import sys, os, platform +import sys +import os +import platform mode = None # variable for the Lumerical Python API @@ -41,7 +43,7 @@ matches.append(root) if matches: lumapi_path = matches[0] -if not lumapi_path in sys.path: +if lumapi_path not in sys.path: sys.path.append(lumapi_path) # os.chdir(lumapi_path) diff --git a/klayout/EBeam/CML/EBeam/source_data/CDC/main.py b/klayout/EBeam/CML/EBeam/source_data/CDC/main.py index 26b242f5..323b628f 100644 --- a/klayout/EBeam/CML/EBeam/source_data/CDC/main.py +++ b/klayout/EBeam/CML/EBeam/source_data/CDC/main.py @@ -25,7 +25,9 @@ # conda install numpy scipy matplotlib xmltodict -import xmltodict, sys, os +import xmltodict +import sys +import os from collections import OrderedDict from xml.etree import cElementTree as ET diff --git a/klayout/EBeam/__init__.py b/klayout/EBeam/__init__.py index 1f984205..8090f703 100644 --- a/klayout/EBeam/__init__.py +++ b/klayout/EBeam/__init__.py @@ -1,7 +1,8 @@ print('SiEPIC-EBeam-PDK Python module: siepic_ebeam_pdk, KLayout technology: EBeam') # Load the KLayout technology, when running in Script mode -import pya, os +import pya +import os if not pya.Technology().has_technology('EBeam'): tech = pya.Technology().create_technology('EBeam') tech.load(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'EBeam.lyt')) diff --git a/klayout/EBeam/pymacros/Example_scripted_layouts/UnitTest_All_Library_Cells.py b/klayout/EBeam/pymacros/Example_scripted_layouts/UnitTest_All_Library_Cells.py index 9e432fa0..e78e5a91 100644 --- a/klayout/EBeam/pymacros/Example_scripted_layouts/UnitTest_All_Library_Cells.py +++ b/klayout/EBeam/pymacros/Example_scripted_layouts/UnitTest_All_Library_Cells.py @@ -4,21 +4,20 @@ # $menu-path: siepic_menu.exlayout.end # Unit testing for all library layout fixed cells and PCells -import pya # klayout -import os, sys +import os +import sys path_GitHub = os.path.expanduser('~/Documents/GitHub/') if 0: if 'SiEPIC' not in sys.modules: path_siepic = os.path.join(path_GitHub, 'SiEPIC-Tools/klayout_dot_config/python') - if not path_siepic in sys.path: + if path_siepic not in sys.path: sys.path.insert(0,path_siepic) -import SiEPIC from SiEPIC._globals import Python_Env print('KLayout running in mode: %s' % Python_Env) -from SiEPIC.utils.layout import new_layout, floorplan +from SiEPIC.utils.layout import new_layout from SiEPIC.utils import load_klayout_technology -from SiEPIC.scripts import instantiate_all_library_cells, zoom_out, export_layout +from SiEPIC.scripts import instantiate_all_library_cells, export_layout 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') diff --git a/klayout/EBeam/pymacros/PCMSpiral_PCells.py b/klayout/EBeam/pymacros/PCMSpiral_PCells.py index 13e8daa9..ecaf3b8d 100644 --- a/klayout/EBeam/pymacros/PCMSpiral_PCells.py +++ b/klayout/EBeam/pymacros/PCMSpiral_PCells.py @@ -2,8 +2,7 @@ import math import cmath from pya import * -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.scripts import path_to_waveguide +from SiEPIC.utils import get_technology_by_name MODULE_NUMPY = True diff --git a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library.py b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library.py index d3f4275b..b66a2d52 100644 --- a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library.py +++ b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library.py @@ -106,13 +106,12 @@ import pya from pya import * -from SiEPIC.utils import get_technology_by_name import os import pathlib import sys -from SiEPIC._globals import KLAYOUT_VERSION, KLAYOUT_VERSION_3 +from SiEPIC._globals import KLAYOUT_VERSION if KLAYOUT_VERSION < 28: question = pya.QMessageBox() question.setStandardButtons(pya.QMessageBox.Ok) @@ -164,7 +163,8 @@ def __init__(self): self.path = os.path.dirname(os.path.realpath(__file__)) # Import all the GDS files from the tech folder - import os, fnmatch + import os + import fnmatch dir_path = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../gds/EBeam")) if verbose: print(' library path: %s' % dir_path) diff --git a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_ANT.py b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_ANT.py index b1655078..f0156306 100644 --- a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_ANT.py +++ b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_ANT.py @@ -10,11 +10,8 @@ if verbose: print('SiEPIC_EBeam_Library_ANT') -import pya from pya import * -from SiEPIC.utils import get_technology_by_name import os -import pathlib import sys dir_path = os.path.dirname(os.path.realpath(__file__)) @@ -56,7 +53,8 @@ def __init__(self): self.path = os.path.dirname(os.path.realpath(__file__)) # Import all the GDS files from the tech folder - import os, fnmatch + import os + import fnmatch dir_path = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../gds/ANT")) if verbose: print(' library path: %s' % dir_path) diff --git a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Beta.py b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Beta.py index b9e0a37e..6604a0a7 100644 --- a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Beta.py +++ b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Beta.py @@ -131,9 +131,7 @@ def PCell_get_parameters ( pcell ): if verbose: print('SiEPIC_EBeam_Library_Beta, version %s' % version) -import pya from pya import * -from SiEPIC.utils import get_technology_by_name import os import pathlib import sys @@ -180,7 +178,8 @@ def __init__(self): self.path = os.path.dirname(os.path.realpath(__file__)) # Import all the GDS files from the tech folder - import os, fnmatch + import os + import fnmatch dir_path = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../gds/EBeam_Beta")) if verbose: print(' library path: %s' % dir_path) diff --git a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Dream.py b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Dream.py index f2946fef..52de4712 100644 --- a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Dream.py +++ b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_Dream.py @@ -11,9 +11,7 @@ if verbose: print('EBeam-Dream') -import pya from pya import * -from SiEPIC.utils import get_technology_by_name import os import pathlib import sys diff --git a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_SiN.py b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_SiN.py index 1b6ce54e..888b6ffe 100644 --- a/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_SiN.py +++ b/klayout/EBeam/pymacros/SiEPIC_EBeam_Library_SiN.py @@ -26,10 +26,7 @@ if verbose: print('siepic_ebeam_library_SiN') -import pya from pya import * -from SiEPIC.utils import get_technology_by_name -from SiEPIC.utils.layout import make_pin import os import pathlib import sys @@ -77,7 +74,8 @@ def __init__(self): self.path = os.path.dirname(os.path.realpath(__file__)) # Import all the GDS files from the tech folder - import os, fnmatch + import os + import fnmatch dir_path = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../gds/EBeam_SiN")) if verbose: print(' library path: %s' % dir_path) diff --git a/klayout/EBeam/pymacros/broken/TestStruct_DoubleBus_Ring.py b/klayout/EBeam/pymacros/broken/TestStruct_DoubleBus_Ring.py index 63f4bc87..f646b65a 100644 --- a/klayout/EBeam/pymacros/broken/TestStruct_DoubleBus_Ring.py +++ b/klayout/EBeam/pymacros/broken/TestStruct_DoubleBus_Ring.py @@ -70,7 +70,7 @@ def produce_impl(self): if lib == None: raise Exception("Unknown lib 'EBeam_Beta'") - pcell_decl = lib.layout().pcell_declaration("DoubleBus_Ring"); + pcell_decl = lib.layout().pcell_declaration("DoubleBus_Ring") if pcell_decl == None: raise Exception("Unknown PCell 'DoubleBus_Ring'") param = { diff --git a/klayout/EBeam/pymacros/broken/phc_test.py b/klayout/EBeam/pymacros/broken/phc_test.py index 1ce17539..68303faa 100644 --- a/klayout/EBeam/pymacros/broken/phc_test.py +++ b/klayout/EBeam/pymacros/broken/phc_test.py @@ -1,7 +1,6 @@ import pya from pya import * -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout +from SiEPIC.utils import get_technology_by_name import math class phc_test(pya.PCellDeclarationHelper): diff --git a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide.py b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide.py index 2205d8b3..44a71ebd 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide.py @@ -17,7 +17,7 @@ def __init__(self): # Important: initialize the super class super(Waveguide, self).__init__() - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import load_Waveguides_by_Tech ''' # https://github.com/KLayout/klayout/issues/879 diff --git a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_SBend.py b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_SBend.py index e2968480..9080cacd 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_SBend.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_SBend.py @@ -42,7 +42,7 @@ def produce_impl(self): ly = self.layout shapes = self.cell.shapes - from SiEPIC.utils.layout import layout_waveguide_sbend, layout_waveguide_sbend_bezier + from SiEPIC.utils.layout import layout_waveguide_sbend_bezier from SiEPIC.extend import to_itype LayerSi = self.layer diff --git a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_bump.py b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_bump.py index 5ffd8dfc..65ce37ad 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_bump.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/Waveguide_bump.py @@ -59,7 +59,6 @@ def coerce_parameters_impl(self): else: mult = 1 self.radius = float(params[0]['radius']) * mult - from SiEPIC.extend import to_itype self.wg_width = float(params[0]['width']) @@ -73,7 +72,7 @@ def produce_impl(self): ly = self.layout shapes = self.cell.shapes - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import get_technology_by_name TECHNOLOGY = get_technology_by_name('EBeam') params = [t for t in self.waveguide_types if t['name'] == self.waveguide_type] layer = [wg['layer'] for wg in params[0]['component']] @@ -88,8 +87,8 @@ def produce_impl(self): LayerDevRecN = ly.layer(self.devrec) LayerTextN = ly.layer(self.text) - from math import pi, cos, sin, log, sqrt - from SiEPIC.utils import arc, arc_to_waveguide, points_per_circle, arc_wg + from math import pi, cos, sin + from SiEPIC.utils import arc_wg x = 0 y = 0 diff --git a/klayout/EBeam/pymacros/pcells_EBeam/Wireguide.py b/klayout/EBeam/pymacros/pcells_EBeam/Wireguide.py index 38598f1c..8e1a7faf 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/Wireguide.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/Wireguide.py @@ -38,8 +38,7 @@ def parameters_from_shape_impl(self): def produce_impl(self): - from SiEPIC.utils import arc_xy, arc_bezier, angle_vector, angle_b_vectors, inner_angle_b_vectors, translate_from_normal - from math import cos, sin, pi, sqrt + from SiEPIC.utils import arc_xy, arc_bezier, angle_vector, angle_b_vectors, inner_angle_b_vectors import pya from SiEPIC.extend import to_itype diff --git a/klayout/EBeam/pymacros/pcells_EBeam/__init__.py b/klayout/EBeam/pymacros/pcells_EBeam/__init__.py index 0cff731d..2ad56d35 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/__init__.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/__init__.py @@ -1,4 +1,5 @@ -import os, sys +import os +import sys import SiEPIC from SiEPIC.utils import get_technology_by_name \ No newline at end of file diff --git a/klayout/EBeam/pymacros/pcells_EBeam/contra_directional_coupler.py b/klayout/EBeam/pymacros/pcells_EBeam/contra_directional_coupler.py index 17999796..ff399286 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/contra_directional_coupler.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/contra_directional_coupler.py @@ -257,7 +257,6 @@ def produce_impl(self): shapes_wg += box3 # Create the pins on the waveguides, as short paths: - from SiEPIC._globals import PIN_LENGTH as pin_length w1 = to_itype(self.wg1_width, dbu) w2 = to_itype(self.wg2_width, dbu) 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 ea297512..42b2d8e7 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/ebeam_dc_halfring_straight.py @@ -34,8 +34,7 @@ def can_create_from_shape_impl(self): def produce_impl(self): # This is the main part of the implementation: create the layout - from math import pi, cos, sin - from SiEPIC.utils import arc_wg, arc_wg_xy + from SiEPIC.utils import arc_wg_xy from SiEPIC._globals import PIN_LENGTH # fetch the parameters diff --git a/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py b/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py index 23ca7b2f..b87129f9 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py +++ b/klayout/EBeam/pymacros/pcells_EBeam/wg_heater.py @@ -65,7 +65,6 @@ def coerce_parameters_impl(self): params = [t for t in self.waveguide_types if t['name'] == self.waveguide_type] if not params: raise Exception ('Waveguides.XML not correctly configured') - from SiEPIC.extend import to_itype self.wg_width = float(params[0]['width']) def can_create_from_shape_impl(self): @@ -93,7 +92,7 @@ def produce_impl(self): ly = self.layout shapes = self.cell.shapes - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import get_technology_by_name TECHNOLOGY = get_technology_by_name('EBeam') params = [t for t in self.waveguide_types if t['name'] == self.waveguide_type] layer = [wg['layer'] for wg in params[0]['component']] diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Bezier_Bend.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Bezier_Bend.py index 47a9bc4d..310c53c6 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Bezier_Bend.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Bezier_Bend.py @@ -56,7 +56,6 @@ def produce_impl(self): from SiEPIC.utils import arc_bezier from SiEPIC._globals import PIN_LENGTH as pin_length - from SiEPIC.extend import to_itype wg_width = self.wg_width w = self.wg_width/dbu diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/BraggWaveguide_holes.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/BraggWaveguide_holes.py index 9150b260..279c2c11 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/BraggWaveguide_holes.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/BraggWaveguide_holes.py @@ -1,6 +1,5 @@ import pya from pya import * -import math from SiEPIC.utils import get_technology_by_name class BraggWaveguide_holes(pya.PCellDeclarationHelper): diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Bragg_encoder.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Bragg_encoder.py index cc61a26b..29090139 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Bragg_encoder.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Bragg_encoder.py @@ -48,7 +48,7 @@ def produce_impl(self): LayerDevRecN = ly.layer(self.devrec) from SiEPIC.extend import to_itype - from math import pi, cos, sin, acos + from math import pi, sin N = int(self.N) #draw the encoded bragg grating: diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_Bent.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_Bent.py index 9d01bac4..d9cb0b1d 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_Bent.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_Bent.py @@ -58,8 +58,7 @@ def produce(self, layout, layers, parameters, cell): # length units in dbu from math import pi, cos, sin - from SiEPIC.utils import arc_wg, arc_wg_xy - from SiEPIC._globals import PIN_LENGTH + from SiEPIC.utils import arc_wg_xy # fetch the parameters dbu = self.layout.dbu @@ -98,9 +97,9 @@ def produce(self, layout, layers, parameters, cell): # Bend radius of bus rBus = r + gap + w_bus/2 +w_ring/2 - N_input = N; + N_input = N # Normalized number of corrugations to periodAngle - N = N*periodAngle*2; + N = N*periodAngle*2 # Convention: Set A is the CDC portion that is not offsetted, set B is offsetted by corrugation width @@ -141,8 +140,8 @@ def produce(self, layout, layers, parameters, cell): bendAngleRad = (pi/180) * bendAngle # Draw Bus non-CDC Waveguide - y_center = rBus * cos(bendAngleRad) + busBendR * cos(bendAngleRad); - x_center = rBus * sin(bendAngleRad) + busBendR * sin(bendAngleRad); + y_center = rBus * cos(bendAngleRad) + busBendR * cos(bendAngleRad) + x_center = rBus * sin(bendAngleRad) + busBendR * sin(bendAngleRad) self.cell.shapes(LayerSiN).insert(arc_wg_xy(x_center,y_center, busBendR, w_bus, 270-bendAngle,270)) self.cell.shapes(LayerSiN).insert(arc_wg_xy(-x_center,y_center, busBendR, w_bus, 270, 270-bendAngle)) @@ -151,7 +150,7 @@ def produce(self, layout, layers, parameters, cell): from SiEPIC._globals import PIN_LENGTH as pin_length # Pin on the right side: - y_center = rBus * cos(bendAngleRad) + busBendR * cos(bendAngleRad) - busBendR; + y_center = rBus * cos(bendAngleRad) + busBendR * cos(bendAngleRad) - busBendR p2 = [Point(-pin_length/2 +x_center, y_center), Point(pin_length/2 +x_center, y_center)] p2c = Point(x_center, y_center) self.set_p2 = p2c diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_CouplerApodized.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_CouplerApodized.py index d39cd5d8..aa59deb6 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_CouplerApodized.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_CouplerApodized.py @@ -152,7 +152,7 @@ def produce_impl(self): t = Trans(Trans.R0, 0,vertical_offset) x = (round((i * self.grating_period)/dbu)) - deltaW2 = int(round(self.corrugation_width2/2/dbu)); + deltaW2 = int(round(self.corrugation_width2/2/dbu)) box1 = Box(x, 0, x + box_width, -half_w+deltaW2).transformed(t) pts1 = [Point(x,0)] pts3 = [Point(x + misalignment,0)] @@ -190,7 +190,7 @@ def produce_impl(self): else: t = Trans(Trans.R0, 0,vertical_offset) - deltaW2 = int(round(self.corrugation_width2/2/dbu)); + deltaW2 = int(round(self.corrugation_width2/2/dbu)) box1 = Box(x, 0, x + box_width, -half_w-deltaW2).transformed(t) box2 = Box(x + box_width, 0, x + grating_period, -half_w+deltaW2).transformed(t) box3 = Box(x + misalignment, 0, x + box_width + misalignment, half_w+deltaW2).transformed(t) diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_chirped.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_chirped.py index 90de3181..a53c3302 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_chirped.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Contra_DC_chirped.py @@ -105,7 +105,7 @@ def produce_impl(self): x = x + grating_period[i] profileFunction = math.exp( -0.5*(2*GaussianIndex*(i-N/2)/(N))**2 ) - profile = int(round(self.corrugation_width1/2/dbu))*profileFunction; + profile = int(round(self.corrugation_width1/2/dbu))*profileFunction box1 = Box(x, 0, x + box_width[i], half_w+profile) pts1 = [Point(x,0)] pts3 = [Point(x + misalignment[i],0)] @@ -134,7 +134,7 @@ def produce_impl(self): x = x + grating_period[i] profileFunction = math.exp( -0.5*(2*GaussianIndex*(i-N/2)/(N))**2 ) - profile = int(round(self.corrugation_width1/2/dbu))*profileFunction; + profile = int(round(self.corrugation_width1/2/dbu))*profileFunction box1 = Box(x, 0, x + box_width[i], to_itype(half_w+profile,dbu*1000)) box2 = Box(x + box_width[i], 0, x + grating_period[i], to_itype(half_w-profile,dbu*1000)) box3 = Box(x + misalignment[i], 0, x + box_width[i] + misalignment[i], to_itype(-half_w-profile,dbu*1000)) @@ -174,7 +174,7 @@ def produce_impl(self): x = x + grating_period[i] profileFunction = math.exp( -0.5*(2*GaussianIndex*(i-N/2)/(N))**2 ) - profile = int(round(self.corrugation_width2/2/dbu))*profileFunction; + profile = int(round(self.corrugation_width2/2/dbu))*profileFunction box1 = Box(x, 0, x + box_width[i], -half_w+profile).transformed(t) pts1 = [Point(x,0)] pts3 = [Point(x + misalignment[i],0)] @@ -204,7 +204,7 @@ def produce_impl(self): x = x + grating_period[i] profileFunction = math.exp( -0.5*(2*GaussianIndex*(i-N/2)/(N))**2 ) - profile = int(round(self.corrugation_width2/2/dbu))*profileFunction; + profile = int(round(self.corrugation_width2/2/dbu))*profileFunction box1 = Box(x, 0, x + box_width[i], -half_w-profile).transformed(t) box2 = Box(x + box_width[i], 0, x + grating_period[i], -half_w+profile).transformed(t) box3 = Box(x + misalignment[i], 0, x + box_width[i] + misalignment[i], half_w+profile).transformed(t) @@ -222,7 +222,6 @@ def produce_impl(self): # Create the pins on the waveguides, as short paths: - from SiEPIC._globals import PIN_LENGTH as pin_length w1 = to_itype(self.wg1_width, dbu) w2 = to_itype(self.wg2_width, dbu) y_offset_top = -w/2 - to_itype(self.gap/2, dbu) diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/DirectionalCoupler_Bent.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/DirectionalCoupler_Bent.py index cbe3573b..b2cd9be2 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/DirectionalCoupler_Bent.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/DirectionalCoupler_Bent.py @@ -51,7 +51,6 @@ def produce(self, layout, layers, parameters, cell): # w: waveguide width # length units in dbu import math - from math import pi, cos, sin from SiEPIC.utils import arc_wg_xy from SiEPIC._globals import PIN_LENGTH as pin_length from SiEPIC.extend import to_itype diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/DirectionalCoupler_SeriesRings.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/DirectionalCoupler_SeriesRings.py index 1f6fadaf..cd2cb783 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/DirectionalCoupler_SeriesRings.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/DirectionalCoupler_SeriesRings.py @@ -35,7 +35,6 @@ def can_create_from_shape_impl(self): def produce_impl(self): # This is the main part of the implementation: create the layout - from math import pi, cos, sin from SiEPIC._globals import PIN_LENGTH as pin_length from SiEPIC.utils import arc_wg_xy diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Grating_Coupler_FSWGC.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Grating_Coupler_FSWGC.py index 94959a9c..686c8f3a 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Grating_Coupler_FSWGC.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Grating_Coupler_FSWGC.py @@ -76,7 +76,7 @@ def produce_impl(self): LayerPinRecN = ly.layer(self.pinrec) LayerDevRecN = ly.layer(self.devrec) - from math import pi, cos, sin, log, sqrt, tan + from math import pi, cos, sin, tan from SiEPIC.utils import points_per_circle lambda_0 = self.wavelength ##um wavelength of light diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/MMI_2x2.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/MMI_2x2.py index 217fb9af..6553c9ec 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/MMI_2x2.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/MMI_2x2.py @@ -36,7 +36,6 @@ def produce_impl(self): # test by Lukas, to see if it breaks the PCell # print(1/0) - from math import pi, cos, sin # fetch the parameters dbu = self.layout.dbu diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/MultiBox_BraggGrating.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/MultiBox_BraggGrating.py index 4da550bf..11712ad2 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/MultiBox_BraggGrating.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/MultiBox_BraggGrating.py @@ -48,7 +48,6 @@ def can_create_from_shape(self, layout, shape, layer): return False def produce_impl(self): - from SiEPIC._globals import PIN_LENGTH from SiEPIC.extend import to_itype from pya import DPolygon import math diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_MultiBox_Ring.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_MultiBox_Ring.py index 3140b690..74871b56 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_MultiBox_Ring.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_MultiBox_Ring.py @@ -41,7 +41,6 @@ def can_create_from_shape(self, layout, shape, layer): def produce_impl(self): debug = False - from SiEPIC._globals import PIN_LENGTH from SiEPIC.extend import to_itype import math from pya import DPolygon diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_Ring.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_Ring.py index 27f16562..b9ad7deb 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_Ring.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_Ring.py @@ -49,7 +49,6 @@ def display_text_impl(self): def produce_impl(self): debug = False - from SiEPIC._globals import PIN_LENGTH from SiEPIC.extend import to_itype import math from pya import DPolygon @@ -239,7 +238,6 @@ def produce_impl(self): dev_width = self.cell.bbox().width()/2 # Create the pins on the waveguides, as short paths: - from SiEPIC._globals import PIN_LENGTH as pin_length bus_length = to_itype(bus_length/2,dbu) diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_bentWG.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_bentWG.py index f21e3d5e..8c280538 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_bentWG.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/SWG_bentWG.py @@ -38,7 +38,6 @@ def can_create_from_shape(self, layout, shape, layer): def produce_impl(self): debug = False - from SiEPIC._globals import PIN_LENGTH from SiEPIC.extend import to_itype import math from pya import DPolygon diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Tapered_Ring.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Tapered_Ring.py index 4f09ad22..aae033b9 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Tapered_Ring.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Tapered_Ring.py @@ -32,9 +32,6 @@ def can_create_from_shape(self, layout, shape, layer): def produce_impl(self): - import pya - from operator import xor - from math import pi, cos, sin from pya import Region, Polygon import math diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Universal_GC.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Universal_GC.py index 3f3063af..6adee2f0 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Universal_GC.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Universal_GC.py @@ -18,7 +18,6 @@ def __init__(self): # Important: initialize the super class super(Universal_GC, self).__init__() - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech TECHNOLOGY = get_technology_by_name('EBeam') self.TECHNOLOGY = TECHNOLOGY @@ -73,7 +72,7 @@ def produce_impl(self): def effective_index(wl = self.wavelength, etch_depth = self.etch_depth, Si_thickness = self.Si_thickness, n_t = self.n_t, pol = self.pol, dc = self.dc, n_2 = self.n_2): from math import pi, cos, sin, log, sqrt, tan - from SiEPIC.utils import points_per_circle + from math import pi, tan point =1001 n_0 = n_t @@ -112,9 +111,9 @@ def effective_index(wl = self.wavelength, etch_depth = self.etch_depth, Si_thick for ii in range(0,point-1): b_0[ii] = n_1*k_0 + (n_2 - n_1)*k_0/(point-1)*ii # copied from .ample UGC: should this be point-1? - h_0[ii] = sqrt( abs(pow(n_2*k_0,2) - pow(b_0[ii],2))); - q_0[ii] = sqrt( abs(pow(b_0[ii],2) - pow(n_0*k_0,2))); - p_0[ii] = sqrt( abs(pow(b_0[ii],2) - pow(n_3*k_0,2))); + h_0[ii] = sqrt( abs(pow(n_2*k_0,2) - pow(b_0[ii],2))) + q_0[ii] = sqrt( abs(pow(b_0[ii],2) - pow(n_0*k_0,2))) + p_0[ii] = sqrt( abs(pow(b_0[ii],2) - pow(n_3*k_0,2))) pbar_0[ii] = pow(n_2/n_3, 2)*p_0[ii] qbar_0[ii] = pow(n_2/n_0, 2)*q_0[ii] @@ -176,6 +175,7 @@ def effective_index(wl = self.wavelength, etch_depth = self.etch_depth, Si_thick ##################################### from math import pi, cos, sin, log, sqrt, tan + from math import pi, cos, sin, tan from SiEPIC.utils import points_per_circle lambda_0 = self.wavelength ##um wavelength of light diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Waveguide_Arc.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Waveguide_Arc.py index c6f30084..e153ab73 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Waveguide_Arc.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Waveguide_Arc.py @@ -50,7 +50,6 @@ def produce(self, layout, layers, parameters, cell): # stop_agnle: stopping angle of the arc # length units in dbu import math - from math import pi, cos, sin from SiEPIC.utils import arc_wg # fetch the parameters diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Waveguide_Bend.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Waveguide_Bend.py index 6e30d867..49670c3c 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/Waveguide_Bend.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/Waveguide_Bend.py @@ -48,8 +48,7 @@ def produce(self, layout, layers, parameters, cell): # w: waveguide width # length units in dbu - from math import pi, cos, sin - from SiEPIC.utils import arc, arc_to_waveguide, points_per_circle, arc_wg + from SiEPIC.utils import arc, arc_to_waveguide # fetch the parameters dbu = self.layout.dbu diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/__init__.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/__init__.py index 0628f9cb..126161f8 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/__init__.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/__init__.py @@ -1,4 +1,5 @@ -import os, sys +import os +import sys import SiEPIC from SiEPIC.utils import get_technology, get_technology_by_name from pya import * diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/cavity_hole.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/cavity_hole.py index 85b6f7b0..d712b63e 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/cavity_hole.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/cavity_hole.py @@ -35,9 +35,6 @@ def can_create_from_shape(self, layout, shape, layer): def produce_impl(self): - import pya - from operator import xor - from math import pi, cos, sin dbu = self.layout.dbu ly = self.layout @@ -61,7 +58,7 @@ def produce_impl(self): y = self.y/dbu r = self.radius/dbu r= r/2 - w = 2*r; + w = 2*r gap = self.gap/dbu #gap between one hole to another diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_PWB_surface_taper.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_PWB_surface_taper.py index 9b6c9876..4e38fd3e 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_PWB_surface_taper.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_PWB_surface_taper.py @@ -57,7 +57,6 @@ def produce(self, layout, layers, parameters, cell): from math import pi, sin, cos, tan from SiEPIC._globals import PIN_LENGTH as pin_length from SiEPIC.extend import to_itype - import ctypes # fetch the parameters dbu = self.layout.dbu diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_bragg_apodized.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_bragg_apodized.py index 9a76d0ba..8c3112e3 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_bragg_apodized.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_bragg_apodized.py @@ -67,7 +67,7 @@ def produce_impl(self): for i in range(0,self.number_of_periods): x = (round((i * self.grating_period)/dbu)) profileFunction = math.exp( -0.5*(2*GaussianIndex*(i-N/2)/(N))**2 ) - profile = int(round(self.corrugation_width/2/dbu))*profileFunction; + profile = int(round(self.corrugation_width/2/dbu))*profileFunction box1 = Box(x, 0, x + box_width, half_w+profile) pts1 = [Point(x,0)] pts3 = [Point(x + misalignment,0)] @@ -99,7 +99,7 @@ def produce_impl(self): x = int(round((i * self.grating_period)/dbu)) profileFunction = math.exp( -0.5*(2*GaussianIndex*(i-N/2)/(N))**2 ) - profile = int(round(self.corrugation_width/2/dbu))*profileFunction; + profile = int(round(self.corrugation_width/2/dbu))*profileFunction box1 = Box(x, 0, x + box_width, half_w+profile) box2 = Box(x + box_width, 0, x + grating_period, half_w-profile) box3 = Box(x + misalignment, 0, x + box_width + misalignment, -half_w-profile) diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_irph_mrr.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_irph_mrr.py index 5859c85e..6823ae74 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_irph_mrr.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_irph_mrr.py @@ -56,10 +56,9 @@ def can_create_from_shape_impl(self): def produce_impl(self): # This is the main part of the implementation: create the layout - from math import pi, cos, sin - from SiEPIC.utils import arc_wg, arc_wg_xy, arc_xy + from SiEPIC.utils import arc_wg_xy, arc_xy from SiEPIC._globals import PIN_LENGTH - from SiEPIC.extend import to_itype, to_dtype + from SiEPIC.extend import to_itype # fetch the parameters dbu = self.layout.dbu diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_irph_wg.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_irph_wg.py index 815ad81d..473ae370 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_irph_wg.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_irph_wg.py @@ -51,8 +51,6 @@ def can_create_from_shape_impl(self): def produce_impl(self): # This is the main part of the implementation: create the layout - from math import pi, cos, sin - from SiEPIC.utils import arc_wg, arc_wg_xy from SiEPIC._globals import PIN_LENGTH from SiEPIC.extend import to_itype @@ -87,27 +85,27 @@ def produce_impl(self): if self.io_wg_type == 0: ## define strip to slab transfer taper parameters - N = 100; # Number of points for the input/output slab taper - order = 3; # input/output slab taper curve - in_taper = to_itype(5,dbu); # length of taper + N = 100 # Number of points for the input/output slab taper + order = 3 # input/output slab taper curve + in_taper = to_itype(5,dbu) # length of taper taper_w = to_itype(2,dbu) # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(- in_taper + in_taper/N * i, (w-overlay_ebl*2)/2 + ((taper_w - (w-overlay_ebl*2))/(N**order))*(i**order))) for i in range(0,N + 1): pts.append(Point(-in_taper + in_taper/N * (N - i), - (w-overlay_ebl*2)/2 - ((taper_w - (w-overlay_ebl*2))/(N**order))*((N-i)**order))) self.cell.shapes(LayerSiRibN).insert(Polygon(pts)) # add output slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(length+ in_taper - in_taper/N * i, (w-overlay_ebl*2)/2 + ((taper_w - (w-overlay_ebl*2))/(N**order))*(i**order))) for i in range(0,N + 1): pts.append(Point(length+in_taper - in_taper/N * (N - i), - (w-overlay_ebl*2)/2 - ((taper_w - (w-overlay_ebl*2))/(N**order))*((N-i)**order))) self.cell.shapes(LayerSiRibN).insert(Polygon(pts)) else: - in_taper = 0; # length of taper - taper_w = 0; # width of taper + in_taper = 0 # length of taper + taper_w = 0 # width of taper #draw the waveguide xtop = 0 - in_taper @@ -156,7 +154,7 @@ def produce_impl(self): #devrec layer w_devrec = 2 * max(m_dw+m_w+w/2, vc_dw+w/2+vc_w, npp_dw+w/2+npp_w, w_rib/2) - pts = []; + pts = [] pts = [ Point(0, -w_devrec/2-w), Point(0, -taper_w), Point(0-in_taper, -taper_w), diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter.py index c9dba945..e9b4b4b5 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter.py @@ -67,10 +67,6 @@ def produce(self, layout, layers, parameters, cell): # w: waveguide width # length units in dbu - from math import pi, cos, sin - from SiEPIC.utils import arc_wg, arc_wg_xy - from SiEPIC._globals import PIN_LENGTH - from SiEPIC.utils.layout import layout_waveguide2 from SiEPIC.extend import to_itype # fetch the parameters @@ -117,8 +113,8 @@ def produce(self, layout, layers, parameters, cell): vc_to_npp_exclusion = to_itype(0,dbu) # VC boundary to NPP boundary distance ## define strip to slab transfer taper parameters - N = 100; # Number of points for the input/output slab taper - order = 3; # input/output slab taper curve + N = 100 # Number of points for the input/output slab taper + order = 3 # input/output slab taper curve wg1 = pya.Box(-l/2,-w/2,l/2,w/2) wg2 = pya.Box(-l/2,-ps_sl_w/2,l/2,ps_sl_w/2) @@ -142,7 +138,7 @@ def produce(self, layout, layers, parameters, cell): self.cell.shapes(LayerSiN).insert(Polygon(pts)) # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(-l/2 - in_taper + in_taper/N * i, (in_slab-overlay_ebl*2)/2 + ((sw/2 - (in_slab-overlay_ebl*2))/(N**order))*(i**order))) for i in range(0,N + 1): @@ -155,7 +151,7 @@ def produce(self, layout, layers, parameters, cell): self.cell.shapes(LayerSiN).insert(Polygon(pts)) # cubic taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(l/2 + in_taper - in_taper/N * i, (in_slab-overlay_ebl*2)/2 + ((sw/2 - (in_slab-overlay_ebl*2))/(N**order))*(i**order))) for i in range(0,N + 1): diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter_folded.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter_folded.py index 498b0117..04d1616e 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter_folded.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter_folded.py @@ -64,8 +64,6 @@ def produce(self, layout, layers, parameters, cell): # w: waveguide width # length units in dbu - from math import pi, cos, sin - from SiEPIC.utils import arc_wg, arc_wg_xy from SiEPIC._globals import PIN_LENGTH from SiEPIC.utils.layout import layout_waveguide2 from SiEPIC.extend import to_itype @@ -121,8 +119,8 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length = 0 ## define strip to slab transfer taper parameters - N = 100; # Number of points for the input/output slab taper - order = 3; # input/output slab taper curve + N = 100 # Number of points for the input/output slab taper + order = 3 # input/output slab taper curve pts = [Point(-l/2,0), Point(l/2, 0)] total_waveguide_length += layout_waveguide2(TECHNOLOGY, self.layout, self.cell, ['Si'], [w*dbu], [0], pts, radius_um, adiab, bezier) @@ -149,7 +147,7 @@ def produce(self, layout, layers, parameters, cell): self.cell.shapes(LayerSiN).insert(Polygon(pts)) # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(-l/2 - in_taper + in_taper/N * i, w/2 + ((sw/2 + contact_size - w)/(N**order))*(i**order))) for i in range(0,N + 1): @@ -163,7 +161,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(l/2 + in_taper - in_taper/N * i, (w-overlay_ebl)/2 + ((sw/2 + contact_size - (w-overlay_ebl))/(N**order))*(i**order))) for i in range(0,N + 1): @@ -193,7 +191,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # slab cubic taper - pts = []; + pts = [] for ii in range(0,N + 1): pts.append(Point(-l/2 - in_taper + in_taper/N * ii, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(ii**order)+y_move)) for ii in range(0,N + 1): @@ -210,7 +208,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # slab cubic taper - pts = []; + pts = [] for ii in range(0,N + 1): pts.append(Point(-l/2 - in_taper + in_taper/N * ii, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(ii**order)+ y_move)) @@ -227,7 +225,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # slab cubic taper - pts = []; + pts = [] for ii in range(0,N + 1): pts.append(Point(l/2 + in_taper - in_taper/N * ii, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(ii**order) + y_move)) for ii in range(0,N + 1): @@ -244,7 +242,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(-l/2 - in_taper + in_taper/N * i, in_slab/2 + ((edge_slab_width - in_slab)/(N**order))*(i**order) + y_move)) for i in range(0,N + 1): @@ -259,7 +257,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(l/2 + in_taper - in_taper/N * i, in_slab/2 + ((edge_slab_width - in_slab)/(N**order))*(i**order) + y_move)) for i in range(0,N + 1): @@ -312,7 +310,7 @@ def produce(self, layout, layers, parameters, cell): #wg2 = pya.Box(-l/2,-4/2/dbu,l/2,4/2/dbu) self.cell.shapes(LayerSiN).insert(Polygon(pts)) total_waveguide_length += in_taper*dbu - pts = []; + pts = [] for ii in range(0,N + 1): pts.append(Point(l/2 + in_taper - in_taper/N * ii, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(ii**order) + y_move)) for ii in range(0,N + 1): diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter_folded_inside.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter_folded_inside.py index 9046c498..22fdff28 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter_folded_inside.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_rib_phase_shifter_folded_inside.py @@ -68,8 +68,6 @@ def produce(self, layout, layers, parameters, cell): # w: waveguide width # length units in dbu - from math import pi, cos, sin - from SiEPIC.utils import arc_wg, arc_wg_xy from SiEPIC._globals import PIN_LENGTH from SiEPIC.utils.layout import layout_waveguide2 from SiEPIC.extend import to_itype @@ -130,8 +128,8 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length = 0 ## define strip to slab transfer taper parameters - N = 100; # Number of points for the input/output slab taper - order = 3; # input/output slab taper curve + N = 100 # Number of points for the input/output slab taper + order = 3 # input/output slab taper curve pts = [Point(-l/2,0), Point(l/2, 0)] total_waveguide_length += layout_waveguide2(TECHNOLOGY, self.layout, self.cell, ['Si'], [folding_w2*dbu], [0], pts, radius_um, adiab, bezier) @@ -150,7 +148,7 @@ def produce(self, layout, layers, parameters, cell): self.cell.shapes(LayerSiN).insert(Polygon(pts)) # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(-l/2 - in_taper + in_taper/N * i, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(i**order))) for i in range(0,N + 1): @@ -164,7 +162,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(l/2 + in_taper - in_taper/N * i, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(i**order))) for i in range(0,N + 1): @@ -194,7 +192,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # slab cubic taper - pts = []; + pts = [] for ii in range(0,N + 1): pts.append(Point(-l/2 - in_taper + in_taper/N * ii, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(ii**order)+y_move)) for ii in range(0,N + 1): @@ -211,7 +209,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # slab cubic taper - pts = []; + pts = [] for ii in range(0,N + 1): pts.append(Point(-l/2 - in_taper + in_taper/N * ii, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(ii**order)+ y_move)) @@ -228,7 +226,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # slab cubic taper - pts = []; + pts = [] for ii in range(0,N + 1): pts.append(Point(l/2 + in_taper - in_taper/N * ii, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(ii**order) + y_move)) for ii in range(0,N + 1): @@ -245,7 +243,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(-l/2 - in_taper + in_taper/N * i, in_slab/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(i**order) + y_move)) for i in range(0,N + 1): @@ -260,7 +258,7 @@ def produce(self, layout, layers, parameters, cell): total_waveguide_length += in_taper*dbu # add input slab taper - pts = []; + pts = [] for i in range(0,N + 1): pts.append(Point(l/2 + in_taper - in_taper/N * i, in_slab/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(i**order) + y_move)) for i in range(0,N + 1): @@ -313,7 +311,7 @@ def produce(self, layout, layers, parameters, cell): #wg2 = pya.Box(-l/2,-4/2/dbu,l/2,4/2/dbu) self.cell.shapes(LayerSiN).insert(Polygon(pts)) total_waveguide_length += in_taper*dbu - pts = []; + pts = [] for ii in range(0,N + 1): pts.append(Point(l/2 + in_taper - in_taper/N * ii, (w-overlay_ebl)/2 + ((2/dbu - (w-overlay_ebl))/(N**order))*(ii**order) + y_move)) for ii in range(0,N + 1): diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_test_bends.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_test_bends.py index 6caffab6..07312063 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_test_bends.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ebeam_test_bends.py @@ -29,7 +29,7 @@ def __init__(self): self.technology_name = 'EBeam' - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import load_Waveguides_by_Tech self.TECHNOLOGY = get_technology_by_name(self.technology_name) # Load all waveguides @@ -72,7 +72,7 @@ def get_waveguide_parameters(self): ''' Get the Waveguide Type from the PCell, and update waveguide parameters ''' - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import load_Waveguides_by_Tech # Load all waveguides waveguide_types = load_Waveguides_by_Tech(self.technology_name) # Make a copy so that we don't modify the original definitions @@ -241,7 +241,7 @@ def __init__(self): if __name__ == "__main__": print('Test layout for: test bends') - from SiEPIC.utils.layout import new_layout, floorplan + from SiEPIC.utils.layout import new_layout from SiEPIC.scripts import zoom_out # load the test library, and technology diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c.py index 5b0743c7..1c5c24d1 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c.py @@ -1,7 +1,6 @@ import pya from pya import * -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout +from SiEPIC.utils import get_technology_by_name import math class phc_H0c(pya.PCellDeclarationHelper): diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c_new.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c_new.py index b99b61b6..f19746d1 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c_new.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c_new.py @@ -1,7 +1,6 @@ import pya from pya import * -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout +from SiEPIC.utils import get_technology_by_name import math diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c_oxide.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c_oxide.py index 1563e4a0..e4ea8f58 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c_oxide.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_H0c_oxide.py @@ -1,7 +1,6 @@ import pya from pya import * -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout +from SiEPIC.utils import get_technology_by_name import math class phc_H0c_oxide(pya.PCellDeclarationHelper): diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_L3c.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_L3c.py index 443d293e..748b7e83 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_L3c.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_L3c.py @@ -1,7 +1,6 @@ import pya from pya import * -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout +from SiEPIC.utils import get_technology_by_name import math class phc_L3c(pya.PCellDeclarationHelper): diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_gc_hex.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_gc_hex.py index c978af4c..30e9c2a9 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_gc_hex.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_gc_hex.py @@ -1,7 +1,6 @@ import pya from pya import * -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout +from SiEPIC.utils import get_technology_by_name import math diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_wg_w1.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_wg_w1.py index 24f5af21..76e29ffb 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_wg_w1.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/phc_wg_w1.py @@ -1,7 +1,6 @@ import pya from pya import * -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout +from SiEPIC.utils import get_technology_by_name import math diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ring_singlebus.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ring_singlebus.py index a77c3a8d..8bcf6814 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/ring_singlebus.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/ring_singlebus.py @@ -13,7 +13,7 @@ def __init__(self): # Important: initialize the super class super(ring_singlebus, self).__init__() - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import load_Waveguides_by_Tech self.technology_name = 'EBeam' TECHNOLOGY = get_technology_by_name(self.technology_name) @@ -46,7 +46,6 @@ def can_create_from_shape_impl(self): def produce_impl(self): # This is the main part of the implementation: create the layout - from SiEPIC.extend import to_itype # print(self.layout.technology_name) # the technology is not assigned in a PCell, for some reason self.layout.technology_name=self.technology_name diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral.py index 8230a8a0..1636ea3f 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral.py @@ -47,12 +47,12 @@ def produce_impl(self): LayerDevRecN = ly.layer(self.devrec) # draw spiral - from math import pi, cos, sin, log, sqrt + from math import pi, cos, sin # Archimedes spiral # r = b + a * theta b = self.min_radius - spacing = self.wg_spacing+self.wg_width; + spacing = self.wg_spacing+self.wg_width a = 2*spacing/(2*pi) # area, length, turn tracking for spiral @@ -76,8 +76,8 @@ def produce_impl(self): # draw the inside edge of spiral for i in range(0, npoints+1): t = i*da - xa = (a*t + r) * cos(t); - ya = (a*t + r) * sin(t); + xa = (a*t + r) * cos(t) + ya = (a*t + r) * sin(t) pts.append(Point.from_dpoint(DPoint(xa/dbu, ya/dbu))) # draw the outside edge of spiral r = 2*b + a * turn * 2 * pi + self.wg_width/2 @@ -85,8 +85,8 @@ def produce_impl(self): da = 2 * pi / npoints for i in range(npoints, -1, -1): t = i*da - xa = (a*t + r) * cos(t); - ya = (a*t + r) * sin(t); + xa = (a*t + r) * cos(t) + ya = (a*t + r) * sin(t) pts.append(Point.from_dpoint(DPoint(xa/dbu, ya/dbu))) polygon = Polygon(pts) area += polygon.area() @@ -103,8 +103,8 @@ def produce_impl(self): # draw the inside edge of spiral for i in range(0, npoints+1): t = i*da + pi - xa = (a*t + r) * cos(t); - ya = (a*t + r) * sin(t); + xa = (a*t + r) * cos(t) + ya = (a*t + r) * sin(t) pts.append(Point.from_dpoint(DPoint(xa/dbu, ya/dbu))) # draw the outside edge of spiral r = 2*b + a * turn * 2 * pi + self.wg_width/2 - spacing @@ -112,8 +112,8 @@ def produce_impl(self): da = 2 * pi / npoints for i in range(npoints, -1, -1): t = i*da + pi - xa = (a*t + r) * cos(t); - ya = (a*t + r) * sin(t); + xa = (a*t + r) * cos(t) + ya = (a*t + r) * sin(t) pts.append(Point.from_dpoint(DPoint(xa/dbu, ya/dbu))) polygon = Polygon(pts) area += polygon.area() @@ -135,8 +135,8 @@ def produce_impl(self): # draw the inside edge of spiral for i in range(0, npoints+1): t = i*da - xa = (a*t + r) * cos(t); - ya = (a*t + r) * sin(t); + xa = (a*t + r) * cos(t) + ya = (a*t + r) * sin(t) pts.append(Point.from_dpoint(DPoint(xa/dbu, ya/dbu))) # draw the outside edge of spiral r = 2*b + a * turn * 2 * pi + self.wg_width/2 @@ -144,8 +144,8 @@ def produce_impl(self): da = pi / npoints for i in range(npoints, -1, -1): t = i*da - xa = (a*t + r) * cos(t); - ya = (a*t + r) * sin(t); + xa = (a*t + r) * cos(t) + ya = (a*t + r) * sin(t) pts.append(Point.from_dpoint(DPoint(xa/dbu, ya/dbu))) polygon = Polygon(pts) area += polygon.area() diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py index 9960bf23..14569d74 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/spiral_paperclip.py @@ -31,7 +31,7 @@ def __init__(self): self.technology_name = 'EBeam' - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import load_Waveguides_by_Tech self.TECHNOLOGY = get_technology_by_name(self.technology_name) # Load all strip waveguides @@ -260,7 +260,7 @@ def __init__(self): if __name__ == "__main__": print('Test layout for: Spiral Paperclip') - from SiEPIC.utils.layout import new_layout, floorplan + from SiEPIC.utils.layout import new_layout from SiEPIC.scripts import zoom_out # load the test library, and technology diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/strip_to_slot.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/strip_to_slot.py index 8cb79daa..c1cec255 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/strip_to_slot.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/strip_to_slot.py @@ -40,9 +40,6 @@ def can_create_from_shape_impl(self): def produce_impl(self): # This is the main part of the implementation: create the layout - from math import pi, cos, sin - from SiEPIC.utils import arc - from SiEPIC.utils import arc_xy from SiEPIC.extend import to_itype from SiEPIC.utils import arc_wg_xy @@ -83,9 +80,7 @@ def produce_impl(self): wg1 = Box(-taper, w+slot, 0, w+rails+slot) shapes(LayerSiN).insert(wg1) - from math import pi, cos, sin - from SiEPIC.utils import arc_wg, arc_wg_xy - from SiEPIC._globals import PIN_LENGTH as pin_length + from SiEPIC.utils import arc_wg_xy # Create the waveguide diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/swg_fc.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/swg_fc.py index 1e9e1a22..a80795df 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/swg_fc.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/swg_fc.py @@ -1,8 +1,7 @@ import pya from pya import * -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout -import math +from SiEPIC.utils import get_technology_by_name +from SiEPIC.utils import points_per_circle#,layout class swg_fc(pya.PCellDeclarationHelper): """ @@ -85,7 +84,7 @@ def produce_impl(self): LayerDevRecN = ly.layer(self.devrec) LayerTextN = ly.layer(self.textl) - from math import pi, cos, sin, log, sqrt, tan + from math import pi, cos, sin, tan lambda_0 = self.wavelength ##um wavelength of light pin_length = 0.5 ##um extra nub for the waveguide attachment diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/swg_fc_test.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/swg_fc_test.py index fce4b049..2f2ef0f2 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/swg_fc_test.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/swg_fc_test.py @@ -1,8 +1,7 @@ import pya from pya import * from SiEPIC.utils import get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout -import math +from SiEPIC.utils import points_per_circle#,layout class swg_fc_test(pya.PCellDeclarationHelper): @@ -67,7 +66,7 @@ def produce_impl(self): LayerDevRecN = ly.layer(self.devrec) LayerTextN = ly.layer(self.textl) - from math import pi, cos, sin, log, sqrt, tan + from math import pi, cos, sin lambda_0 = self.wavelength ##um wavelength of light pin_length = 0.5 ##um extra nub for the waveguid attachment diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/taper_bezier.oas b/klayout/EBeam/pymacros/pcells_EBeam_Beta/taper_bezier.oas new file mode 100644 index 0000000000000000000000000000000000000000..758ea30954a44781b76d50a89e2d259957561687 GIT binary patch literal 4489 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 Wz*=EoC{P3#2m}BDg#Tj!0Q?VaK|IL- literal 0 HcmV?d00001 diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Beta/taper_bezier.py b/klayout/EBeam/pymacros/pcells_EBeam_Beta/taper_bezier.py index 67675a8d..0f66fd8c 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Beta/taper_bezier.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Beta/taper_bezier.py @@ -119,9 +119,8 @@ def __init__(self): if __name__ == "__main__": print('Test layout for: Taper Bezier') - from SiEPIC.utils.layout import new_layout, floorplan - from SiEPIC.scripts import zoom_out import siepic_ebeam_pdk + from SiEPIC.utils.layout import new_layout # load the test library, and technology t = test_lib() @@ -134,7 +133,6 @@ def __init__(self): library = tech + 'test_lib' # Create for several combinations - from SiEPIC.utils import load_Waveguides_by_Tech params = [ {'wg_width1':0.5, 'wg_width2':1, 'wg_length':10, 'a':0.37, 'b':0.37}, {'wg_width1':0.5, 'wg_width2':2, 'wg_length':20, 'a':0.37, 'b':0.37}, diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Dream/ebeam_dream_PWB_edge_couplers_BB.py b/klayout/EBeam/pymacros/pcells_EBeam_Dream/ebeam_dream_PWB_edge_couplers_BB.py index dafcead4..abc3155c 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Dream/ebeam_dream_PWB_edge_couplers_BB.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Dream/ebeam_dream_PWB_edge_couplers_BB.py @@ -14,7 +14,7 @@ def __init__(self): # Important: initialize the super class super(ebeam_dream_PWB_edge_couplers_BB, self).__init__() - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech, get_layout_variables + from SiEPIC.utils import get_technology_by_name self.technology_name = 'EBeam' TECHNOLOGY = get_technology_by_name(self.technology_name) @@ -45,12 +45,9 @@ def produce(self, layout, layers, parameters, cell): self.layout = layout # import neccessary libraries - from math import pi, sin, cos, tan from SiEPIC._globals import PIN_LENGTH as pin_length from SiEPIC.extend import to_itype - from SiEPIC.scripts import path_to_waveguide, connect_pins_with_waveguide, connect_cell - import ctypes #fetch the parameters dbu = self.layout.dbu diff --git a/klayout/EBeam/pymacros/pcells_EBeam_Dream/ebeam_dream_splitter_1x2_te1550_BB.py b/klayout/EBeam/pymacros/pcells_EBeam_Dream/ebeam_dream_splitter_1x2_te1550_BB.py index 67fb53e1..42489248 100644 --- a/klayout/EBeam/pymacros/pcells_EBeam_Dream/ebeam_dream_splitter_1x2_te1550_BB.py +++ b/klayout/EBeam/pymacros/pcells_EBeam_Dream/ebeam_dream_splitter_1x2_te1550_BB.py @@ -13,7 +13,7 @@ def __init__(self): # Important: initialize the super class super(ebeam_dream_splitter_1x2_te1550_BB, self).__init__() - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import get_technology_by_name self.technology_name = 'EBeam' TECHNOLOGY = get_technology_by_name(self.technology_name) diff --git a/klayout/EBeam/pymacros/pcells_SiN/Universal_GC.py b/klayout/EBeam/pymacros/pcells_SiN/Universal_GC.py index 9994eb26..23b6e4c2 100644 --- a/klayout/EBeam/pymacros/pcells_SiN/Universal_GC.py +++ b/klayout/EBeam/pymacros/pcells_SiN/Universal_GC.py @@ -20,7 +20,7 @@ def __init__(self): # Important: initialize the super class super(Universal_GC, self).__init__() - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import get_technology_by_name TECHNOLOGY = get_technology_by_name('EBeam') self.TECHNOLOGY = TECHNOLOGY @@ -73,8 +73,7 @@ def produce_impl(self): def effective_index(wl = self.wavelength, etch_depth = self.etch_depth, Si_thickness = self.Si_thickness, n_t = self.n_t, pol = self.pol, dc = self.dc): - from math import pi, cos, sin, log, sqrt, tan - from SiEPIC.utils import points_per_circle + from math import pi, tan, sqrt point =1001 n_0 = n_t @@ -109,9 +108,9 @@ def effective_index(wl = self.wavelength, etch_depth = self.etch_depth, Si_thick for ii in range(0,point-1): b_0[ii] = n_1*k_0 + (n_2 - n_1)*k_0/(point-1)*ii # copied from .ample UGC: should this be point-1? - h_0[ii] = sqrt( abs(pow(n_2*k_0,2) - pow(b_0[ii],2))); - q_0[ii] = sqrt( abs(pow(b_0[ii],2) - pow(n_0*k_0,2))); - p_0[ii] = sqrt( abs(pow(b_0[ii],2) - pow(n_3*k_0,2))); + h_0[ii] = sqrt( abs(pow(n_2*k_0,2) - pow(b_0[ii],2))) + q_0[ii] = sqrt( abs(pow(b_0[ii],2) - pow(n_0*k_0,2))) + p_0[ii] = sqrt( abs(pow(b_0[ii],2) - pow(n_3*k_0,2))) pbar_0[ii] = pow(n_2/n_3, 2)*p_0[ii] qbar_0[ii] = pow(n_2/n_0, 2)*q_0[ii] @@ -175,7 +174,7 @@ def effective_index(wl = self.wavelength, etch_depth = self.etch_depth, Si_thick return ne ##################################### - from math import pi, cos, sin, log, sqrt, tan + from math import pi, cos, sin, tan from SiEPIC.utils import points_per_circle lambda_0 = self.wavelength ##um wavelength of light diff --git a/klayout/EBeam/pymacros/pcells_SiN/Waveguide_bump.py b/klayout/EBeam/pymacros/pcells_SiN/Waveguide_bump.py index 41d76d67..49d5f946 100644 --- a/klayout/EBeam/pymacros/pcells_SiN/Waveguide_bump.py +++ b/klayout/EBeam/pymacros/pcells_SiN/Waveguide_bump.py @@ -64,7 +64,6 @@ def coerce_parameters_impl(self): else: mult = 1 self.radius = float(params[0]['radius']) * mult - from SiEPIC.extend import to_itype self.wg_width = float(params[0]['width']) @@ -78,7 +77,7 @@ def produce_impl(self): ly = self.layout shapes = self.cell.shapes - from SiEPIC.utils import get_technology_by_name, load_Waveguides_by_Tech + from SiEPIC.utils import get_technology_by_name TECHNOLOGY = get_technology_by_name('EBeam') params = [t for t in self.waveguide_types if t['name'] == self.waveguide_type] layer = [wg['layer'] for wg in params[0]['component']] @@ -93,8 +92,8 @@ def produce_impl(self): LayerDevRecN = ly.layer(self.devrec) LayerTextN = ly.layer(self.text) - from math import pi, cos, sin, log, sqrt - from SiEPIC.utils import arc, arc_to_waveguide, points_per_circle, arc_wg + from math import pi, cos, sin + from SiEPIC.utils import arc_wg x = 0 y = 0 diff --git a/klayout/EBeam/pymacros/pcells_SiN/ebeam_dc_halfring_straight.py b/klayout/EBeam/pymacros/pcells_SiN/ebeam_dc_halfring_straight.py index e326e568..6347dc49 100644 --- a/klayout/EBeam/pymacros/pcells_SiN/ebeam_dc_halfring_straight.py +++ b/klayout/EBeam/pymacros/pcells_SiN/ebeam_dc_halfring_straight.py @@ -33,8 +33,7 @@ def can_create_from_shape_impl(self): def produce_impl(self): # This is the main part of the implementation: create the layout - from math import pi, cos, sin - from SiEPIC.utils import arc_wg, arc_wg_xy + from SiEPIC.utils import arc_wg_xy from SiEPIC.utils.layout import make_pin from SiEPIC.extend import to_itype diff --git a/klayout/EBeam/pymacros/photonic_crystals/photonic_crystals.py b/klayout/EBeam/pymacros/photonic_crystals/photonic_crystals.py index d7dcc31f..0b688cfe 100644 --- a/klayout/EBeam/pymacros/photonic_crystals/photonic_crystals.py +++ b/klayout/EBeam/pymacros/photonic_crystals/photonic_crystals.py @@ -80,8 +80,8 @@ import pya import math -from SiEPIC.utils import get_technology, get_technology_by_name -from SiEPIC.utils import arc, arc_wg, arc_to_waveguide, points_per_circle#,layout +from SiEPIC.utils import get_technology_by_name +from SiEPIC.utils import points_per_circle#,layout # -------------------------------------------------------------------------------------------------------------------------------------------------- # diff --git a/klayout/EBeam/pymacros/tests/test_All_Library_Cells.py b/klayout/EBeam/pymacros/tests/test_All_Library_Cells.py index 7b7461d5..2e1605ba 100644 --- a/klayout/EBeam/pymacros/tests/test_All_Library_Cells.py +++ b/klayout/EBeam/pymacros/tests/test_All_Library_Cells.py @@ -6,14 +6,11 @@ tech_name = 'EBeam' -import pya # klayout -import os, sys -import SiEPIC +import os from SiEPIC._globals import Python_Env print('KLayout running in mode: %s' % Python_Env) -from SiEPIC.utils.layout import new_layout, floorplan -from SiEPIC.utils import load_klayout_technology -from SiEPIC.scripts import instantiate_all_library_cells, zoom_out, export_layout +from SiEPIC.utils.layout import new_layout +from SiEPIC.scripts import instantiate_all_library_cells def test_all_library_cells(): diff --git a/klayout/EBeam/pymacros/tests/test_waveguide_sliver.oas b/klayout/EBeam/pymacros/tests/test_waveguide_sliver.oas new file mode 100644 index 0000000000000000000000000000000000000000..fea321e14a1744ec1010a4068dc9453b1ee9b6d3 GIT binary patch literal 1626 zcmd_q`8yK~0KoChT&>oIIcm-onIj5g=$J*hV|it+Cd-`Vp7OGsi?NtT^p@8VUS|wt z8cjKRn7a^Ot?{yQ?(e_zcB_j&@Rpq+Km})?jRj> ze)$R>CWH60xD%|WgvOsS7tronbE`S z?{-W~MZzYo4EZzerYAwA&`oS7qgY&#uC-E1D)=zU8n7gz(tjGVQMy@ZxnkPlHQC{0 zDc6REG^90!Y3bKN;4ICWcKLB$2cH}%C~x0h8|hrOe!U!jaBD>_hhmO~V3{?qw@L@^ z%x^9^U;l6*{j?*Q>wlJp*?}Ff46hfBtX#xBL11}FuHqrn;|vznOmB;mEH zC#}49L(s*^(z*4AJ5tTd>}iCuc%An4FTroPR=ALo<+AT|s$WR|b=Xq)=Byv@^9Ohw zR`Qirnz<$|b(HbxJ}5aQw*9aaMHWNDf=jqZ_JMLD1)B}|lno#PqfdP! zIvY%}hb0ABm@6da$rH~Q zSNAMDq=K^<_39x_6Zes5s44?wYrv9+Jc)6n hpxEF*lElCAT|xrb2nJ>VfhT~`KmZUx{eJ}j`~w!H4;26a literal 0 HcmV?d00001 diff --git a/klayout/EBeam/pymacros/tests/test_waveguide_sliver.py b/klayout/EBeam/pymacros/tests/test_waveguide_sliver.py index 8e194523..80cd8f2e 100644 --- a/klayout/EBeam/pymacros/tests/test_waveguide_sliver.py +++ b/klayout/EBeam/pymacros/tests/test_waveguide_sliver.py @@ -18,19 +18,16 @@ import pya from pya import * -import SiEPIC -from SiEPIC._globals import Python_Env -from SiEPIC.scripts import connect_cell, connect_pins_with_waveguide, zoom_out, export_layout -from SiEPIC.utils.layout import new_layout, floorplan -from SiEPIC.extend import to_itype import siepic_ebeam_pdk +from SiEPIC.scripts import connect_pins_with_waveguide, export_layout +from SiEPIC.utils.layout import new_layout import os def test_sliver(): tech_name = 'EBeam' - from SiEPIC.utils import get_technology, get_technology_by_name + from SiEPIC.utils import get_technology_by_name TECHNOLOGY = get_technology_by_name(tech_name) cell, ly = new_layout(tech_name, top_cell_name, GUI=True, overwrite = True)