pyedb 0.11.0__py3-none-any.whl → 0.12.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyedb might be problematic. Click here for more details.

pyedb/__init__.py CHANGED
@@ -44,7 +44,7 @@ deprecation_warning()
44
44
  #
45
45
 
46
46
  pyedb_path = os.path.dirname(__file__)
47
- __version__ = "0.11.0"
47
+ __version__ = "0.12.0"
48
48
  version = __version__
49
49
 
50
50
  #
@@ -27,25 +27,25 @@ class CfgBoundaries:
27
27
  def __init__(self, pdata, boundaries_dict):
28
28
  self._pedb = pdata.pedb
29
29
  self._boundaries_dict = boundaries_dict
30
- self.open_region = self._boundaries_dict.get("open_region", True)
30
+ self.open_region = self._boundaries_dict.get("open_region", None)
31
31
  self._map_open_region_type()
32
- self.pml_visible = self._boundaries_dict.get("pml_visible", False)
33
- self.pml_operation_frequency = self._boundaries_dict.get("pml_operation_frequency", "5GHz")
34
- self.pml_radiation_factor = self._boundaries_dict.get("pml_radiation_factor", 10)
32
+ self.pml_visible = self._boundaries_dict.get("pml_visible", None)
33
+ self.pml_operation_frequency = self._boundaries_dict.get("pml_operation_frequency", None)
34
+ self.pml_radiation_factor = self._boundaries_dict.get("pml_radiation_factor", None)
35
35
  self._map_dielectric_extend_type()
36
- self.dielectric_base_polygon = self._boundaries_dict.get("dielectric_base_polygon", "")
37
- self.horizontal_padding = self._boundaries_dict.get("horizontal_padding", 0.0)
36
+ self.dielectric_base_polygon = self._boundaries_dict.get("dielectric_base_polygon", None)
37
+ self.horizontal_padding = self._boundaries_dict.get("horizontal_padding", None)
38
38
  self.honor_primitives_on_dielectric_layers = self._boundaries_dict.get(
39
39
  "honor_primitives_on_dielectric_layers", False
40
40
  )
41
41
  self._map_air_box_extend_type()
42
- self.air_box_base_polygon = self._boundaries_dict.get("air_box_base_polygon", "")
42
+ self.air_box_base_polygon = self._boundaries_dict.get("air_box_base_polygon", None)
43
43
  self.air_box_truncate_model_ground_layers = self._boundaries_dict.get(
44
- "air_box_truncate_model_ground_layers", False
44
+ "air_box_truncate_model_ground_layers", None
45
45
  )
46
- self.air_box_horizontal_padding = self._boundaries_dict.get("air_box_horizontal_padding", 0.15)
47
- self.air_box_positive_vertical_padding = self._boundaries_dict.get("air_box_positive_vertical_padding", 1)
48
- self.air_box_negative_vertical_padding = self._boundaries_dict.get("air_box_negative_vertical_padding", 1)
46
+ self.air_box_horizontal_padding = self._boundaries_dict.get("air_box_horizontal_padding", None)
47
+ self.air_box_positive_vertical_padding = self._boundaries_dict.get("air_box_positive_vertical_padding", None)
48
+ self.air_box_negative_vertical_padding = self._boundaries_dict.get("air_box_negative_vertical_padding", None)
49
49
 
50
50
  def _map_air_box_extend_type(self):
51
51
  air_box_type = self._boundaries_dict.get("air_box_extents_type", None)
@@ -94,22 +94,32 @@ class CfgBoundaries:
94
94
 
95
95
  def apply(self):
96
96
  """Imports boundary information from JSON."""
97
- self._pedb.hfss.hfss_extent_info.use_open_region = self.open_region
97
+ if self.open_region is not None:
98
+ self._pedb.hfss.hfss_extent_info.use_open_region = self.open_region
98
99
  self._pedb.hfss.hfss_extent_info.open_region_type = self.open_region_type.name.lower()
99
- self._pedb.hfss.hfss_extent_info.is_pml_visible = self.pml_visible
100
- self._pedb.hfss.hfss_extent_info.operating_freq = self.pml_operation_frequency
101
- self._pedb.hfss.hfss_extent_info.radiation_level = self.pml_radiation_factor
100
+ if self.pml_visible is not None:
101
+ self._pedb.hfss.hfss_extent_info.is_pml_visible = self.pml_visible
102
+ if self.pml_operation_frequency:
103
+ self._pedb.hfss.hfss_extent_info.operating_freq = self.pml_operation_frequency
104
+ if self.pml_radiation_factor:
105
+ self._pedb.hfss.hfss_extent_info.radiation_level = self.pml_radiation_factor
102
106
  self._pedb.hfss.hfss_extent_info.extent_type = self.dielectric_extents_type.name.lower()
103
107
  if self.dielectric_base_polygon:
104
108
  self._pedb.hfss.hfss_extent_info.dielectric_base_polygon = self.dielectric_base_polygon
105
- self._pedb.hfss.hfss_extent_info.dielectric_extent_size = float(self.horizontal_padding)
106
- self._pedb.hfss.hfss_extent_info.honor_user_dielectric = self.honor_primitives_on_dielectric_layers
109
+ if self.horizontal_padding:
110
+ self._pedb.hfss.hfss_extent_info.dielectric_extent_size = float(self.horizontal_padding)
111
+ if self.honor_primitives_on_dielectric_layers is not None:
112
+ self._pedb.hfss.hfss_extent_info.honor_user_dielectric = self.honor_primitives_on_dielectric_layers
107
113
  self._pedb.hfss.hfss_extent_info.extent_type = self.air_box_extents_type.name.lower()
