summaryrefslogtreecommitdiffstats
path: root/dpd/src/subsample_align.py
diff options
context:
space:
mode:
Diffstat (limited to 'dpd/src/subsample_align.py')
-rwxr-xr-xdpd/src/subsample_align.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/dpd/src/subsample_align.py b/dpd/src/subsample_align.py
index eda1dce..4dc854b 100755
--- a/dpd/src/subsample_align.py
+++ b/dpd/src/subsample_align.py
@@ -52,7 +52,7 @@ def subsample_align(sig, ref_sig):
corr_sig = np.fft.ifft(rotate_vec * fft_sig)
- return -np.abs(np.sum(corr_sig * ref_sig))
+ return -np.abs(np.sum(corr_sig.conjugate() * ref_sig))
optim_result = optimize.minimize_scalar(correlate_for_delay, bounds=(-1,1), method='bounded', options={'disp': True})
@@ -61,7 +61,7 @@ def subsample_align(sig, ref_sig):
#print("Found subsample delay = {}".format(best_tau))
- if 0:
+ if 1:
corr = np.vectorize(correlate_for_delay)
ixs = np.linspace(-1, 1, 100)
taus = corr(ixs)