| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The signal_alignment is a Python-based repository for aligning and synchronizing time-series signals using various methods, including Cross-Correlation, Mean Squared Error (MSE), MSE with Threshold, and advanced techniques combining Local Phase Variance (LPV) and FFT-based approaches. The toolkit provides modular code for signal generation, alignment, and visualization, with both a command-line script and a Jupyter Notebook to demonstrate its functionality.
signal_alignment/ ├── modules/ │ ├── cross_correlation.py # Cross-Correlation alignment method │ ├── mse_alignment.py # MSE-based alignment method │ ├── mse_fft_lpv_alignment.py # MSE with FFT and LPV alignment │ ├── mse_lpv_alignment.py # MSE with LPV alignment │ ├── mse_threshold_alignment.py # MSE with threshold alignment │ ├── plot_utils.py # Utilities for plotting signals │ ├── signal_utils.py # Utilities for signal generation ├── results/ # Directory for output plots (created at runtime) ├── main.py # Main script to run alignment methods ├── SignalAlignment.ipynb # Jupyter Notebook showcasing code execution ├── requirements.txt # Python dependencies
Clone the Repository:
git clone https://github.com/infocusp/signal_alignment.git
cd signal_alignmentCreate a Virtual Environment (optional but recommended):
python -m venv myenv
source myenv/bin/activate # On Windows: myenv\Scripts\activateInstall Dependencies: Ensure you have Python 3.8+ installed, then run:
pip install -r requirements.txtThe requirements.txt includes dependencies like numpy, plotly, scipy, and jupyter for the notebook.
The main.py script demonstrates the toolkit’s functionality by generating signals, applying all alignment methods, and saving plots to the results directory.
Run the Main Script:
python main.pyWhat It Does:
Output:
The SignalAlignment.ipynb notebook provides an interactive environment to explore and experiment.
Launch Jupyter Notebook:
jupyter notebook SignalAlignment.ipynbWhat It Includes:
To customize the signal parameters, modify main.py or the notebook. For example, to change the sampling frequency and noise level:
sg = SignalGenerator(fs=200, duration_sec=3.0) # Update sampling frequency and duration
t, s1, s2 = sg.generate_derived_signals(base_signal, noise_scale=0.1) # Increase noiseRun the script or notebook again to see updated results:
python main.py
# OR open SignalAlignment.ipynb in JupyterThe requirements.txt includes:
numpy plotly scipy jupyter
Install them using pip install -r requirements.txt.
Contributions are welcome! Please:
| Back | FazBrowse Home | New Git URL |