108
- self._pedb.hfss.hfss_extent_info.truncate_air_box_at_ground = self.air_box_truncate_model_ground_layers
109
- self._pedb.hfss.hfss_extent_info.air_box_horizontal_extent = float(self.air_box_horizontal_padding)
110
- self._pedb.hfss.hfss_extent_info.air_box_positive_vertical_extent = float(
111
- self.air_box_positive_vertical_padding
112
- )
113
- self._pedb.hfss.hfss_extent_info.air_box_negative_vertical_extent = float(
114
- self.air_box_negative_vertical_padding
115
- )
114
+ if self.air_box_truncate_model_ground_layers is not None:
115
+ self._pedb.hfss.hfss_extent_info.truncate_air_box_at_ground = self.air_box_truncate_model_ground_layers
116
+ if self.air_box_horizontal_padding:
117
+ self._pedb.hfss.hfss_extent_info.air_box_horizontal_extent = float(self.air_box_horizontal_padding)
118
+ if self.air_box_positive_vertical_padding:
119
+ self._pedb.hfss.hfss_extent_info.air_box_positive_vertical_extent = float(
120
+ self.air_box_positive_vertical_padding
121
+ )
122
+ if self.air_box_negative_vertical_padding:
123
+ self._pedb.hfss.hfss_extent_info.air_box_negative_vertical_extent = float(
124
+ self.air_box_negative_vertical_padding
125
+ )
@@ -54,20 +54,24 @@ class Definition:
54
54
  def __init__(self, pdata, definition_dict):
55
55
  self._pedb = pdata.pedb
56
56
  self._definition_dict = definition_dict
57
- self.name = self._definition_dict.get("name", "")
58
- self.hole_diameter = self._definition_dict.get("hole_diameter", "")
59
- self.hole_plating_thickness = self._definition_dict.get("hole_plating_thickness", "")
60
- self.hole_material = self._definition_dict.get("hole_material", "")
61
- self.hole_range = self._definition_dict.get("hole_range", "")
57
+ self.name = self._definition_dict.get("name", None)
58
+ self.hole_diameter = self._definition_dict.get("hole_diameter", None)
59
+ self.hole_plating_thickness = self._definition_dict.get("hole_plating_thickness", None)
60
+ self.hole_material = self._definition_dict.get("hole_material", None)
61
+ self.hole_range = self._definition_dict.get("hole_range", None)
62
62
 
63
63
  def apply(self):
64
64
  """Apply padstack definition on layout."""
65
65
  padstack_defs = self._pedb.padstacks.definitions
66
66
  pdef = padstack_defs[self.name]
67
- pdef.hole_diameter = self.hole_diameter
68
- pdef.hole_plating_thickness = self.hole_plating_thickness
69
- pdef.material = self.hole_material
70
- pdef.hole_range = self.hole_range
67
+ if self.hole_diameter:
68
+ pdef.hole_diameter = self.hole_diameter
69
+ if self.hole_plating_thickness:
70
+ pdef.hole_plating_thickness = self.hole_plating_thickness
71
+ if self.hole_material:
72
+ pdef.material = self.hole_material
73
+ if self.hole_range:
74
+ pdef.hole_range = self.hole_range
71
75
 
72
76
 
73
77
  class Instance:
@@ -41,8 +41,8 @@ class CfgCircuitElement:
41
41
  self.neg_term_info = kwargs.get("negative_terminal", None)
42
42
 
43
43
  @pyedb_function_handler
44
- def _create(self):
45
- """Create step 1."""
44
+ def _create_terminals(self):
45
+ """Create step 1. Collect positive and negative terminals."""
46
46
  pos_term_info = self.pos_term_info
47
47
  if pos_term_info:
48
48
  pos_type, pos_value = [[i, j] for i, j in pos_term_info.items()][0]
@@ -71,16 +71,26 @@ class CfgCircuitElement:
71
71
  self.neg_terminal = None
72
72
  if neg_term_info:
73
73
  neg_type, neg_value = [[i, j] for i, j in neg_term_info.items()][0]
74
- if neg_type == "pin_group":
75
- pin_group = {neg_value: self.pedb.siwave.pin_groups[neg_value]}
74
+ if neg_type == "nearest_pin":
75
+ ref_net = neg_value.get("reference_net", "GND")
76
+ search_radius = neg_value.get("search_radius", "5e-3")
77
+ temp = dict()
78
+ for i, j in pos_objs.items():
79
+ temp[i] = self._pdata.pedb.padstacks.get_reference_pins(j, ref_net, search_radius, max_limit=1)[0]
80
+ self.neg_terminal = {
81
+ i: j.create_terminal(i + "_ref") if not j.terminal else j.terminal for i, j in temp.items()
82
+ }
76
83
  else:
77
- # Get pins
78
- pins = self._get_pins(neg_type, neg_value) # terminal type pin or net
79
- # create pin group
80
- pin_group = self._create_pin_group(pins, True)
81
- self.neg_terminal = [j.create_terminal(i) if not j.terminal else j.terminal for i, j in pin_group.items()][
82
- 0
83
- ]
84
+ if neg_type == "pin_group":
85
+ pin_group = {neg_value: self.pedb.siwave.pin_groups[neg_value]}
86
+ else:
87
+ # Get pins
88
+ pins = self._get_pins(neg_type, neg_value) # terminal type pin or net
89
+ # create pin group
90
+ pin_group = self._create_pin_group(pins, True)
91
+ self.neg_terminal = [
92
+ j.create_terminal(i) if not j.terminal else j.terminal for i, j in pin_group.items()
93
+ ][0]
84
94
 
85
95
  @pyedb_function_handler
86
96
  def _get_pins(self, terminal_type, terminal_value):
@@ -125,11 +135,14 @@ class CfgPort(CfgCircuitElement):
125
135
  @pyedb_function_handler
126
136
  def create(self):
127
137
  """Create port."""
128
- self._create()
138
+ self._create_terminals()
129
139
  is_circuit_port = True if self.type == "circuit" else False
130
140
  circuit_elements = []
131
- for _, j in self.pos_terminals.items():
132
- elem = self.pedb.create_port(j, self.neg_terminal, is_circuit_port)
141
+ for name, j in self.pos_terminals.items():
142
+ if isinstance(self.neg_terminal, dict):
143
+ elem = self.pedb.create_port(j, self.neg_terminal[name], is_circuit_port)
144
+ else:
145
+ elem = self.pedb.create_port(j, self.neg_terminal, is_circuit_port)
133
146
  if not self.distributed:
134
147
  elem.name = self.name
135
148
  circuit_elements.append(elem)
@@ -148,12 +161,15 @@ class CfgSources(CfgCircuitElement):
148
161
  @pyedb_function_handler
149
162
  def create(self):
150
163
  """Create sources."""
151
- self._create()
164
+ self._create_terminals()
152
165
  is_circuit_port = True if self.type == "circuit" else False
153
166
  circuit_elements = []
154
167
  method = self.pedb.create_current_source if self.type == "current" else self.pedb.create_voltage_source
155
- for _, j in self.pos_terminals.items():
156
- elem = method(j, self.neg_terminal)
168
+ for name, j in self.pos_terminals.items():
169
+ if isinstance(self.neg_terminal, dict):
170
+ elem = method(j, self.neg_terminal[name])
171
+ else:
172
+ elem = method(j, self.neg_terminal)
157
173
  if not self.distributed:
158
174
  elem.name = self.name
159
175
  elem.magnitude = self.magnitude
pyedb/dotnet/edb.py CHANGED
@@ -197,7 +197,6 @@ class Edb(Database):
197
197
  self.standalone = True
198
198
  self.oproject = oproject
199
199
  self._main = sys.modules["__main__"]
200
- self.edbversion = edbversion
201
200
  self.isaedtowned = isaedtowned
202
201
  self.isreadonly = isreadonly
203
202
  self.cellname = cellname
@@ -3703,12 +3702,10 @@ class Edb(Database):
3703
3702
  self.logger.error("Setup name already used in the layout")
3704
3703
  return False
3705
3704
  version = self.edbversion.split(".")
3706
- if int(version[0]) == 2024 and int(version[-1]) >= 2 or int(version[0]) > 2024:
3707
- setup = HFSSPISimulationSetup(self).create(name)
3708
- return setup
3709
- else:
3705
+ if float(self.edbversion) < 2024.2:
3710
3706
  self.logger.error("HFSSPI simulation only supported with Ansys release 2024R2 and higher")
3711
3707
  return False
3708
+ return HFSSPISimulationSetup(self).create(name)
3712
3709
 
3713
3710
  @pyedb_function_handler()
3714
3711
  def create_siwave_syz_setup(self, name=None):
@@ -3987,7 +3984,7 @@ class Edb(Database):
3987
3984
  return connected_ports_list
3988
3985
 
3989
3986
  @pyedb_function_handler
3990
- def create_port(self, terminal, ref_terminal=None, is_circuit_port=False):
3987
+ def create_port(self, terminal, ref_terminal=None, is_circuit_port=False, name=None):
3991
3988
  """Create a port.
3992
3989
 
3993
3990
  Parameters
@@ -4005,7 +4002,8 @@ class Edb(Database):
4005
4002
  Negative terminal of the port.
4006
4003
  is_circuit_port : bool, optional
4007
4004
  Whether it is a circuit port. The default is ``False``.
4008
-
4005
+ name: str, optional
4006
+ Name of the created port. The default is None, a random name is generated.
4009
4007
  Returns
4010
4008
  -------
4011
4009
  list: [:class:`pyedb.dotnet.edb_core.edb_data.ports.GapPort`,
@@ -4018,7 +4016,8 @@ class Edb(Database):
4018
4016
  if ref_terminal:
4019
4017
  ref_terminal.boundary_type = "PortBoundary"
4020
4018
  terminal.ref_terminal = ref_terminal
4021
-
4019
+ if name:
4020
+ terminal.name = name
4022
4021
  return self.ports[terminal.name]
4023
4022
 
4024
4023
  @pyedb_function_handler
@@ -977,19 +977,18 @@ class ViaSettings(object):
977
977
  -------
978
978
  bool
979
979
  """
980
- if self._parent._pedb.version[0] >= 10:
981
- return self._via_settings.ViaMeshPlating
982
- else:
980
+ if float(self._parent._pedb.edbversion) < 2024.1:
983
981
  self._parent._pedb.logger.error("Property only supported on Ansys release 2024R1 and later")
984
982
  return False
983
+ return self._via_settings.ViaMeshPlating
985
984
 
986
985
  @via_mesh_plating.setter
987
986
  def via_mesh_plating(self, value):
988
- if self._parent._pedb.version[0] >= 10:
987
+ if float(self._parent._pedb.edbversion) < 2024.1:
988
+ self._parent._pedb.logger.error("Property only supported on Ansys release 2024R1 and later")
989
+ else:
989
990
  self._via_settings.ViaMeshPlating = value
990
991
  self._parent._update_setup()
991
- else:
992
- self._parent._pedb.logger.error("Property only supported on Ansys release 2024R1 and later")
993
992
 
994
993
  @property
995
994
  def via_material(self):
@@ -123,6 +123,7 @@ class EDBNetsData(NetDotNet):
123
123
  save_plot=None,
124
124
  outline=None,
125
125
  size=(2000, 1000),
126
+ show=True,
126
127
  ):
127
128
  """Plot a net to Matplotlib 2D chart.
128
129
 
@@ -134,12 +135,14 @@ class EDBNetsData(NetDotNet):
134
135
  If `True` the legend is shown in the plot. (default)
135
136
  If `False` the legend is not shown.
136
137
  save_plot : str, optional
137
- If `None` the plot will be shown.
138
- If a file path is specified the plot will be saved to such file.
138
+ If a path is specified the plot will be saved in this location.
139
+ If ``save_plot`` is provided, the ``show`` parameter is ignored.
139
140
  outline : list, optional
140
141
  List of points of the outline to plot.
141
142
  size : tuple, optional
142
143
  Image size in pixel (width, height).
144
+ show : bool, optional
145
+ Whether to show the plot or not. Default is `True`.
143
146
  """
144
147
 
145
148
  self._app.nets.plot(
@@ -149,6 +152,7 @@ class EDBNetsData(NetDotNet):
149
152
  save_plot=save_plot,
150
153
  outline=outline,
151
154
  size=size,
155
+ show=show,
152
156
  )
153
157
 
154
158
  @pyedb_function_handler()
@@ -1183,7 +1183,7 @@ class EDBPadstackInstance(EDBPrimitivesMain):
1183
1183
  -------
1184
1184
  :class:`pyedb.dotnet.edb_core.edb_data.terminals`
1185
1185
  """
1186
-
1186
+ warnings.warn("Use new property :func:`terminal` instead.", DeprecationWarning)
1187
1187
  if create_new_terminal:
1188
1188
  term = self._create_terminal(name)
1189
1189
  else:
@@ -1195,6 +1195,14 @@ class EDBPadstackInstance(EDBPrimitivesMain):
1195
1195
  if not term.is_null:
1196
1196
  return term
1197
1197
 
1198
+ @property
1199
+ def terminal(self):
1200
+ """Terminal."""
1201
+ from pyedb.dotnet.edb_core.edb_data.terminals import PadstackInstanceTerminal
1202
+
1203
+ term = PadstackInstanceTerminal(self._pedb, self._edb_object.GetPadstackInstanceTerminal())
1204
+ return term if not term.is_null else None
1205
+
1198
1206
  @pyedb_function_handler()
1199
1207
  def _create_terminal(self, name=None):
1200
1208
  """Create a padstack instance terminal"""
@@ -156,7 +156,7 @@ class EdbLayout(object):
156
156
  lay = i.GetLayer().GetName()
157
157
  _primitives_by_layer[lay].append(cast(i, self._pedb))
158
158
  except:
159
- self._logger.warning(f"Failed to get layer on primitive {i.id}, skipping.")
159
+ self._logger.warning(f"Failed to get layer on primitive {i}, skipping.")
160
160
  continue
161
161
  return _primitives_by_layer
162
162
 
@@ -242,7 +242,7 @@ class EdbLayout(object):
242
242
  else:
243
243
  objinst.append(el)
244
244
  except:
245
- self._logger.warning(f"Failed to retrieve layer on polygon {el.id}")
245
+ self._logger.warning(f"Failed to retrieve layer on polygon {el}")
246
246
  return objinst
247
247
 
248
248
  @pyedb_function_handler()
@@ -822,6 +822,7 @@ class EdbNets(object):
822
822
  size=(2000, 1000),
823
823
  plot_components_on_top=False,
824
824
  plot_components_on_bottom=False,
825
+ show=True,
825
826
  ):
826
827
  """Plot a Net to Matplotlib 2D Chart.
827
828
 
@@ -838,8 +839,8 @@ class EdbNets(object):
838
839
  If ``True`` the legend is shown in the plot. (default)
839
840
  If ``False`` the legend is not shown.
840
841
  save_plot : str, optional
841
- If ``None`` the plot will be shown.
842
- If a file path is specified the plot will be saved to such file.
842
+ If a path is specified the plot will be saved in this location.
843
+ If ``save_plot`` is provided, the ``show`` parameter is ignored.
843
844
  outline : list, optional
844
845
  List of points of the outline to plot.
845
846
  size : tuple, int, optional
@@ -852,6 +853,8 @@ class EdbNets(object):
852
853
  If ``True`` the components placed on bottom layer are plotted.
853
854
  If ``False`` the components are not plotted. (default)
854
855
  If nets and/or layers is specified, only the components belonging to the specified nets/layers are plotted.
856
+ show : bool, optional
857
+ Whether to show the plot or not. Default is `True`.
855
858
  """
856
859
  if is_ironpython:
857
860
  self._logger.warning("Plot functionalities are enabled only in CPython.")
@@ -880,8 +883,9 @@ class EdbNets(object):
880
883
  xlabel="X (m)",
881
884
  ylabel="Y (m)",
882
885
  title=self._pedb.active_cell.GetName(),
883
- snapshot_path=save_plot,
886
+ save_plot=save_plot,
884
887
  axis_equal=True,
888
+ show=show,
885
889
  )
886
890
 
887
891
  @pyedb_function_handler()
@@ -1259,6 +1259,7 @@ class EdbSiwave(object):
1259
1259
  )
1260
1260
 
1261
1261
  if edb_pingroup.IsNull(): # pragma: no cover
1262
+ self._logger.error(f"Failed to create pin group {group_name}.")
1262
1263
  return False
1263
1264
  else:
1264
1265
  names = [i for i in pins if i.GetNet().GetName()]
@@ -2490,6 +2490,7 @@ class Stackup(LayerCollection):
2490
2490
  first_layer=None,
2491
2491
  last_layer=None,
2492
2492
  scale_elevation=True,
2493
+ show=True,
2493
2494
  ):
2494
2495
  """Plot current stackup and, optionally, overlap padstack definitions.
2495
2496
  Plot supports only 'Laminate' and 'Overlapping' stackup types.
@@ -2497,8 +2498,8 @@ class Stackup(LayerCollection):
2497
2498
  Parameters
2498
2499
  ----------
2499
2500
  save_plot : str, optional
2500
- If ``None`` the plot will be shown.
2501
- If a file path is specified the plot will be saved to such file.
2501
+ If a path is specified the plot will be saved in this location.
2502
+ If ``save_plot`` is provided, the ``show`` parameter is ignored.
2502
2503
  size : tuple, optional
2503
2504
  Image size in pixel (width, height). Default value is ``(2000, 1500)``
2504
2505
  plot_definitions : str, list, optional
@@ -2511,6 +2512,8 @@ class Stackup(LayerCollection):
2511
2512
  scale_elevation : bool, optional
2512
2513
  The real layer thickness is scaled so that max_thickness = 3 * min_thickness.
2513
2514
  Default is `True`.
2515
+ show : bool, optional
2516
+ Whether to show the plot or not. Default is `True`.
2514
2517
 
2515
2518
  Returns
2516
2519
  -------
@@ -2925,7 +2928,7 @@ class Stackup(LayerCollection):
2925
2928
  xlabel="",
2926
2929
  ylabel="",
2927
2930
  title="",
2928
- snapshot_path=None,
2931
+ save_plot=None,
2929
2932
  x_limits=[x_min, x_max],
2930
2933
  y_limits=[y_min, y_max],
2931
2934
  axis_equal=False,
@@ -2950,6 +2953,6 @@ class Stackup(LayerCollection):
2950
2953
  plt.tight_layout()
2951
2954
  if save_plot:
2952
2955
  plt.savefig(save_plot)
2953
- else:
2956
+ elif show:
2954
2957
  plt.show()
2955
2958
  return plt
@@ -36,6 +36,7 @@ class BaseSimulationSetup(object):
36
36
  EDB object.
