Use a cosine instead of a sine for direct phase reading

This commit is contained in:
Eric Teunis de Boone 2022-11-02 16:09:45 +01:00
parent ee0f223423
commit e90169464c

View file

@ -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)