Skip to content

Commit

Permalink
siwave syz setup enhancement (#3890)
Browse files Browse the repository at this point in the history
* fix

* Update pyaedt/edb_core/edb_data/siwave_simulation_setup_data.py

Co-authored-by: Maxime Rey <[email protected]>

* Update pyaedt/edb_core/edb_data/siwave_simulation_setup_data.py

Co-authored-by: Maxime Rey <[email protected]>

* Update pyaedt/edb_core/edb_data/siwave_simulation_setup_data.py

Co-authored-by: Maxime Rey <[email protected]>

* Update pyaedt/edb_core/edb_data/siwave_simulation_setup_data.py

Co-authored-by: Maxime Rey <[email protected]>

* Update pyaedt/edb_core/edb_data/siwave_simulation_setup_data.py

Co-authored-by: Maxime Rey <[email protected]>

---------

Co-authored-by: ring630 <@gmail.com>
Co-authored-by: Samuel Lopez <[email protected]>
Co-authored-by: Maxime Rey <[email protected]>
  • Loading branch information
3 people authored Nov 17, 2023
1 parent e44a1cd commit 67d35a8
Showing 1 changed file with 22 additions and 7 deletions.
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

0 comments on commit 67d35a8

Please sign in to comment.