diff --git a/HSTransform.egg-info/PKG-INFO b/HSTransform.egg-info/PKG-INFO index c24a13a..5b03c9c 100644 --- a/HSTransform.egg-info/PKG-INFO +++ b/HSTransform.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: HSTransform -Version: 0.1.5 +Version: 0.1.6 Summary: A Package to Compute S-transform with Hyperbolic Window Home-page: https://github.com/nvlinhvn/HSTransform Author: Linh V Nguyen @@ -11,10 +11,6 @@ Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3.10 Requires-Python: >=3.10 Description-Content-Type: text/markdown -Requires-Dist: numpy>=1.21.2 -Requires-Dist: scipy>=1.7.1 -Requires-Dist: pandas>=1.3.3 -Requires-Dist: pytest>=6.2.5 # Hyperbolic S-Transform diff --git a/README.md b/README.md index e1f8055..dd0aa2a 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,18 @@ HS Transform requires the following Python packages: ## 3. How to Install -You can install HS Transform using pip: +After that, you can install HS Transform using pip: ``` pip install HSTransform ``` +You can also install all dependencies and package in 1 statement + +``` +pip install numpy scipy pandas matplotlib pytest HSTransform +``` + ## 4. Run tests After installation, you can test the package using the included test scripts: @@ -42,7 +48,17 @@ After installation, you can test the package using the included test scripts: Here’s an example of how to use HS Transform to analyze a signal with voltage disturbance and power system fault: +It's noted sometimes you need to include the installed HSTransform package location into sys + ```python +import sys +import os + +# Add the package directory to sys.path +package_path = os.path.abspath('/usr/local/Caskroom/miniconda/base/envs/YOUR_ENVIRONMENT/lib/python3.10/site-packages/') +if package_path not in sys.path: + sys.path.insert(0, package_path) + from hstransform import HSTransform # Create input signal (for example: Voltage signal) diff --git a/build/lib/hstransform/hstransform.py b/build/lib/hstransform/hstransform.py index 3af6ff6..28d35dd 100644 --- a/build/lib/hstransform/hstransform.py +++ b/build/lib/hstransform/hstransform.py @@ -131,5 +131,3 @@ def fit_transform(self, s[k // fsamplingrate, :] = ifft(h[minf + k + 1:minf + k + n+1] * w_hy) return s - - diff --git a/build/lib/tests/test_hstransform.py b/build/lib/tests/test_hstransform.py index 9707689..4ab4dda 100644 --- a/build/lib/tests/test_hstransform.py +++ b/build/lib/tests/test_hstransform.py @@ -5,7 +5,7 @@ """ import numpy as np import pytest -from HSTransform.hstransform import HSTransform +from hstransform import HSTransform def test_hyperbolic_gaussian(): """ diff --git a/dist/HSTransform-0.1.6-py3-none-any.whl b/dist/HSTransform-0.1.6-py3-none-any.whl new file mode 100644 index 0000000..42801cf Binary files /dev/null and b/dist/HSTransform-0.1.6-py3-none-any.whl differ diff --git a/dist/HSTransform-0.1.6.tar.gz b/dist/HSTransform-0.1.6.tar.gz new file mode 100644 index 0000000..46dc2b3 Binary files /dev/null and b/dist/HSTransform-0.1.6.tar.gz differ diff --git a/setup.py b/setup.py index 1d9833d..60edd5e 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( name='HSTransform', - version='0.1.5', + version='0.1.6', url='https://github.com/nvlinhvn/HSTransform', packages=find_packages(), license='MIT',