SignalForge 0.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 GiulioCurti
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ include requirements.txt
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: SignalForge
3
+ Version: 0.0.2
4
+ Summary: Tools for analyzing and generating non-Gaussian, non-stationary signals in engineering applications.
5
+ Home-page: https://github.com/GiulioCurti/SignalForge
6
+ Author: Giulio Curti
7
+ Author-email: giulio.curti@dottorandi.unipg.it
8
+ License: MIT license
9
+ License-File: LICENSE
10
+ Requires-Dist: numpy>=2.0
11
+ Requires-Dist: scipy
12
+ Requires-Dist: matplotlib>=3.10
13
+ Requires-Dist: tqdm
14
+ Requires-Dist: PyWavelets
15
+ Requires-Dist: pyNNST
16
+ Requires-Dist: statsmodels
17
+ Dynamic: author
18
+ Dynamic: author-email
19
+ Dynamic: home-page
20
+ Dynamic: license
21
+ Dynamic: license-file
22
+ Dynamic: requires-dist
23
+ Dynamic: summary
@@ -0,0 +1,118 @@
1
+ [![SignalForge Testing](https://github.com/GiulioCurti/SignalForge/actions/workflows/python-app.yml/badge.svg)](https://github.com/GiulioCurti/SignalForge/actions/workflows/python-app.yml)
2
+ [![Documentation Status](https://app.readthedocs.org/projects/signalforge/badge/?version=latest)](https://signalforge.readthedocs.io/en/latest/)
3
+
4
+ SignalForge
5
+ -----------
6
+
7
+ SignalForge is an open-source Python package that provides a comprehensive set of tools for analyzing and generating non-Gaussian, non-stationary signals in engineering applications. While traditional signal processing methods often rely on assumptions of Gaussianity and stationarity, real-world signals—especially those found in mechanical systems—frequently deviate from these idealized models. SignalForge bridges this gap by offering advanced, yet user-friendly tools to simulate, inspect, and manipulate signals with complex statistical properties. Whether you're designing loads for testing, exploring time-varying behavior, or developing new algorithms, SignalForge enables you to work with signals that better reflect real operating conditions. Built with extensibility and clarity in mind, the package is suitable for researchers, practitioners, and students working across mechanical engineering, signal processing, and beyond.
8
+
9
+ See the [documentation](<https://signalforge.readthedocs.io/en/latest/>) for a complete overview of the implemented methods for analisys and signal generation.
10
+
11
+ Installing SignalForge
12
+ ------------------------------------------------------------
13
+ The package is published in PiPy. To install it:
14
+ ```bash
15
+ pip install signalforge
16
+ ```
17
+
18
+ Example code on how to generate a Stationary Gaussian Signal
19
+ ------------------------------------------------------------
20
+
21
+ Stationary Gaussian signals can be easily generated via the specific class StationaryGaussian. Its usage is briefly shown in the following example code:
22
+
23
+ ```python
24
+ from SignalForge import StationaryGaussian
25
+
26
+ fpsd = [10,20] # Frequency vector [Hz]
27
+ psd = [1,1] # Power density vecrtor [(m/s^2)^2/Hz]
28
+ fs = 200 # Sampling frequency [Hz]
29
+ T = 200 # Time duration [s]
30
+ gauss_signal = StationaryGaussian(
31
+ fpsd=fpsd,
32
+ psd=psd,
33
+ fs=fs,
34
+ T = T,
35
+ name = 'Stationary Gaussian',
36
+ unit='$m/s^2$'
37
+ ) # StationaryGaussian class initialization
38
+ print(gauss_signal)
39
+ gauss_signal.plot() # Plotting Timehistory
40
+ gauss_signal.plot_psd() # Plotting Power spectral density
41
+ ```
42
+ Implemented non-linear transformartion methods to add non-gaussianity are the following:
43
+
44
+ - Hermite-Winterstein ('winter')
45
+ - Cubic polynomial ('cubic')
46
+ - Hyperbolic transform – Zheng (‘zheng’)
47
+ - Sarkani ('sarkani')
48
+ - Improved nonlinear transform ('zmnl')
49
+ - Steinwolf ('steinwolf')
50
+ - Smallwoood Poisson shots ('smallwood')
51
+ - Van Baren ('vanbaren')
52
+
53
+ Example code on how to generate a Stationary Non Gaussian Signal
54
+ ------------------------------------------------------------
55
+
56
+ Stationary non Gaussian signals can be easily generated via the specific class StationaryNonGaussian. Its usage is briefly shown in the following example code:
57
+
58
+ ```python
59
+ from SignalForge import StationaryNonGaussian
60
+
61
+ fpsd = [10,20] # Frequency vector [Hz]
62
+ psd = [1,1] # Power density vecrtor [(m/s^2)^2/Hz]
63
+ fs = 200 # Sampling frequency [Hz]
64
+ T = 200 # Time duration [s]
65
+ input_kurtosis = 6
66
+ nongauss_signal = StationaryNonGaussian(
67
+ fpsd = fpsd,
68
+ psd = psd,
69
+ T = T,
70
+ kurtosis=input_kurtosis,
71
+ fs = fs,
72
+ method='zmnl',
73
+ name = 'Stationary NonGaussian',
74
+ unit='$m/s^2$'
75
+ ) # StationaryNonGaussian class initalization
76
+ print(nongauss_signal)
77
+ nongauss_signal.plot() # Plotting Timehistory
78
+ nongauss_signal.plot_psd() # Plotting Power spectral density
79
+ nongauss_signal.plot_fft() # Plotting Fourier Transform
80
+ ```
81
+
82
+ Example code on how to generate a Non Stationary Non Gaussian Signal
83
+ ------------------------------------------------------------
84
+
85
+ Non stationary non Gaussian signals can be easily generated via the specific class NonStationaryGaussian. Its usage is briefly shown in the following example code:
86
+
87
+ ```python
88
+ from SignalForge import NonStationaryNonGaussian
89
+
90
+ fpsd = [10,20] # Frequency vector [Hz]
91
+ psd = [1,1] # Power density vecrtor [(m/s^2)^2/Hz]
92
+ fs = 200 # Sampling frequency [Hz]
93
+ T = 200 # Time duration [s]
94
+ params = {'input_kurtosis': 10}
95
+ nonstat_signal = NonStationaryNonGaussian(
96
+ fpsd = fpsd,
97
+ psd = psd,
98
+ T = T,
99
+ params = params,
100
+ fs = fs,
101
+ method='trapp_am',
102
+ name = 'NonStationary NonGaussian',
103
+ unit='$m/s^2$'
104
+ ) # NonStationaryNonGaussian class initalization
105
+ print(nonstat_signal)
106
+ nonstat_signal.plot() # Plotting Timehistory
107
+ nonstat_signal.plot_psd() # Plotting Timehistory
108
+ nonstat_signal.plot_sftf() # Plotting Short Time Fourier Transform
109
+ ```
110
+ Implemented transformartion methods to build non-gaussianity signals are the following:
111
+
112
+ - Beta amplitude modulation ('beta_am')
113
+ - Gaussian amplitude modulation ('trapp_am')
114
+ - Rayleigh amplitude modulation ('ray_am')
115
+ - Frequency modulation via STFT ('fm')
116
+
117
+
118
+
@@ -0,0 +1,6 @@
1
+ __version__ = '0.0.2'
2
+ from .single_chan_signal import *
3
+ from .stationary_gaussian import *
4
+ from .stationary_nongaussian import *
5
+ from .nonstationary_nongaussian import *
6
+ from .utils import *