Skip to main content

A comprehensive Python package for generating and analyzing non-Gaussian and non-stationary signals.

Project description

SignalForge Testing Documentation Status

SignalForge

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.

See the documentation for a complete overview of the implemented methods for analisys and signal generation.

Installing SignalForge

The package is published in PiPy. To install it:

pip install signalforge

or you can clone it from GitHub

git clone https://github.com/GiulioCurti/SignalForge.git

and locally install it from inside the folder SignalForge

pip install -e .

Example code on how to generate a Stationary Gaussian Signal

Stationary Gaussian signals can be easily generated via the specific class StationaryGaussian. Its usage is briefly shown in the following example code:

from SignalForge import StationaryGaussian

fpsd = [10,20]  # Frequency vector [Hz]
psd = [1,1]     # Power density vecrtor [(m/s^2)^2/Hz]
fs = 200        # Sampling frequency [Hz]
T = 200         # Time duration [s]
gauss_signal = StationaryGaussian(
    fpsd=fpsd, 
    psd=psd, 
    fs=fs, 
    T = T, 
    name = 'Stationary Gaussian', 
    unit='$m/s^2$'
    ) # StationaryGaussian class initialization
print(gauss_signal)
gauss_signal.plot()           # Plotting Timehistory
gauss_signal.plot_psd()       # Plotting Power spectral density 

Implemented non-linear transformartion methods to add non-gaussianity are the following:

  • Hermite-Winterstein ('winter')
  • Cubic polynomial ('cubic')
  • Hyperbolic transform – Zheng (‘zheng’)
  • Sarkani ('sarkani')
  • Improved nonlinear transform ('zmnl')
  • Steinwolf ('steinwolf')
  • Smallwoood Poisson shots ('smallwood')
  • Van Baren ('vanbaren')

Example code on how to generate a Stationary Non Gaussian Signal

Stationary non Gaussian signals can be easily generated via the specific class StationaryNonGaussian. Its usage is briefly shown in the following example code:

from SignalForge import StationaryNonGaussian

fpsd = [10,20]  # Frequency vector [Hz]
psd = [1,1]     # Power density vecrtor [(m/s^2)^2/Hz]
fs = 200        # Sampling frequency [Hz]
T = 200         # Time duration [s]
input_kurtosis = 6
nongauss_signal = StationaryNonGaussian(
    fpsd = fpsd, 
    psd = psd,
    T = T, 
    kurtosis=input_kurtosis,
    fs = fs, 
    method='zmnl', 
    name = 'Stationary NonGaussian', 
    unit='$m/s^2$'
    ) # StationaryNonGaussian class initalization
print(nongauss_signal)
nongauss_signal.plot()      # Plotting Timehistory
nongauss_signal.plot_psd()  # Plotting Power spectral density 
nongauss_signal.plot_fft()  # Plotting Fourier Transform

Example code on how to generate a Non Stationary Non Gaussian Signal

Non stationary non Gaussian signals can be easily generated via the specific class NonStationaryGaussian. Its usage is briefly shown in the following example code:

from SignalForge import NonStationaryNonGaussian

fpsd = [10,20]  # Frequency vector [Hz]
psd = [1,1]     # Power density vecrtor [(m/s^2)^2/Hz]
fs = 200        # Sampling frequency [Hz]
T = 200         # Time duration [s]
params = {'input_kurtosis': 10}
nonstat_signal = NonStationaryNonGaussian(
    fpsd = fpsd, 
    psd = psd, 
    T = T,
    params = params,
    fs = fs, 
    method='trapp_am', 
    name = 'NonStationary NonGaussian', 
    unit='$m/s^2$'
    ) # NonStationaryNonGaussian class initalization
print(nonstat_signal)
nonstat_signal.plot()      # Plotting Timehistory
nonstat_signal.plot_psd()  # Plotting Timehistory
nonstat_signal.plot_sftf()  # Plotting Short Time Fourier Transform

Implemented transformartion methods to build non-gaussianity signals are the following:

  • Beta amplitude modulation ('beta_am')
  • Gaussian amplitude modulation ('trapp_am')
  • Rayleigh amplitude modulation ('ray_am')
  • Frequency modulation via STFT ('fm')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

signalforge-1.0.0.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

signalforge-1.0.0-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

Details for the file signalforge-1.0.0.tar.gz.

File metadata

  • Download URL: signalforge-1.0.0.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for signalforge-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ad5a36b734a7c8a875adbb0f25a5e41091b17f31080b743a42f7db80091b311b
MD5 1ca9e053ef3c2fa12a9ae1035bed69d5
BLAKE2b-256 566b502e688e6a919786b1e779ea9de0fd294992126b2edd6d82568463c09bff

See more details on using hashes here.

File details

Details for the file signalforge-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: signalforge-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 45.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for signalforge-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10f2fc30194683e4ea65dca8e2c397da9246e3c5b9cfd24ca517cd1c4e47d4a6
MD5 cf2827adfa6610a866e72099bd7c9009
BLAKE2b-256 4cc7c6a453f75240ff7d54d46a9e1044596d1e22a7146df80a34dde9e3b58d43

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page