create_frequency_sweep#
- SetupQ3D.create_frequency_sweep(unit=None, freqstart=0, freqstop=20, num_of_freq_points=None, sweepname=None, save_fields=True, sweep_type='Discrete', interpolation_tol=0.5, interpolation_max_solutions=250)[source]#
Create a sweep with the specified number of points.
- Parameters:
- unit
str
,optional
Frequency units. The default is
None
which takes the Default Desktop units.- freqstart
float
,str
,optional
Starting frequency of the sweep. The default is
0
. If a unit is passed with the number, such as``”1MHz”``, the unit is ignored.- freqstop
float
,str
,optional
Stopping frequency of the sweep. The default is
20
. If a unit is passed with the number, such as"1MHz"
, the unit is ignored.- num_of_freq_points
int
Number of frequency points in the range. The default is
401
for a sweep type of"Interpolating"
or"Fast"
. The default is5
for a sweep type of"Discrete"
.- sweepname
str
,optional
Name of the sweep. The default is
None
.- save_fieldsbool,
optional
Whether to save the fields. The default is
True
.- sweep_type
str
,optional
Type of the sweep. Options are
"Fast"
,"Interpolating"
, and"Discrete"
. The default is"Discrete"
.- interpolation_tol
float
,optional
Error tolerance threshold for the interpolation process. The default is
0.5
.- interpolation_max_solutions
int
,optional
Maximum number of solutions evaluated for the interpolation process. The default is
250
.
- unit
- Returns:
pyaedt.modules.SolveSweeps.SweepQ3D
or boolSweep object if successful,
False
otherwise.
References
>>> oModule.InsertFrequencySweep
Examples
>>> from pyaedt import Q3d >>> q3d = Q3d() >>> setup = q3d.create_setup("LinearCountSetup") >>> sweep = setup.create_frequency_sweep(unit="GHz", freqstart=0.5, freqstop=1.5, sweepname="Sweep1") >>> q3d.release_desktop(True, True)