Skip to content

pipx2/SyntDataFFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SyntDataFFT README

Introduction

SyntDataFFT is a tool designed to generate synthetic raw signals based on user-defined input parameters. This application is particularly useful for mimicking accelerometer data along a 1D profile, allowing users to simulate signals containing up to two anomalies. The anomalies are represented as geometrical irregularities within the signal, providing a valuable testing ground for various applications.

After generating the synthetic raw signal, SyntDataFFT applies a Hamming window to the signal and computes the Numpy fast Fourier transform (FFT) of the windowed signal. The resulting raw signal, windowed signal, and frequency spectrum of the windowed signal are visualized in plots for easy analysis.

Usage

Run SyntDataFFT

Through Terminal

To run the application through Python, follow these steps:

Clone the SyntDataFFT repository:

git clone https://github.com/ekvll/SyntDataFFT

Navigate to the project root:

cd ./SyntDataFFT

Run the application:

python main.py

As an Executable file

Download SyntDataFFT as an executable (.exe) file here, and double-click on the .exe file.

User-defined parameters

Upon application start, default values for signal and anomaly parameters are utilized. Customize the parameters according to your requirements.

  • Signal parameters

    • Signal duration (s) - Length of raw signal in seconds.
    • Sampling rate (Hz) - Sampling rate of raw signal in Hertz.
    • Noise level - Amplitude of normally distributed noise added to raw signal.
  • Anomaly parameters

    • Amplitude - Initial anomaly amplitude.
    • Start time (s) - Moment in time, in seconds, when anomaly is initialized.
    • Duration (s) - Duration of anomaly in seconds.
    • Frequency (Hz) - Frequency of anomaly in Hertz.
    • Exponential decay - Magnitude of exponential decay applied to anomaly at anomaly initialization.

Compute fast Fourier transform and plot the result

To compute the FFT of the raw signal and visualize the plots, press the Update plot button.

Example: The application have default user-defined parameters at application start-up.

You can customize the parameters accordingly and observe the resulting plot to analyze the synthetic signal.

Alt text

Build

Create a Local Python Package

To build a local Python package for SyntDataFFT, open a terminal, navigate to the project root, and run the following command:

python setup.py sdist

Create an Executable File

First, make sure you have PyInstaller installed in your environment. Through conda, run:

conda install -c conda-forge pyinstaller

Through pip, run:

pip install pyinstaller

Build the executable (.exe) file for SyntDataFFT using PyInstaller. Open a terminal, navigate to the project root, and run the following command:

pyinstaller SyntDataFFT.spec

Tests

Execute implemented tests using pytest by opening a terminal, navigating to the project root, and running:

pytest

Contribute

We welcome contributions to SyntDataFFT from the community. Follow the steps below to contribute effectively:

1. Start an Issue

Before making any changes, start an issue in the SyntDataFFT repository to discuss the proposed contribution. Clearly state what you are planning to work on and provide any relevant details or context. Take note of the issue number, as we will reference it in the subsequent steps.

2. Fork the SyntDataFFT repository

Click the "Fork" button on the SyntDataFFT repository page to create a copy of the repository on your GitHub account. This will allow you to make changes to your own copy of the project without affecting the original repository.

3. Clone Your Fork

Clone your forked repository to your local machine using the following steps:

On your forked repository page, click the "Code" button and copy the URL. Open a terminal and navigate to the directory where you want to store the local copy of the SyntDataFFT repository. Run the following command to clone your fork:

git clone <forked-repository-url>

4. Create a New Branch

Create a new branch for your contribution using a descriptive name that reflects the nature of your changes. Use the following command to create and switch to a new branch:

git checkout -b <your-branch-name>

5. Make Your Changes

Make your changes to the codebase, following the guidelines and conventions established in the project. Ensure that your changes are well-documented and adhere to the project's coding style.

6. Commit Your Changes

Once you have made and tested your changes, stage them and commit with a descriptive message that includes the issue number you are addressing:

git add .
git commit -m "<fix #issue-number: description of changes>"

7. Push Changes to Your Fork

Push your changes to your forked version of the SyntDataFFT GitHub repository:

git push origin <your-branch-name>

8. Create a Pull Request

Visit your forked repository on GitHub and click the "New pull request" button. Choose the branch containing your changes, write a clear title and description for your pull request (including the issue number), and click "Create pull request" to submit your contribution for review.

Thank you for contributing to SyntDataFFT! Your efforts are greatly appreciated.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages