aboutsummaryrefslogtreecommitdiffstats
path: root/dpd/src/subsample_align.py
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-09-02 19:18:01 +0200
committerandreas128 <Andreas>2017-09-02 19:18:01 +0200
commit719238f0adc19fb3de3b4fd2695b6bb30d4c9dd5 (patch)
tree05fb049f22a526dd3b2c46b99f7546a84f4938a3 /dpd/src/subsample_align.py
parent6907d576b69ae065f25584fd4c6635c0c26beab2 (diff)
downloaddabmod-719238f0adc19fb3de3b4fd2695b6bb30d4c9dd5.tar.gz
dabmod-719238f0adc19fb3de3b4fd2695b6bb30d4c9dd5.tar.bz2
dabmod-719238f0adc19fb3de3b4fd2695b6bb30d4c9dd5.zip
Cleanup logging and plots
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 d0f3dba..cc2b975 100755
--- a/dpd/src/subsample_align.py
+++ b/dpd/src/subsample_align.py
@@ -29,7 +29,7 @@ def gen_omega(length):
return omega
-def subsample_align(sig, ref_sig):
+def subsample_align(sig, ref_sig, plot=False):
"""Do subsample alignment for sig relative to the reference signal
ref_sig. The delay between the two must be less than sample
@@ -68,7 +68,7 @@ def subsample_align(sig, ref_sig):
if optim_result.success:
best_tau = optim_result.x
- if 1:
+ if plot:
corr = np.vectorize(correlate_for_delay)
ixs = np.linspace(-1, 1, 100)
taus = corr(ixs)