Skip to content

Commit

Permalink
minor errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasc-ubc committed Jul 23, 2024
1 parent e7cc365 commit 85cd0d9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
7 changes: 6 additions & 1 deletion klayout_dot_config/python/SiEPIC/extend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,10 @@ def get_LumericalINTERCONNECT_analyzers_from_opt_in(self, components, verbose=No

from SiEPIC.utils import load_DFT
from .utils import get_technology_by_name
TECHNOLOGY = get_technology_by_name(self.layout().technology().name)
if 'TECHNOLOGY' in dir(self.layout()):
TECHNOLOGY = self.layout().TECHNOLOGY
else:
TECHNOLOGY = get_technology_by_name(self.layout().technology().name)
DFT = load_DFT(TECHNOLOGY)
if not DFT:
if verbose:
Expand Down Expand Up @@ -1783,6 +1786,8 @@ def plot(self, width = 800, show_labels = True, show_ruler = True, retina = True

# Load layer properties from the technology
lyp_path=layout.technology().eff_layer_properties_file()
if not lyp_path:
raise Exception ('SiEPIC.extend.plot: technology not specified.')
layout_view.load_layer_props(lyp_path)

# Configure the layout view settings
Expand Down
12 changes: 6 additions & 6 deletions klayout_dot_config/python/SiEPIC/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2527,15 +2527,15 @@ def open_folder(folder):
print("running in windows explorer, %s" % folder)
print(subprocess.Popen(r'explorer /select,"%s"' % folder))

'''
User to select opt_in labels, either:
- Text object selection in the layout
- GUI with drop-down menu from all labels in the layout
- argument to the function, opt_in_selection_text, array of opt_in labels (strings)
'''


def user_select_opt_in(cell=None, verbose=None, option_all=True, opt_in_selection_text=[]):
'''
User to select opt_in labels, either:
- Text object selection in the layout
- GUI with drop-down menu from all labels in the layout
- argument to the function, opt_in_selection_text, array of opt_in labels (strings)
'''
from .utils import find_automated_measurement_labels
text_out, opt_in = find_automated_measurement_labels(topcell=cell)
if not opt_in:
Expand Down
9 changes: 6 additions & 3 deletions klayout_dot_config/python/SiEPIC/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def get_technology_by_name(tech_name, verbose=False):

if not tech_name:
raise Exception(
"Problem with Technology", "Problem with active Technology: please activate a technology (not Default)", pya.MessageBox.Ok)
"Problem with Technology", "Problem with active Technology: please activate a technology (not Default)")

from .._globals import KLAYOUT_VERSION
technology = {}
Expand Down Expand Up @@ -1209,8 +1209,11 @@ def find_automated_measurement_labels(topcell=None, LayerTextN=None, TECHNOLOGY=
import string
if TECHNOLOGY == None:
if topcell:
from . import get_technology_by_name
TECHNOLOGY = get_technology_by_name(topcell.layout().technology().name)
if 'TECHNOLOGY' in dir(topcell.layout()):
TECHNOLOGY = topcell.layout().TECHNOLOGY
else:
from . import get_technology_by_name
TECHNOLOGY = get_technology_by_name(topcell.layout().technology().name)
else:
from . import get_technology
TECHNOLOGY = get_technology()
Expand Down

0 comments on commit 85cd0d9

Please sign in to comment.