1

How to find Shift phase between two sinusoids in Python. For example, I created two sinusoid with phase shift 180 radian (Visually). Can we calculate the phase shift in python script if we know only graph_1 and graph_2?

import matplotlib.pyplot as plt
import numpy as np
data=[]
def sin (f): 
    x=np.array(range(1,200))
    y = 10*np.sin((0.1*x)+f) 
    return (y)
import matplotlib.pyplot as plt 
graph_1 = sin(3.12) 
graph_2 = sin(0)
plt.plot(graph_1 ,graph_2)
plt.show()

Please see the image here

Steve Summit
  • 45,437
  • 7
  • 70
  • 103
dfsdf
  • 37
  • 9
  • You can perform an [FFT](https://en.wikipedia.org/wiki/Fast_Fourier_transform) on both waveforms to get their frequency and phase. – Steve Summit Jul 12 '22 at 22:45

0 Answers0