Skip to main content

Signal analysis tool for Time Signals

Project description

Welcome to Satis

logo

Spectral Analysis for TImes Signals.

Satis is a python3 / scipy implementation of the Fourier Spectrums in Amplitude ans Power Spectral Density. It is particularly suited for CFD signals with the following characteristics:

  • Short sampling time,
  • Potentially short recording time,
  • Low signal-to-noise ratio,
  • Multiple measures available.
Installation

The package is available on PyPI so you can install it using pip:

pip install satis
How to use it
(my_env)rossi@pluto:~>satis


Usage: satis [OPTIONS] COMMAND [ARGS]...

  ---------------   SATIS  --------------------

  You are now using the Command line interface of Satis, a simple tool for
  spectral analysis optimized to signals from CFD, created at CERFACS
  (https://cerfacs.fr).

  This is a python package currently installed in your python environment.

Options:
  --help  Show this message and exit.

Commands:
  datasetforbeginners  Copy a set of signals to train using Satis.
  fourierconvergence   Plot discrete Fourier transform of the complete...
  fouriervariability   Plot the Fourier variability diagnostic results.
  psdconvergence       Plot the PSD convergence diagnostic results.
  psdvariability       Plot the spectral energy at the target frequency.
  time                 Plot the temporal signal and its time-average.

Several command lines are available on satis. You can display them running the command satis --help.

Dataset for beginners
satis datasetforbeginners

With this command , you can copy in your local directory a file my_first_dataset.dat to start using satis. It contains several signals of a CFD simulation. These signals have been recorded at different locations to create an average signal less sensitive to noise. For your first time with satis, we recommand to do the following diagnostics in the order with my_first_dataset.dat.

Time
satis time my_first_dataset.dat

This diagnostic plots a time graph of your signals. This plot aims at showing you if the average signal is well converged or if there is a transient behavior. To delete a transient behavior, you can add at the end of the diagnostic command -t *starting_time* to declare the beginning of the converged behavior.

If a periodic pattern is visible, you should calculate its frequency and declare it with -f *calculated_frequency*

There is also a cumulative time-average. If this curve is not almost flat, you did probably not remove enough transient behavior.

time diagnostic

Fourier variability
satis fouriervariability my_first_dataset.dat -t 0.201 -f 560

In this diagnostic, the Fourier coefficients of each signal at the specified frequency is plotted so that you can check the signals are equivalent. If a signal seems have different characteristics to the others, you should think about removing it. The average signal would be cleaner. To do so, declare the subset of signals you want to use with: --subset 1 3 14 ...

fourier variability diagnostic

Fourier convergence
satis fourierconvergence my_first_dataset.dat -t 0.201 -f 560

Since this diagnostic is based on the average signal, the user should have checked beforehand that all input signals are equivalent thanks to the fouriervariability diagnostic. The top plots show the amplitude of the Discrete Fourier Transform performed on the complete average signal, the last “half” of the signal and the last “quarter” of the signal. The bottom plots show the convergence over increasing time of the amplitude and phase of the signal at the specified frequency.

fourier convergence diagnostic

PSD variability
satis psdvariability my_first_dataset.dat -t 0.201 -f 560

This diagnostic shows the distribution of the spectral energy of fluctuations on the target frequency, its first and second harmonic and the rest of the frequencies. Note that this distribution is related to the fluctuations and that the time-average has been removed from the signal.

psd variability diagnostic

PSD convergence
satis psdconvergence my_first_dataset.dat -t 0.201 -f 560

Just as the Fourier convergence, the PSD convergence diagnostic shows the Power Spectral Density obtained on the complete signal, the last half and the last quarter. The left uses a standard linear scale while the right plot shows the same result with log scales.

![psd convergence diagnostic]https://cerfacs.fr/coop/images/satis/psdconvergence.png)

Satis as a package

Of course, you can use satis in your own project importing it as a package:

import os 
import glob
import satis
import matplotlib.pyplot as plt

*you awesome code*

time, signals = satis.read_signal('your_dataset.dat')
clean_time = satis.define_good_time_array(time, signals)
clean_signals = satis.interpolate_signals(time, signals, clean_time)
new_time, new_signals = satis.get_clean_signals(clean_time, signals, 
												calculated_frequency)
plt.plot(new_time, new_signals)
fourier = satis.get_coeff_fourier(new_time, new_signals,
									calculated_frequency)

*your awesome code

Acknowledgements

This package is the result of work done at Cerfacs's COOP Team. The contributors of this project are:

  • Franchine Ni
  • Antoine Dauptain
  • Tamon Nakano
  • Matthieu Rossi

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

satis-1.0.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

satis-1.0.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: satis-1.0.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for satis-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e2037848a37f505ff2868b998f619c8b88d0e7ab08f1be6533c9a3b94b700c31
MD5 314a332265053a1a800f45c2ab315027
BLAKE2b-256 336a132bea0643bcd84f5a8b82acbb9a8a06932c833f8cc34a50eb6c4afd3fe1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: satis-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for satis-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12e575b07bb9e67c25ffc449dd9548e5e7ab380f58bb5c0afd142829cfd2be99
MD5 74a17eff6592bdbabee0945e8379da97
BLAKE2b-256 4463a16305d2bfb330ddeafe484b6a3bf722334fdc2716bca6b821f7431afa82

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