A pythonic remotable interface to RedHawkSC and TotemSC
Project description
A pythonic remotable interface to RedHawkSC and TotemSC that allows integration with other PyAnsys and Python libraries.
How to install
Install from PyPI
User installation can be performed by running:
pip install ansys-seascape
OR
python -m pip install ansys-seascape
Install from latest Github source
Fetch latest source from github:
cd <your-library-directory>
git clone https://github.com/pyansys/pyseascape.git
(Optional) Create and enable virtual environment. Please refer to official venv documentation for more help regarding virtual environment setup.
# Create a virtual environment
python -m venv .venv
# Activate it in a POSIX system
source .venv/bin/activate
# Activate it in Windows CMD environment
.venv\Scripts\activate.bat
# Activate it in Windows Powershell
.venv\Scripts\Activate.ps1
Install the project
cd pyseascape
pip install .
Install additional requirements (if needed):
python -m pip install .[tests]
python -m pip install .[doc]
Usage
Note: Either a local installation or remote connection to licensed RedHawk-SC is required to use the pyseascape library. This only offers a remotable frontend interface that can run directly in native Python on any machine.
Launching local RedHawk-SC in backend
from ansys.seascape import RedHawkSC
gp = RedHawkSC(executable=path_to_executable)
OR
from ansys import seascape
gp = seascape.RedHawkSC(executable=path_to_executable)
Connecting to remote RedHawk-SC session
from ansys.seascape import RedHawkSC
gp = RedHawkSC(url=url_or_ip_to_redhawksc_server:port)
All RedHawk-SC global functions can be called using prefix of RedHawkSC object name. Object methods can be called as normal.
Running RedHawk-SC commands
For example:
# If gp = RedHawkSC(...)
db = gp.open_db(db_name) # Returns a SeascapeDB remotable object
db.create_design_view(...)
# Creating RedHawk-SC objects
inst = gp.Instance('Inst_Name')
# RedHawk-SC modules must also be prefixed by gp
# E.g. using voltage_impact module
gp.voltage_impact.helpers.get_pgimpact_histograms(...)
Accessing RedHawk-SC help
RedHawk-SC native help function supports command based as well as keyword based help. This help can be accessed remotely as well.
# If gp = RedHawkSC(...)
# command based help
gp.help(command='gp.Scatter')
# keyword based help
gp.help(keyword='scatter')
Known issues and limitations
GUI features have not yet been implemented. Hence, commands like open_console_window, open_scheduler_window etc. do not work yet. Commands like gp.scatter_plot also does not work as it requires drawing gui plots
Documentation
Please refer to RedHawk-SC Documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ansys-seascape-0.2.0.tar.gz
.
File metadata
- Download URL: ansys-seascape-0.2.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 957a573fa3eb72d362323f78f469faf7ad0723ba888828bc43772d6fe3ae2d2e |
|
MD5 | 0e84682f7215212eef62415d2e64d26a |
|
BLAKE2b-256 | 984bf67153de1ee4f88bbeee0835eadc4b13925aec754c2bf793636763274644 |
File details
Details for the file ansys_seascape-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: ansys_seascape-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62134a2124d01a9733bcb0676d71de12dd3191db8b6c341c8e91488c7eb878b7 |
|
MD5 | 734cd41a130fcf717fb68842f6dfef5e |
|
BLAKE2b-256 | 17b044d7dabb053d139ba5c00485559e829004b2201d4e342a8498157e05291a |