Skip to content

Commit

Permalink
Update package information
Browse files Browse the repository at this point in the history
to align with Pypi standard
  • Loading branch information
nvlinhvn committed May 9, 2024
1 parent a173869 commit 87b0cfd
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 2 deletions.
75 changes: 74 additions & 1 deletion HSTransform.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: HSTransform
Version: 0.1
Version: 0.1.1
Summary: A Package to Compute S-transform with Hyperbolic Window
Author: Linh V Nguyen
Author-email: linhvietnguyen.ee@gmail.com
Expand All @@ -9,3 +9,76 @@ Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Hyperbolic S-Transform

Package for Hyperbolic S-transform

## 1. Introduction

HS Transform is a Python package for performing Hyperbolic S-transforms. The S-transform is a time-frequency representation that combines the best properties of the Short-time Fourier Transform and the Wavelet Transform. It provides simultaneous information on both the frequency content and temporal localization of a signal.

## 2. Dependencies

HS Transform requires the following Python packages:

- numpy
- scipy
- pandas
- matplotlib
- pytest

## 3. How to Install

You can install HS Transform using pip:

```
pip install HSTransform
```

## 4. Run tests

After installation, you can test the package using the included test scripts:
`pytest tests/`

## 5. Example

Here’s an example of how to use HS Transform to analyze a signal with voltage disturbance and power system fault:

```
from hstransform import HyperbolicSTransform as HSTransform

# Create input signal (for example: Voltage signal)
t = np.linspace(0, 10, 100) # timeseries
V_m = 220*np.sqrt(2) # peak voltage
f_V = 50 # frequency
phi_V = 0 # phase

V_clean = V_m * np.sin(2 * np.pi * f_V * t + phi_V)
# Create voltage sag/dip (80% of the nominal voltage for 0.15 second)
V_sag = np.where((t >= 2) & (t <= 3.5), 0.5 * V_clean, V_clean)

# Create an instance of HSTransform

hs = HSTransform()

# Perform the transform
signal = V_sag
S_transformed = st.fit_transform(t, signal)
```

![alt text](./img/power_quality_disturbance.png)
![alt text](./img/power_quality_disturbance_trajectory.png)
![alt text](./img/fault_current.png)
![alt text](./img/fault_trajectory.png)

## 6. Communication

If you have any questions, issues, or suggestions for HS Transform, please open an issue on the GitHub repository.
or contact email: linhvietnguyen.ee@gmail.com

## 7. Citation

If you use HS Transform in your research, please cite it as follows:
Linh V Nguyen (2024). HS Transform (Version 0.1) [Computer software]. GitHub: github.com/nvlinhvn/hstransform
Binary file removed dist/HSTransform-0.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/HSTransform-0.1.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/HSTransform-0.1.1.tar.gz
Binary file not shown.
Binary file removed dist/HSTransform-0.1.tar.gz
Binary file not shown.
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@

from setuptools import setup, find_packages

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setup(
name='HSTransform',
version='0.1',
version='0.1.1',
packages=find_packages(),
license='MIT',
author='Linh V Nguyen',
author_email='linhvietnguyen.ee@gmail.com',
description='A Package to Compute S-transform with Hyperbolic Window',
python_requires='>=3.10',
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=[
'numpy',
'scipy',
Expand Down

0 comments on commit 87b0cfd

Please sign in to comment.