Commit b2d5c2f1 authored by Chris Smith's avatar Chris Smith
Browse files

SHOfastfit update

Amplitude is now based on the mean rather than the max response.
parent 89954af8
......@@ -122,8 +122,8 @@ def SHOfastGuess(w_vec, resp_vec, qual_factor=200):
SHO fit parameters arranged as [amplitude, frequency, quality factor, phase]
"""
amp_vec = abs(resp_vec)
i_max = np.argmax(amp_vec)
return np.array([np.max(amp_vec) / qual_factor, w_vec[i_max], qual_factor, np.angle(resp_vec[i_max])])
i_max = len(resp_vec)/2
return np.array([np.mean(amp_vec) / qual_factor, w_vec[i_max], qual_factor, np.angle(resp_vec[i_max])])
def SHOlowerBound(w_vec):
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment