I am having trouble understanding this expression:
####################################### MY TRY
PSD is a 1D array of n amplitudes
fft_freq is a 1D array n frequencies
threshold = 0.2*np.max(PSD)...................................# Condition
ls = []
for i in range(n):
.....if PSD < threshold:.............................................# If PSD(f) passes the condition, then add amplitude to list
........ls.append(PSD)
idx = np.where(np.max(ls)==PSD)[0][0]....................# Find which frequency corresponding to the maximum amplitude in the list
freq_ax = fft_freq[idx]
#######################################
But the answer is not reasonable at all (it's higher than the f_mean).. I must have misunderstood the expression.
Someone that know how to interpret this?
####################################### MY TRY
PSD is a 1D array of n amplitudes
fft_freq is a 1D array n frequencies
threshold = 0.2*np.max(PSD)...................................# Condition
ls = []
for i in range(n):
.....if PSD < threshold:.............................................# If PSD(f) passes the condition, then add amplitude to list
........ls.append(PSD)
idx = np.where(np.max(ls)==PSD)[0][0]....................# Find which frequency corresponding to the maximum amplitude in the list
freq_ax = fft_freq[idx]
#######################################
But the answer is not reasonable at all (it's higher than the f_mean).. I must have misunderstood the expression.
Someone that know how to interpret this?