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

siwave syz setup enhancement #3890

Merged
merged 6 commits into from
Nov 17, 2023
Merged
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
29 changes: 22 additions & 7 deletions pyaedt/edb_core/edb_data/siwave_simulation_setup_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

from pyaedt.edb_core.edb_data.simulation_setup import BaseSimulationSetup
from pyaedt.edb_core.general import convert_netdict_to_pydict
from pyaedt.edb_core.general import convert_pydict_to_netdict
Expand Down Expand Up @@ -1005,11 +1007,13 @@ def set_pi_slider(self, value):
- ``0``: Optimal speed
- ``1``: Balanced
- ``2``: Optimal accuracy

.. deprecated:: 0.7.5
Use :property:`pi_slider_position` property instead.

"""
self.use_si_settings = False
self.use_custom_settings = False
warnings.warn("`set_pi_slider` is deprecated. Use `pi_slider_position` property instead.", DeprecationWarning)
self.pi_slider_position = value
self.advanced_settings.set_pi_slider(value)

@pyaedt_function_handler
def set_si_slider(self, value):
Expand All @@ -1020,11 +1024,14 @@ def set_si_slider(self, value):
- ``0``: Optimal speed
- ``1``: Balanced
- ``2``: Optimal accuracy```

.. deprecated:: 0.7.5
Use :property:`si_slider_position` property instead.

"""
self.use_si_settings = True
self.use_custom_settings = False
warnings.warn("`set_si_slider` is deprecated. Use `si_slider_position` property instead.", DeprecationWarning)

self.si_slider_position = value
self.advanced_settings.set_si_slider(value)

@property
def pi_slider_position(self):
Expand All @@ -1038,9 +1045,13 @@ def pi_slider_position(self, value):
self._edb_object = self._set_edb_setup_info(edb_setup_info)
self._update_setup()

self.use_si_settings = False
self.use_custom_settings = False
self.advanced_settings.set_pi_slider(value)

@property
def si_slider_position(self):
"""SI solider position. Values are from ``1`` to ``3``."""
"""SI slider position. Values are from ``1`` to ``3``."""
return self.get_sim_setup_info.SimulationSettings.SISliderPos

@si_slider_position.setter
Expand All @@ -1050,6 +1061,10 @@ def si_slider_position(self, value):
self._edb_object = self._set_edb_setup_info(edb_setup_info)
self._update_setup()

self.use_si_settings = True
self.use_custom_settings = False
self.advanced_settings.set_si_slider(value)

@property
def use_custom_settings(self):
"""Custom settings to use.
Expand Down
Loading