I have a simulation of a decaying cosine curve with noise. I need to create guesses for a curve fit and need a way to find each guess and one of the variables is the time where the data is 1/3 of the initial value. I'm not sure what way to do this. Here is the simulation:
T_2 = 100
t = t = np.linspace(0, 1000, num = 500000)
def S_n(t, T_2):
return (np.sqrt(2))*np.exp(-t/T_2)*np.cos(10*t)
S = S_n(t, T_2) + np.random.normal(0, .001, 500000)
T_2 i the time at which the peak of the curve is 1/3 of the original, and this is what I will need to find a way to guess of actual data. Is there a way to compare peaks across a set of data? Like, looking at the max for every 50 points and when the peak == 1/3 of the first set of 50 points, that equals T_2?