pyedb 0.13.0__py3-none-any.whl → 0.14.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.

Files changed (75) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_common.py +0 -5
  3. pyedb/configuration/cfg_components.py +0 -2
  4. pyedb/configuration/cfg_operations.py +0 -2
  5. pyedb/configuration/cfg_package_definition.py +0 -2
  6. pyedb/configuration/cfg_ports_sources.py +14 -11
  7. pyedb/configuration/cfg_stackup.py +0 -7
  8. pyedb/configuration/configuration.py +0 -6
  9. pyedb/dotnet/application/Variables.py +4 -40
  10. pyedb/dotnet/edb.py +27 -82
  11. pyedb/dotnet/edb_core/{edb_data/components_data.py → cell/hierarchy/component.py} +13 -133
  12. pyedb/dotnet/edb_core/cell/hierarchy/model.py +0 -3
  13. pyedb/dotnet/edb_core/cell/hierarchy/netlist_model.py +30 -0
  14. pyedb/dotnet/edb_core/cell/hierarchy/pin_pair_model.py +105 -0
  15. pyedb/dotnet/edb_core/cell/hierarchy/s_parameter_model.py +34 -0
  16. pyedb/dotnet/edb_core/cell/hierarchy/spice_model.py +34 -0
  17. pyedb/dotnet/edb_core/cell/layout.py +137 -0
  18. pyedb/dotnet/edb_core/cell/layout_obj.py +2 -4
  19. pyedb/dotnet/edb_core/cell/primitive.py +199 -1
  20. pyedb/dotnet/edb_core/cell/terminal/bundle_terminal.py +52 -0
  21. pyedb/dotnet/edb_core/cell/terminal/edge_terminal.py +50 -0
  22. pyedb/dotnet/edb_core/cell/terminal/padstack_instance_terminal.py +88 -0
  23. pyedb/dotnet/edb_core/cell/terminal/pingroup_terminal.py +59 -0
  24. pyedb/dotnet/edb_core/cell/terminal/point_terminal.py +73 -0
  25. pyedb/dotnet/edb_core/{edb_data/terminals.py → cell/terminal/terminal.py} +33 -242
  26. pyedb/dotnet/edb_core/components.py +10 -56
  27. pyedb/dotnet/edb_core/definition/component_def.py +1 -8
  28. pyedb/dotnet/edb_core/definition/component_model.py +0 -2
  29. pyedb/dotnet/edb_core/definition/definitions.py +0 -2
  30. pyedb/dotnet/edb_core/definition/package_def.py +7 -5
  31. pyedb/dotnet/edb_core/edb_data/control_file.py +0 -3
  32. pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +0 -5
  33. pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +4 -9
  34. pyedb/dotnet/edb_core/edb_data/layer_data.py +0 -7
  35. pyedb/dotnet/edb_core/edb_data/nets_data.py +2 -5
  36. pyedb/dotnet/edb_core/edb_data/padstacks_data.py +11 -29
  37. pyedb/dotnet/edb_core/edb_data/ports.py +4 -4
  38. pyedb/dotnet/edb_core/edb_data/primitives_data.py +3 -26
  39. pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +13 -20
  40. pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +3 -11
  41. pyedb/dotnet/edb_core/edb_data/sources.py +12 -17
  42. pyedb/dotnet/edb_core/general.py +1 -6
  43. pyedb/dotnet/edb_core/geometry/polygon_data.py +0 -3
  44. pyedb/dotnet/edb_core/hfss.py +1 -33
  45. pyedb/dotnet/edb_core/layout.py +0 -35
  46. pyedb/dotnet/edb_core/layout_validation.py +1 -3
  47. pyedb/dotnet/edb_core/materials.py +1 -22
  48. pyedb/dotnet/edb_core/net_class.py +0 -8
  49. pyedb/dotnet/edb_core/nets.py +4 -29
  50. pyedb/dotnet/edb_core/padstack.py +76 -30
  51. pyedb/dotnet/edb_core/sim_setup_data/data/adaptive_frequency_data.py +72 -0
  52. pyedb/dotnet/edb_core/sim_setup_data/data/mesh_operation.py +287 -0
  53. pyedb/dotnet/edb_core/{edb_data/hfss_simulation_setup_data.py → sim_setup_data/data/settings.py} +174 -878
  54. pyedb/dotnet/edb_core/sim_setup_data/data/sweep_data.py +509 -0
  55. pyedb/dotnet/edb_core/sim_setup_data/io/__init__.py +0 -0
  56. pyedb/dotnet/edb_core/{edb_data/siwave_simulation_setup_data.py → sim_setup_data/io/siwave.py} +0 -341
  57. pyedb/dotnet/edb_core/siwave.py +5 -33
  58. pyedb/dotnet/edb_core/stackup.py +4 -51
  59. pyedb/dotnet/edb_core/utilities/simulation_setup.py +612 -366
  60. pyedb/generic/data_handlers.py +1 -9
  61. pyedb/generic/general_methods.py +3 -53
  62. pyedb/generic/plot.py +1 -2
  63. pyedb/ipc2581/ecad/cad_data/layer_feature.py +1 -7
  64. pyedb/ipc2581/ecad/cad_data/package.py +1 -4
  65. pyedb/ipc2581/ecad/cad_data/path.py +1 -3
  66. pyedb/ipc2581/ecad/cad_data/polygon.py +1 -6
  67. pyedb/ipc2581/ecad/cad_data/step.py +1 -10
  68. pyedb/ipc2581/ipc2581.py +8 -15
  69. pyedb/modeler/geometry_operators.py +164 -67
  70. pyedb/siwave.py +1 -16
  71. {pyedb-0.13.0.dist-info → pyedb-0.14.0.dist-info}/METADATA +2 -2
  72. {pyedb-0.13.0.dist-info → pyedb-0.14.0.dist-info}/RECORD +75 -61
  73. /pyedb/dotnet/edb_core/cell/{__init__.py → terminal/__init__.py} +0 -0
  74. {pyedb-0.13.0.dist-info → pyedb-0.14.0.dist-info}/LICENSE +0 -0
  75. {pyedb-0.13.0.dist-info → pyedb-0.14.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,509 @@
1
+ # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+
23
+
24
+ class SweepData(object):
25
+ """Manages EDB methods for a frequency sweep.
26
+
27
+ Parameters
28
+ ----------
29
+ sim_setup : :class:`pyedb.dotnet.edb_core.edb_data.siwave_simulation_setup_data.SiwaveSYZSimulationSetup`
30
+ name : str, optional
31
+ Name of the frequency sweep.
32
+ edb_sweep_data : :class:`Ansys.Ansoft.Edb.Utility.SIWDCIRSimulationSettings`, optional
33
+ EDB object. The default is ``None``.
34
+ """
35
+
36
+ def __init__(self, sim_setup, frequency_sweep=None, name=None, edb_sweep_data=None):
37
+ self._sim_setup = sim_setup
38
+
39
+ if edb_sweep_data:
40
+ self._edb_sweep_data = edb_sweep_data
41
+ self._name = self._edb_sweep_data.Name
42
+ else:
43
+ if not name:
44
+ self._name = generate_unique_name("sweep")
45
+ else:
46
+ self._name = name
47
+ self._edb_sweep_data = self._pedb.simsetupdata.SweepData(self._name)
48
+ self.set_frequencies(frequency_sweep)
49
+
50
+ @property
51
+ def _edb_object(self):
52
+ return self._edb_sweep_data
53
+
54
+ @property
55
+ def _pedb(self):
56
+ """EDB."""
57
+ return self._sim_setup._pedb
58
+
59
+ def _update_sweep(self):
60
+ """Update the sweep."""
61
+ self._sim_setup.delete_frequency_sweep(self)
62
+ self._sim_setup._add_frequency_sweep(self)
63
+ return
64
+
65
+ @property
66
+ def name(self):
67
+ """Name of the sweep."""
68
+ return self._edb_sweep_data.Name
69
+
70
+ @name.setter
71
+ def name(self, value):
72
+ self._edb_sweep_data.Name = value
73
+ self._update_sweep()
74
+
75
+ @property
76
+ def sweep_type(self):
77
+ """Sweep type."""
78
+ return
79
+
80
+ @property
81
+ def frequencies(self):
82
+ """List of frequency points."""
83
+ return list(self._edb_sweep_data.Frequencies)
84
+
85
+ @property
86
+ def adaptive_sampling(self):
87
+ """Flag indicating if adaptive sampling is turned on.
88
+
89
+ Returns
90
+ -------
91
+ bool
92
+ ``True`` if adaptive sampling is used, ``False`` otherwise.
93
+ """
94
+ return self._edb_sweep_data.AdaptiveSampling
95
+
96
+ @property
97
+ def adv_dc_extrapolation(self):
98
+ """Flag indicating if advanced DC extrapolation is turned on.
99
+
100
+ Returns
101
+ -------
102
+ bool
103
+ ``True`` if advanced DC Extrapolation is used, ``False`` otherwise.
104
+ """
105
+ return self._edb_sweep_data.AdvDCExtrapolation
106
+
107
+ @property
108
+ def compute_dc_point(self):
109
+ """Flag indicating if computing the exact DC point is turned on."""
110
+ return self._edb_sweep_data.ComputeDCPoint
111
+
112
+ @compute_dc_point.setter
113
+ def compute_dc_point(self, value):
114
+ self._edb_sweep_data.ComputeDCPoint = value
115
+ self._update_sweep()
116
+
117
+ @property
118
+ def auto_s_mat_only_solve(self):
119
+ """Flag indicating if Auto SMatrix only solve is turned on."""
120
+ return self._edb_sweep_data.AutoSMatOnlySolve
121
+
122
+ @property
123
+ def enforce_causality(self):
124
+ """Flag indicating if causality is enforced.
125
+
126
+ Returns
127
+ -------
128
+ bool
129
+ ``True`` if enforce causality is used, ``False`` otherwise.
130
+ """
131
+ return self._edb_sweep_data.EnforceCausality
132
+
133
+ @property
134
+ def enforce_dc_and_causality(self):
135
+ """Flag indicating if DC point and causality are enforced.
136
+
137
+ Returns
138
+ -------
139
+ bool
140
+ ``True`` if enforce dc point and causality is used, ``False`` otherwise.
141
+ """
142
+ return self._edb_sweep_data.EnforceDCAndCausality
143
+
144
+ @property
145
+ def enforce_passivity(self):
146
+ """Flag indicating if passivity is enforced.
147
+
148
+ Returns
149
+ -------
150
+ bool
151
+ ``True`` if enforce passivity is used, ``False`` otherwise.
152
+ """
153
+ return self._edb_sweep_data.EnforcePassivity
154
+
155
+ @property
156
+ def freq_sweep_type(self):
157
+ """Sweep type.
158
+
159
+ Options are:
160
+ - ``"kInterpolatingSweep"``
161
+ - ``"kDiscreteSweep"``
162
+ - ``"kBroadbandFastSweep"``
163
+
164
+ Returns
165
+ -------
166
+ str
167
+ Sweep type.
168
+ """
169
+ return self._edb_sweep_data.FreqSweepType.ToString()
170
+
171
+ @property
172
+ def interpolation_use_full_basis(self):
173
+ """Flag indicating if full-basis elements is used.
174
+
175
+ Returns
176
+ -------
177
+ bool
178
+ ``True`` if full basis interpolation is used, ``False`` otherwise.
179
+ """
180
+ return self._edb_sweep_data.InterpUseFullBasis
181
+
182
+ @property
183
+ def interpolation_use_port_impedance(self):
184
+ """Flag indicating if port impedance interpolation is turned on.
185
+
186
+ Returns
187
+ -------
188
+ bool
189
+ ``True`` if port impedance is used, ``False`` otherwise.
190
+ """
191
+ return self._edb_sweep_data.InterpUsePortImpedance
192
+
193
+ @property
194
+ def interpolation_use_prop_const(self):
195
+ """Flag indicating if propagation constants are used.
196
+
197
+ Returns
198
+ -------
199
+ bool
200
+ ``True`` if propagation constants are used, ``False`` otherwise.
201
+ """
202
+ return self._edb_sweep_data.InterpUsePropConst
203
+
204
+ @property
205
+ def interpolation_use_s_matrix(self):
206
+ """Flag indicating if the S matrix is used.
207
+
208
+ Returns
209
+ -------
210
+ bool
211
+ ``True`` if S matrix are used, ``False`` otherwise.
212
+ """
213
+ return self._edb_sweep_data.InterpUseSMatrix
214
+
215
+ @property
216
+ def max_solutions(self):
217
+ """Number of maximum solutions.
218
+
219
+ Returns
220
+ -------
221
+ int
222
+ """
223
+ return self._edb_sweep_data.MaxSolutions
224
+
225
+ @property
226
+ def min_freq_s_mat_only_solve(self):
227
+ """Minimum frequency SMatrix only solve.
228
+
229
+ Returns
230
+ -------
231
+ str
232
+ Frequency with units.
233
+ """
234
+ return self._edb_sweep_data.MinFreqSMatOnlySolve
235
+
236
+ @property
237
+ def min_solved_freq(self):
238
+ """Minimum solved frequency with units.
239
+
240
+ Returns
241
+ -------
242
+ str
243
+ Frequency with units.
244
+ """
245
+ return self._edb_sweep_data.MinSolvedFreq
246
+
247
+ @property
248
+ def passivity_tolerance(self):
249
+ """Tolerance for passivity enforcement.
250
+
251
+ Returns
252
+ -------
253
+ float
254
+ """
255
+ return self._edb_sweep_data.PassivityTolerance
256
+
257
+ @property
258
+ def relative_s_error(self):
259
+ """S-parameter error tolerance.
260
+
261
+ Returns
262
+ -------
263
+ float
264
+ """
265
+ return self._edb_sweep_data.RelativeSError
266
+
267
+ @property
268
+ def save_fields(self):
269
+ """Flag indicating if the extraction of surface current data is turned on.
270
+
271
+ Returns
272
+ -------
273
+ bool
274
+ ``True`` if save fields is enabled, ``False`` otherwise.
275
+ """
276
+ return self._edb_sweep_data.SaveFields
277
+
278
+ @property
279
+ def save_rad_fields_only(self):
280
+ """Flag indicating if the saving of only radiated fields is turned on.
281
+
282
+ Returns
283
+ -------
284
+ bool
285
+ ``True`` if save radiated field only is used, ``False`` otherwise.
286
+ """
287
+ return self._edb_sweep_data.SaveRadFieldsOnly
288
+
289
+ @property
290
+ def use_q3d_for_dc(self):
291
+ """Flag indicating if the Q3D solver is used for DC point extraction.
292
+
293
+ Returns
294
+ -------
295
+ bool
296
+ ``True`` if Q3d for DC point is used, ``False`` otherwise.
297
+ """
298
+ return self._edb_sweep_data.UseQ3DForDC
299
+
300
+ @adaptive_sampling.setter
301
+ def adaptive_sampling(self, value):
302
+ self._edb_sweep_data.AdaptiveSampling = value
303
+ self._update_sweep()
304
+
305
+ @adv_dc_extrapolation.setter
306
+ def adv_dc_extrapolation(self, value):
307
+ self._edb_sweep_data.AdvDCExtrapolation = value
308
+ self._update_sweep()
309
+
310
+ @auto_s_mat_only_solve.setter
311
+ def auto_s_mat_only_solve(self, value):
312
+ self._edb_sweep_data.AutoSMatOnlySolve = value
313
+ self._update_sweep()
314
+
315
+ @enforce_causality.setter
316
+ def enforce_causality(self, value):
317
+ self._edb_sweep_data.EnforceCausality = value
318
+ self._update_sweep()
319
+
320
+ @enforce_dc_and_causality.setter
321
+ def enforce_dc_and_causality(self, value):
322
+ self._edb_sweep_data.EnforceDCAndCausality = value
323
+ self._update_sweep()
324
+
325
+ @enforce_passivity.setter
326
+ def enforce_passivity(self, value):
327
+ self._edb_sweep_data.EnforcePassivity = value
328
+ self._update_sweep()
329
+
330
+ @freq_sweep_type.setter
331
+ def freq_sweep_type(self, value):
332
+ edb_freq_sweep_type = self._edb_sweep_data.TFreqSweepType
333
+ if value in [0, "kInterpolatingSweep"]:
334
+ self._edb_sweep_data.FreqSweepType = edb_freq_sweep_type.kInterpolatingSweep
335
+ elif value in [1, "kDiscreteSweep"]:
336
+ self._edb_sweep_data.FreqSweepType = edb_freq_sweep_type.kDiscreteSweep
337
+ elif value in [2, "kBroadbandFastSweep"]:
338
+ self._edb_sweep_data.FreqSweepType = edb_freq_sweep_type.kBroadbandFastSweep
339
+ elif value in [3, "kNumSweepTypes"]:
340
+ self._edb_sweep_data.FreqSweepType = edb_freq_sweep_type.kNumSweepTypes
341
+ self._edb_sweep_data.FreqSweepType.ToString()
342
+
343
+ @interpolation_use_full_basis.setter
344
+ def interpolation_use_full_basis(self, value):
345
+ self._edb_sweep_data.InterpUseFullBasis = value
346
+ self._update_sweep()
347
+
348
+ @interpolation_use_port_impedance.setter
349
+ def interpolation_use_port_impedance(self, value):
350
+ self._edb_sweep_data.InterpUsePortImpedance = value
351
+ self._update_sweep()
352
+
353
+ @interpolation_use_prop_const.setter
354
+ def interpolation_use_prop_const(self, value):
355
+ self._edb_sweep_data.InterpUsePropConst = value
356
+ self._update_sweep()
357
+
358
+ @interpolation_use_s_matrix.setter
359
+ def interpolation_use_s_matrix(self, value):
360
+ self._edb_sweep_data.InterpUseSMatrix = value
361
+ self._update_sweep()
362
+
363
+ @max_solutions.setter
364
+ def max_solutions(self, value):
365
+ self._edb_sweep_data.MaxSolutions = value
366
+ self._update_sweep()
367
+
368
+ @min_freq_s_mat_only_solve.setter
369
+ def min_freq_s_mat_only_solve(self, value):
370
+ self._edb_sweep_data.MinFreqSMatOnlySolve = value
371
+ self._update_sweep()
372
+
373
+ @min_solved_freq.setter
374
+ def min_solved_freq(self, value):
375
+ self._edb_sweep_data.MinSolvedFreq = value
376
+ self._update_sweep()
377
+
378
+ @passivity_tolerance.setter
379
+ def passivity_tolerance(self, value):
380
+ self._edb_sweep_data.PassivityTolerance = value
381
+ self._update_sweep()
382
+
383
+ @relative_s_error.setter
384
+ def relative_s_error(self, value):
385
+ self._edb_sweep_data.RelativeSError = value
386
+ self._update_sweep()
387
+
388
+ @save_fields.setter
389
+ def save_fields(self, value):
390
+ self._edb_sweep_data.SaveFields = value
391
+ self._update_sweep()
392
+
393
+ @save_rad_fields_only.setter
394
+ def save_rad_fields_only(self, value):
395
+ self._edb_sweep_data.SaveRadFieldsOnly = value
396
+ self._update_sweep()
397
+
398
+ @use_q3d_for_dc.setter
399
+ def use_q3d_for_dc(self, value):
400
+ self._edb_sweep_data.UseQ3DForDC = value
401
+ self._update_sweep()
402
+
403
+ def _set_frequencies(self, freq_sweep_string="Linear Step: 0GHz to 20GHz, step=0.05GHz"):
404
+ self._edb_sweep_data.SetFrequencies(freq_sweep_string)
405
+ self._update_sweep()
406
+
407
+ def set_frequencies_linear_scale(self, start="0.1GHz", stop="20GHz", step="50MHz"):
408
+ """Set a linear scale frequency sweep.
409
+
410
+ Parameters
411
+ ----------
412
+ start : str, float, optional
413
+ Start frequency. The default is ``"0.1GHz"``.
414
+ stop : str, float, optional
415
+ Stop frequency. The default is ``"20GHz"``.
416
+ step : str, float, optional
417
+ Step frequency. The default is ``"50MHz"``.
418
+
419
+ Returns
420
+ -------
421
+ bool
422
+ ``True`` if correctly executed, ``False`` otherwise.
423
+ """
424
+ self._edb_sweep_data.Frequencies = self._edb_sweep_data.SetFrequencies(start, stop, step)
425
+ return self._update_sweep()
426
+
427
+ def set_frequencies_linear_count(self, start="1kHz", stop="0.1GHz", count=10):
428
+ """Set a linear count frequency sweep.
429
+
430
+ Parameters
431
+ ----------
432
+ start : str, float, optional
433
+ Start frequency. The default is ``"1kHz"``.
434
+ stop : str, float, optional
435
+ Stop frequency. The default is ``"0.1GHz"``.
436
+ count : int, optional
437
+ Step frequency. The default is ``10``.
438
+
439
+ Returns
440
+ -------
441
+ bool
442
+ ``True`` if correctly executed, ``False`` otherwise.
443
+ """
444
+ start = self._sim_setup._pedb.arg_to_dim(start, "Hz")
445
+ stop = self._sim_setup._pedb.arg_to_dim(stop, "Hz")
446
+ self._edb_sweep_data.Frequencies = self._edb_sweep_data.SetFrequencies(start, stop, count)
447
+ return self._update_sweep()
448
+
449
+ def set_frequencies_log_scale(self, start="1kHz", stop="0.1GHz", samples=10):
450
+ """Set a log-count frequency sweep.
451
+
452
+ Parameters
453
+ ----------
454
+ start : str, float, optional
455
+ Start frequency. The default is ``"1kHz"``.
456
+ stop : str, float, optional
457
+ Stop frequency. The default is ``"0.1GHz"``.
458
+ samples : int, optional
459
+ Step frequency. The default is ``10``.
460
+
461
+ Returns
462
+ -------
463
+ bool
464
+ ``True`` if correctly executed, ``False`` otherwise.
465
+ """
466
+ start = self._sim_setup._pedb.arg_to_dim(start, "Hz")
467
+ stop = self._sim_setup._pedb.arg_to_dim(stop, "Hz")
468
+ self._edb_sweep_data.Frequencies = self._edb_sweep_data.SetLogFrequencies(start, stop, samples)
469
+ return self._update_sweep()
470
+
471
+ def set_frequencies(self, frequency_list=None, update=True):
472
+ """Set frequency list to the sweep frequencies.
473
+
474
+ Parameters
475
+ ----------
476
+ frequency_list : list, optional
477
+ List of lists with four elements. The default is ``None``. If provided, each list must contain:
478
+ 1 - frequency type (``"linear count"``, ``"log scale"``, or ``"linear scale"``)
479
+ 2 - start frequency
480
+ 3 - stop frequency
481
+ 4 - step frequency or count
482
+ Returns
483
+ -------
484
+ bool
485
+ ``True`` if correctly executed, ``False`` otherwise.
486
+ """
487
+ if not frequency_list:
488
+ frequency_list = [
489
+ ["linear count", "0", "1kHz", 1],
490
+ ["log scale", "1kHz", "0.1GHz", 10],
491
+ ["linear scale", "0.1GHz", "10GHz", "0.1GHz"],
492
+ ]
493
+ temp = []
494
+ if isinstance(frequency_list, list) and not isinstance(frequency_list[0], list):
495
+ frequency_list = [frequency_list]
496
+ for i in frequency_list:
497
+ if i[0] == "linear count":
498
+ temp.extend(list(self._edb_sweep_data.SetFrequencies(i[1], i[2], i[3])))
499
+ elif i[0] == "linear scale":
500
+ temp.extend(list(self._edb_sweep_data.SetFrequencies(i[1], i[2], i[3])))
501
+ elif i[0] == "log scale":
502
+ temp.extend(list(self._edb_sweep_data.SetLogFrequencies(i[1], i[2], i[3])))
503
+ else:
504
+ return False
505
+ self._edb_sweep_data.Frequencies.Clear()
506
+ for i in temp:
507
+ self._edb_sweep_data.Frequencies.Add(i)
508
+ if update:
509
+ return self._update_sweep()
File without changes