37
37
  """
38
38
 
39
+ @pyedb_function_handler
39
40
  def __init__(self, pedb, edb_setup=None):
40
41
  self._pedb = pedb
41
42
  self._edb_object = edb_setup
@@ -56,9 +57,16 @@ class BaseSimulationSetup(object):
56
57
  "kDDRwizard": None,
57
58
  "kQ3D": None,
58
59
  "kNumSetupTypes": None,
59
- "kRaptorX": self._pedb.simsetupdata.RaptorX.RaptorXSimulationSettings,
60
- "kHFSSPI": self._pedb.simsetupdata.HFSSPISimulationSettings,
61
60
  }
61
+
62
+ version = self._pedb.edbversion.split(".")
63
+ if float(self._pedb.edbversion) >= 2024.2:
64
+ self._setup_type_mapping.update(
65
+ {
66
+ "kRaptorX": self._pedb.simsetupdata.RaptorX.RaptorXSimulationSettings,
67
+ "kHFSSPI": self._pedb.simsetupdata.HFSSPISimulationSettings,
68
+ }
69
+ )
62
70
  if self._edb_object:
63
71
  self._name = self._edb_object.GetName()
64
72
 
@@ -103,10 +111,10 @@ class BaseSimulationSetup(object):
103
111
  "kQ3D": None,
104
112
  "kNumSetupTypes": None,
105
113
  }
106
- if self._pedb.edbversion:
107
- version = self._pedb.edbversion.split(".")
108
- if int(version[0]) == 2024 and int(version[1]) == 2 or int(version[0]) > 2024:
109
- setup_type_mapping["kRaptorX"] = utility.RaptorXSimulationSetup
114
+
115
+ version = self._pedb.edbversion.split(".")
116
+ if int(version[0]) == 2024 and int(version[1]) == 2 or int(version[0]) > 2024:
117
+ setup_type_mapping["kRaptorX"] = utility.RaptorXSimulationSetup
110
118
  setup_utility = setup_type_mapping[self._setup_type]
111
119
  return setup_utility(edb_setup_info)
112
120
 
pyedb/generic/plot.py CHANGED
@@ -41,7 +41,7 @@ def plot_matplotlib(
41
41
  xlabel="",
42
42
  ylabel="",
43
43
  title="",
44
- snapshot_path=None,
44
+ save_plot=None,
45
45
  x_limits=None,
46
46
  y_limits=None,
47
47
  axis_equal=False,
@@ -67,8 +67,9 @@ def plot_matplotlib(
67
67
  Plot Y label. Default is `""`.
68
68
  title : str, optional
69
69
  Plot Title label. Default is `""`.
70
- snapshot_path : str, optional
71
- Full path to image file if a snapshot is needed. Default is `None`.
70
+ save_plot : str, optional
71
+ If a path is specified the plot will be saved in this location.
72
+ If ``save_plot`` is provided, the ``show`` parameter is ignored.
72
73
  x_limits : list, optional
73
74
  List of x limits (left and right). Default is `None`.
74
75
  y_limits : list, optional
@@ -141,8 +142,8 @@ def plot_matplotlib(
141
142
  for annotation in annotations:
142
143
  plt.text(annotation[0], annotation[1], annotation[2], **annotation[3])
143
144
 
144
- if snapshot_path:
145
- plt.savefig(snapshot_path)
145
+ if save_plot:
146
+ plt.savefig(save_plot)
146
147
  elif show:
147
148
  plt.show()
148
149
  return plt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyedb
3
- Version: 0.11.0
3
+ Version: 0.12.0
4
4
  Summary: Higher-Level Pythonic Ansys Electronics Data Base
5
5
  Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
6
6
  Maintainer-email: PyEDB developers <simon.vandenbrouck@ansys.com>
@@ -26,7 +26,7 @@ Requires-Dist: ansys-sphinx-theme>=0.10.0,<0.17 ; extra == "doc"
26
26
  Requires-Dist: imageio>=2.30.0,<2.35 ; extra == "doc"
27
27
  Requires-Dist: ipython>=8.13.0,<8.25 ; extra == "doc"
28
28
  Requires-Dist: jupyterlab>=4.0.0,<4.3 ; extra == "doc"
29
- Requires-Dist: matplotlib>=3.5.0,<3.9 ; extra == "doc"
29
+ Requires-Dist: matplotlib>=3.5.0,<3.10 ; extra == "doc"
30
30
  Requires-Dist: nbsphinx>=0.9.0,<0.10 ; extra == "doc"
31
31
  Requires-Dist: numpydoc>=1.5.0,<1.8 ; extra == "doc"
32
32
  Requires-Dist: pypandoc>=1.10.0,<1.14 ; extra == "doc"
@@ -36,11 +36,11 @@ Requires-Dist: sphinx-autobuild==2024.2.4 ; extra == "doc" and ( python_version
36
36
  Requires-Dist: sphinx-autobuild==2024.2.4 ; extra == "doc" and ( python_version > '3.8')
37
37
  Requires-Dist: sphinx-copybutton>=0.5.0,<0.6 ; extra == "doc"
38
38
  Requires-Dist: sphinx-gallery>=0.14.0,<0.17 ; extra == "doc"
39
- Requires-Dist: sphinx_design>=0.4.0,<0.6 ; extra == "doc"
40
- Requires-Dist: matplotlib>=3.5.0,<3.9 ; extra == "full"
39
+ Requires-Dist: sphinx_design>=0.4.0,<0.7 ; extra == "doc"
40
+ Requires-Dist: matplotlib>=3.5.0,<3.10 ; extra == "full"
41
41
  Requires-Dist: numpy>=1.20.0,<2 ; extra == "full"
42
42
  Requires-Dist: pandas>=1.1.0,<2.3 ; extra == "full"
43
- Requires-Dist: matplotlib>=3.5.0,<3.9 ; extra == "tests"
43
+ Requires-Dist: matplotlib>=3.5.0,<3.10 ; extra == "tests"
44
44
  Requires-Dist: numpy>=1.20.0,<2 ; extra == "tests"
45
45
  Requires-Dist: mock>=5.1.0,<5.2 ; extra == "tests"
46
46
  Requires-Dist: pandas>=1.1.0,<2.3 ; extra == "tests"
@@ -1,38 +1,38 @@
1
- pyedb/__init__.py,sha256=NhAIRF_lZXlTqwz5Jf4M6DaAX9zgypEfu8sejMIXRpI,1521
1
+ pyedb/__init__.py,sha256=NdSqRuOcb6BkvaUJJ65vhYSlT5l50M9SK2aD7jz-veA,1521
2
2
  pyedb/edb_logger.py,sha256=yNkXnoL2me7ubLT6O6r6ElVnkZ1g8fmfFYC_2XJZ1Sw,14950
3
3
  pyedb/exceptions.py,sha256=n94xluzUks6BA24vd_L6HkrvoP_H_l6__hQmqzdCyPo,111
4
4
  pyedb/siwave.py,sha256=c2stPkGPdM9c0wJ19SJq_uiYTdW3sp-uO8MVA_iDw30,12548
5
5
  pyedb/configuration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- pyedb/configuration/cfg_boundaries.py,sha256=ABjSlQCRMJNw1YX2B4aADNlLrrFbdyv7UWewiXVdxTk,6105
6
+ pyedb/configuration/cfg_boundaries.py,sha256=iThJw52omnGikp20uNVgW4w0VcrzF68dXUaMb2MfOt4,6646
7
7
  pyedb/configuration/cfg_components.py,sha256=cvQfMjh6HBTVzVuDI7A8zkEhtgraG25dJqHRH-FbkTA,8789
8
8
  pyedb/configuration/cfg_data.py,sha256=ZThr2rpCj4axwrBr-aQWtiTztEhRAZb1pX-S3_92aJQ,3483
9
9
  pyedb/configuration/cfg_general.py,sha256=dB5Tpird4uiyrseOe8-QlWKsat15TjMLar5I8VZME3c,1625
10
10
  pyedb/configuration/cfg_nets.py,sha256=mJvN_ON4Qw5psNV3agXCQAhVJbRnBpRZu1Ti3b7QnMw,1879
11
- pyedb/configuration/cfg_padstacks.py,sha256=dcZku_OuZ2XaL5Vs8BEJvdcdi1N8F0EMAYNwBSdkbt0,5412
11
+ pyedb/configuration/cfg_padstacks.py,sha256=5ta0xkdSaf4qk5lXjM-U4GB2vNS31nhEGsZwwRlhPUI,5568
12
12
  pyedb/configuration/cfg_pin_groups.py,sha256=BAv-u1e8aPXSTBwUBzDkzRiXB2mfCqb60I5tTrwgI7Y,2877
13
- pyedb/configuration/cfg_ports_sources.py,sha256=iY5GH_ff50bt3muz2w_k9_3VTj_Yigk8Iqfh37a7vRU,6816
13
+ pyedb/configuration/cfg_ports_sources.py,sha256=kicbrgw1YLB2m7xJhrjo9LcfcbwTncGguuzEjZ2pUcQ,7787
14
14
  pyedb/configuration/cfg_s_parameter_models.py,sha256=HPo4sgF5tVefUwgzlP8pDBVSZ1x_pY2EiOtA0-QXjc8,2854
15
15
  pyedb/configuration/cfg_setup.py,sha256=zhq285s5P4s90Dm5s550ldwyIVO8aXiPjAwy87ipRXU,8791
16
16
  pyedb/configuration/cfg_spice_models.py,sha256=5gr28-4u4uj4qY8vgYFAI_PgzOQp-wPgTMMc_WcAN_w,2434
17
17
  pyedb/configuration/configuration.py,sha256=ykDlI3v8w8x-qWuV8PrwIAHVe9jmBwCb8OeJLfBF4lk,10965
18
18
  pyedb/dotnet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  pyedb/dotnet/clr_module.py,sha256=Mo13Of3DVSA5HR-5xZEXOiHApIKy52CUxtJ2gPkEu1A,3406
20
- pyedb/dotnet/edb.py,sha256=qkhZgSiJoC48cOZhjDIgsPpig-i6T6_QN_mNVNTBpqE,172843
20
+ pyedb/dotnet/edb.py,sha256=GmGixrH9_i98d_NJEWUMpd5BeGGbjyqTL1zve0Mlqfw,172892
21
21
  pyedb/dotnet/application/Variables.py,sha256=nov1kIyJO25iz8pvbU3MK1meMpRLwtISmzYqJhc7Ouo,79042
22
22
  pyedb/dotnet/application/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  pyedb/dotnet/edb_core/__init__.py,sha256=nIRLJ8VZLcMAp12zmGsnZ5x2BEEl7q_Kj_KAOXxVjpQ,52
24
24
  pyedb/dotnet/edb_core/components.py,sha256=hJCb-DJtv-9Zhmb-q9ZEgD4Ziu0_6lPQtHoCrswgTCg,105075
25
25
  pyedb/dotnet/edb_core/general.py,sha256=QP6lqNEcqCdj_hSKhfKbmJ2hGBOYkhjPtsVEmyrO8KU,4726
26
26
  pyedb/dotnet/edb_core/hfss.py,sha256=pKq46cZ08nKHc1s__hkco-tA3AiBi4vV0T7w6RyQrEI,69696
27
- pyedb/dotnet/edb_core/layout.py,sha256=IlEkPI95AmRs5RA2X2VhDYVCyXMp36cg_1_mOUm1imE,51162
27
+ pyedb/dotnet/edb_core/layout.py,sha256=rtfjWsa3YNBW9mxzKuRmvO5Ccy5d5byBt3OPa6bHlPI,51156
28
28
  pyedb/dotnet/edb_core/layout_validation.py,sha256=7Wj_VSAJOSA-RKOPgJXO-y9i6vfgJ4V9vxx0M1g1NUI,11798
29
29
  pyedb/dotnet/edb_core/materials.py,sha256=xgXImJ0gcOqCL3p0uQ1hdey_hBK4rkTIhj4MERDbS7E,43987
30
30
  pyedb/dotnet/edb_core/net_class.py,sha256=lr-7Z0Q1A2fshxwjrIOmQSZnEBYe0NoxuUuJT6vYdyA,11857
31
- pyedb/dotnet/edb_core/nets.py,sha256=EK-jjRFvRX_NtqMQ46ebJbv9HOvP1uYK_EZ3jPnmxB0,43882
31
+ pyedb/dotnet/edb_core/nets.py,sha256=ZQ5sk7cgTQJTbHd7JQa7MmBBV_crsWGtcLhKpSbfYMw,44042
32
32
  pyedb/dotnet/edb_core/obj_base.py,sha256=lufR0sZj0QfZ2wlNvLL6aM1KVqCNY2A7taPPdWcK20w,3312
33
33
  pyedb/dotnet/edb_core/padstack.py,sha256=PqXkSfyLRtdehm72sYiVMBUkNlDkivJ-eRoQWCzwNgw,57439
34
- pyedb/dotnet/edb_core/siwave.py,sha256=481ePzP0il60Bu_FqL2NcdcFTWNIBXd8OKnSigPefw8,62419
35
- pyedb/dotnet/edb_core/stackup.py,sha256=tKskWrYlYAcZl8g2JbgXxQhtTRrVAkwYlQvWpATaImw,122758
34
+ pyedb/dotnet/edb_core/siwave.py,sha256=4v68zlCO-Czv8A3qtckfQ94jRFbMxM4kuoEDVRo_cmM,62495
35
+ pyedb/dotnet/edb_core/stackup.py,sha256=rg2LnxUyfd9Nnrj9uAd-0dkr65TQk7iMe0lS6cglaFc,122900
36
36
  pyedb/dotnet/edb_core/cell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  pyedb/dotnet/edb_core/cell/hierarchy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  pyedb/dotnet/edb_core/cell/hierarchy/model.py,sha256=cJzNJLiuuoesfCL8-jWo8LbgGbfXrTYNQqmeeE38ieM,3309
@@ -54,10 +54,10 @@ pyedb/dotnet/edb_core/edb_data/design_options.py,sha256=RO9ip-T5Bfxpsl97_QEk0qDZ
54
54
  pyedb/dotnet/edb_core/edb_data/edbvalue.py,sha256=Vj_11HXsQUNavizKp5FicORm6cjhXRh9uvxhv_D_RJc,1977
55
55
  pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py,sha256=5koQSKdYC6Deh4haLUDAxnHlRa-j5S6g4eyAfiGgZP8,13190
56
56
  pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py,sha256=v3z3h_27v3jRmDXqUjBS8P6UZMi-zuZQrZiYbE-RDw4,15657
57
- pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py,sha256=rXzh95N_jLf6a3OEEJRm50qFX0rM6lS5B5osnKlVzf4,49037
57
+ pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py,sha256=naka5Bm9Ditb6Cj_F1KMrxwGk8Cn2fPtnXlyGb9IY9E,49039
58
58
  pyedb/dotnet/edb_core/edb_data/layer_data.py,sha256=HVPmE_Rny29J1c8qlJ3TSNZaMOTSxTgE9_vIiQJG0cE,25900
59
- pyedb/dotnet/edb_core/edb_data/nets_data.py,sha256=iULEOUsn3sfLT5FVY_4lMWTm0KzC-01AZ-aYIkM0U-k,9933
60
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py,sha256=5qq4QohTLkwo-xfk2lXFM8Pria8ZYfZRc5B3XgdboGE,79342
59
+ pyedb/dotnet/edb_core/edb_data/nets_data.py,sha256=iBegT3fa5DwvjD0Wfd-wlJztFrb33I5v6nzSUhNS6-I,10099
60
+ pyedb/dotnet/edb_core/edb_data/padstacks_data.py,sha256=IiF_wS9ZnyW-8W3wbcvinPAaL0LVuPGU74tHFZgZ1ZQ,79729
61
61
  pyedb/dotnet/edb_core/edb_data/ports.py,sha256=FYxB2rDUtN_OsYAbodXbc5mA_d0BUebmin_B5kkUw3U,9223
62
62
  pyedb/dotnet/edb_core/edb_data/primitives_data.py,sha256=veMDPCb6T84KZ_xgo52g7vHxObsx-Y2ysWXBS2CqZpQ,48155
63
63
  pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py,sha256=Km1sjDVA0vSBOn8u2mMASPEGULQb3h-ZeSK-0Kymzqk,20962
@@ -75,14 +75,14 @@ pyedb/dotnet/edb_core/sim_setup_data/data/__init__.py,sha256=8jByHkoaowAYQTCww-z
75
75
  pyedb/dotnet/edb_core/sim_setup_data/data/siw_dc_ir_settings.py,sha256=b7Zpg6nNQArYxvdxlVhXDzvvCSC5sKFvdt10b0MHkvc,8605
76
76
  pyedb/dotnet/edb_core/utilities/__init__.py,sha256=8jByHkoaowAYQTCww-zRrTQmN061fLz_OHjTLSrzQQY,58
77
77
  pyedb/dotnet/edb_core/utilities/heatsink.py,sha256=7G7Yx9TxbL5EAiR51MnhdRiAQBVf-d0hKsXDw5OYX2Q,2220
78
- pyedb/dotnet/edb_core/utilities/simulation_setup.py,sha256=e7ejpnYlV86t7364k1LI9sBXGf1_V3VdFh57g_n3nXs,25059
78
+ pyedb/dotnet/edb_core/utilities/simulation_setup.py,sha256=ZU-HFdIqJ0DBQJqUHzU4-nzCHQ620h2ev7uR89ZFnqk,25256
79
79
  pyedb/generic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
80
  pyedb/generic/constants.py,sha256=prWLZH0-SeBIVK6LHZ4SGZFQCofuym2TuQYfdqwhuSQ,28956
81
81
  pyedb/generic/data_handlers.py,sha256=oyYFwdjt0CxdOxgFDmnBlOFICt2twFLsMyELuQ1kFjE,7137
82
82
  pyedb/generic/design_types.py,sha256=qHyIaz-Vd3ra4CP9xER76-nGRonYmSAiI3Dr8YPUeH8,4354
83
83
  pyedb/generic/filesystem.py,sha256=SwvXv1T05SrC9TPtK88joQoU5Ab7hYjrp5NncFeH7kM,3941
84
84
  pyedb/generic/general_methods.py,sha256=ifabLBxrYmah2XOMyKrx-G53DJlfPY9hgAW8NT4e73U,43608
85
- pyedb/generic/plot.py,sha256=1P9jxzpZDKy7FobBkqezcU8c-Xq5trxS6iBNNLXpFJ0,4901
85
+ pyedb/generic/plot.py,sha256=eiCX82gyQhFAwbZgs3biR7BvGKgLA0yGHrk7kt0_7r0,4954
86
86
  pyedb/generic/process.py,sha256=9goCXrW3Su-8WuV5f6YqzY-Pl9EMFEd50KFN5AJXZGc,11206
87
87
  pyedb/generic/settings.py,sha256=QTX5OVZ8sVPIy_QaSxRODUWvoXkYkVpzh3l6pQPseKQ,9220
88
88
  pyedb/ipc2581/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -148,7 +148,7 @@ pyedb/misc/siw_feature_config/emc/tag_library.py,sha256=yUK4w3hequU017E2DbkA4KE2
148
148
  pyedb/misc/siw_feature_config/emc/xml_generic.py,sha256=55X-V0OxWq-v7FTiDVjaZif8V_2xxsvJlJ8bs9Bf61I,2521
149
149
  pyedb/modeler/geometry_operators.py,sha256=LDqEaeerw9H8Yva-SJhX3Afdni08OciO9t5G0c_tdqs,66820
150
150
  pyedb/siwave_core/icepak.py,sha256=WnZ-t8mik7LDY06V8hZFV-TxRZJQWK7bu_8Ichx-oBs,5206
151
- pyedb-0.11.0.dist-info/LICENSE,sha256=qQWivZ12ETN5l3QxvTARY-QI5eoRRlyHdwLlAj0Bg5I,1089
152
- pyedb-0.11.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
153
- pyedb-0.11.0.dist-info/METADATA,sha256=ozTeKxuYAll12aJP3W7Jfk7Fss71EqWBzSqfxlRWL8s,8351
154
- pyedb-0.11.0.dist-info/RECORD,,
151
+ pyedb-0.12.0.dist-info/LICENSE,sha256=qQWivZ12ETN5l3QxvTARY-QI5eoRRlyHdwLlAj0Bg5I,1089
152
+ pyedb-0.12.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
153
+ pyedb-0.12.0.dist-info/METADATA,sha256=nkaA2TVEuG-IKFuseaCrohmgXT6V21jmp3ZsaCao8RE,8354
154
+ pyedb-0.12.0.dist-info/RECORD,,
File without changes