add_subrange

SweepHFSS.add_subrange(rangetype, start, end=None, count=None, unit='GHz', save_single_fields=False)[source]

Add a subrange to the sweep.

Parameters
rangetypestr

Type of the subrange. Options are "LinearCount", "LinearStep", "LogScale" and "SinglePoints".

startfloat

Starting frequency.

endfloat, optional

Stopping frequency. Required for rangetype="LinearCount"|"LinearStep"|"LogScale".

countint or float, optional

Frequency count or frequency step. Required for rangetype="LinearCount"|"LinearStep"|"LogScale".

unitstr, optional

Unit of the frequency. For example, "MHz or "GHz". The default is "GHz".

save_single_fieldsbool, optional

Whether to save the fields of the single point. The default is False. Used only for rangetype="SinglePoints".

Returns
bool

True when successful, False when failed.

Examples

Create a setup in an HFSS design and add multiple sweep ranges.

>>> setup = hfss.create_setup(setupname="MySetup")
>>> sweep = setup.add_sweep()
>>> sweep.change_type("Interpolating")
>>> sweep.change_range("LinearStep", 1.1, 2.1, 0.4, "GHz")
>>> sweep.add_subrange("LinearCount", 1, 1.5, 5, "MHz")
>>> sweep.add_subrange("LogScale", 1, 3, 10, "GHz")