Skip to content

Instantly share code, notes, and snippets.

@mdhk
Created August 25, 2018 19:07
Show Gist options
  • Save mdhk/ad0725cf494385d699aef6d6c40131be to your computer and use it in GitHub Desktop.
Save mdhk/ad0725cf494385d699aef6d6c40131be to your computer and use it in GitHub Desktop.
Cross-correlation signal alignment
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ipywidgets==7.4.0
matplotlib==2.2.2
numpy==1.14.5
scipy==1.1.0
@mdhk
Copy link
Author

mdhk commented Aug 25, 2018

A little script + interactive widget for playing with time-alignment of two cosines with different delay values. The optimal lag value is determined by finding the maximum cross-correlation peak between the two signals.

animated

Binder link (for running the notebook & trying out the widget): https://mybinder.org/v2/gist/mdhk/ad0725cf494385d699aef6d6c40131be/master?filepath=align_signals_crosscorr.ipynb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment