Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added "DecadeCount" "OctaveCount" "ExponentialCount" in parametric sw… #3910

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _unittest/test_11_Setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ def test_25a_create_parametrics(self):
assert setup1.add_variation("w2", "0.1mm", 10, 11)
assert setup1.add_variation("w2", start_point="0.2mm", variation_type="SingleValue")
assert setup1.add_variation("w1", start_point="0.3mm", end_point=5, step=0.2, variation_type="LinearStep")
assert setup1.add_variation("w1", start_point="0.3mm", end_point=5, step=1, variation_type="DecadeCount")
assert setup1.add_variation("w1", start_point="0.3mm", end_point=5, step=1, variation_type="OctaveCount")
assert setup1.add_variation("w1", start_point="0.3mm", end_point=5, step=1, variation_type="ExponentialCount")
assert setup1.add_calculation(
calculation="dB(S(1,1))", ranges={"Freq": "3.5GHz"}, solution="My_HFSS_Setup : LastAdaptive"
)
Expand Down
11 changes: 8 additions & 3 deletions pyaedt/modules/DesignXPloration.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,8 @@
unit : str, optional
Variation units. Default is `None`.
variation_type : float or int
Variation Type. Admitted values are `"LinearCount"`, `"LinearStep"`, `"LogScale"`, `"SingleValue"`.
Variation Type. Admitted values are `"SingleValue", `"LinearCount"`, `"LinearStep"`,
`"DecadeCount"`, `"OctaveCount"`, `"ExponentialCount"`.

Returns
-------
Expand All @@ -918,8 +919,12 @@
sweep_range = "LINC {} {} {}".format(start_point, end_point, step)
elif variation_type == "LinearStep":
sweep_range = "LIN {} {} {}".format(start_point, end_point, self._app.value_with_units(step, unit))
elif variation_type == "LogScale":
sweep_range = "DEC {} {} {}".format(start_point, end_point, self._app.value_with_units(step, unit))
elif variation_type == "DecadeCount":
sweep_range = "DEC {} {} {}".format(start_point, end_point, step)
elif variation_type == "OctaveCount":
sweep_range = "OCT {} {} {}".format(start_point, end_point, step)
elif variation_type == "ExponentialCount":
sweep_range = "ESTP {} {} {}".format(start_point, end_point, step)

Check warning on line 927 in pyaedt/modules/DesignXPloration.py

View check run for this annotation

Codecov / codecov/patch

pyaedt/modules/DesignXPloration.py#L922-L927

Added lines #L922 - L927 were not covered by tests
elif variation_type == "SingleValue":
sweep_range = "{}".format(start_point)
if not sweep_range:
Expand Down
Loading