I am trying to determine the amplitude for each day of a time series. The frequency is constant and the series varies only in amplitude. I have tried using Fast Fourier transforms and Lombscargle periodigrams but they return the amplitude for each frequency and the amplitude seems to be the mean over the entire time series. If I split the time series and compute an fft for each day I have problems with making the wave start from zero and it returns incorrect values. Does anyone know how I can reliably compute the amplitude for each day?
Below is some example data:
import numpy as np
import matplotlib.pyplot as plt
t = np.linspace(0, 240, 240) # time
fs = 1/24 # frequency
## Create a time series
series = np.sin(fs * 2 * np.pi * t)
series = series * np.sin(fs * 1/10 * 2 * np.pi * t) + 25
## Plot
plt.ylabel("Temperature ($^oC$)")
plt.xlabel("Time (hrs)")
plt.plot(t, series)
plt.show()