Commit 38ab6ab6 authored by Benedikt Seeger's avatar Benedikt Seeger
Browse files

dt calculation for sqe_fits now uses mean of diff instad of t[0]-t[1]

improves stability for non äquidistant sampled data 
parent 5eddb20b
......@@ -201,7 +201,7 @@ def seq_threeparsinefit(y, t, f0, periods=1):
RuntimeWarning,
)
Tau = 1.0 / f0 *periods
dt = t[1] - t[0]
dt = np.mean(np.diff(t))
N = int(Tau // dt) ## samples per section
M = int(t.size // N) ## number of sections or periods
......@@ -303,7 +303,7 @@ def seq_fourparsinefit(y, t, f0, tol=1.0e-7, nmax=1000, periods=1, debug_plot=Fa
RuntimeWarning,
)
Tau = 1.0 / f0 *periods
dt = t[1] - t[0]
dt = np.mean(np.diff(t))
N = int(Tau // dt) ## samples per section
M = int(t.size // N) ## number of sections or periods
......
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