From e90169464c79d00a6521e9e5dc6393be71bb9b39 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Wed, 2 Nov 2022 16:09:45 +0100 Subject: [PATCH] Use a cosine instead of a sine for direct phase reading --- fourier/mylib/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fourier/mylib/util.py b/fourier/mylib/util.py index 22c4af5..67a02cc 100644 --- a/fourier/mylib/util.py +++ b/fourier/mylib/util.py @@ -15,7 +15,7 @@ def phasemod(phase, low=np.pi): def sine_fitfunc(t, amp=1, freq=1, phase=0, off=0): """Simple sine wave for fitting purposes""" - return amp*np.sin( 2*np.pi*freq*t + phase) + off + return amp*np.cos( 2*np.pi*freq*t + phase) + off def sampled_time(sample_rate=1, start=0, end=1, offset=0): return offset + np.arange(start, end, 1/sample_rate)