From 99f3962207af3bb193e7bdee6f98aa6890fcfb9b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 17 Jun 2011 15:50:36 -0400 Subject: [PATCH] Use abs(C) in fit_psd() (to match breit_wigner()). --- calibcant/vib_analyze.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calibcant/vib_analyze.py b/calibcant/vib_analyze.py index d226d35..59c8317 100644 --- a/calibcant/vib_analyze.py +++ b/calibcant/vib_analyze.py @@ -436,7 +436,8 @@ def fit_psd(freq_axis, psd_data, min_frequency=500, max_frequency=25000, A,B,C = p D = 0 A=abs(A) # A and B only show up as squares in f(x) - B=abs(B) # so ensure we get positive values + B=abs(B) # so ensure we get positive values. + C=abs(C) # Only abs(C) is used in breit_wigner(). return (A, B, C, D) def breit_wigner_area(A, B, C): -- 2.26.2