From 60ea5e6f3f89661e8b39ad1ad24d4bb8e3a1884f Mon Sep 17 00:00:00 2001 From: David Protzman Date: Sat, 30 Apr 2022 11:58:02 -0400 Subject: [PATCH] Shrunk the peak search window from 100 to 10 No reason to look that far around for the peak of a ZC sequence correlation --- matlab/updated_scripts/find_zc_indices_by_file.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matlab/updated_scripts/find_zc_indices_by_file.m b/matlab/updated_scripts/find_zc_indices_by_file.m index a330df3..321e2e1 100644 --- a/matlab/updated_scripts/find_zc_indices_by_file.m +++ b/matlab/updated_scripts/find_zc_indices_by_file.m @@ -145,7 +145,8 @@ function [zc_indices] = find_zc_indices_by_file(file_path, sample_rate, frequenc % value. The goal here is to only end up with the best score for the starting point of each burst instead of having % multiple starting points for each burst. true_peaks = []; - search_window = 100; + search_window = 10; + for idx = 1:length(passing_scores) % Calculate how far to the left and right to look for the highest peak left_idx = passing_scores(idx) - (search_window / 2);