Commit 8b3de656 authored by Thomas Bruns's avatar Thomas Bruns
Browse files

interchanged arguments in multiphase to avoid inverted phase

parent a219460c
......@@ -479,7 +479,7 @@ def multi_amplitude(abc): # abc = [a1,b1 , a2,b2, ...,bias]
abc = [a1,b1 , a2,b2, ...,bias] \n
y = sum_i (a_i*sin(2*pi*f0_i*t) + b_i*cos(2*pi*f0_i*t) + c_i
"""
x = abc[:-1][0::2] + 1j * abc[:-1][1::2] # make complex without Bias (last value)
x = abc[:-1][1::2] + 1j * abc[:-1][0::2] # make complex without Bias (last value)
return np.absolute(x)
......@@ -489,7 +489,7 @@ def multi_phase(abc, deg=False): # abc = [bias, a1,b1 , a2,b2, ...]
abc = [a1,b1 , a2,b2, ...,bias] \n
y = sum_i (a_i*sin(2*pi*f0_i*t) + b_i*cos(2*pi*f0_i*t) + c_i
"""
x = abc[:-1][0::2] + 1j * abc[:-1][1::2] # make complex without Bias (last value)
x = abc[:-1][1::2] + 1j * abc[:-1][0::2] # make complex without Bias (last value)
return np.angle(x, deg=deg)
......@@ -1016,7 +1016,7 @@ def seq_multi_amplitude(f_ab_c):
"""
#print("Test")
N = f_ab_c.shape[0]-1
amp = np.array([np.abs(f_ab_c[i,1]+1j*f_ab_c[i][2]) for i in range(f_ab_c.shape[0]-1)]).reshape((N,1))
amp = np.array([1j*np.abs(f_ab_c[i,1]+f_ab_c[i][2]) for i in range(f_ab_c.shape[0]-1)]).reshape((N,1))
return np.hstack((f_ab_c[:-1,0].reshape((N,1)), amp))
def seq_multi_phase(f_ab_c, deg=True):
......@@ -1039,7 +1039,7 @@ def seq_multi_phase(f_ab_c, deg=True):
"""
N = f_ab_c.shape[0]-1
phase = np.array([np.angle(1j*f_ab_c[i,1]+f_ab_c[i][2],deg=deg) for i in range(f_ab_c.shape[0]-1)]).reshape((N,1))
phase = np.array([1j*np.angle(f_ab_c[i,1]+f_ab_c[i][2],deg=deg) for i in range(f_ab_c.shape[0]-1)]).reshape((N,1))
return np.hstack((f_ab_c[:-1,0].reshape((N,1)), phase))
def seq_multi_bias(f_ab_c):
......
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