From 388d4acd7b300dd1e20811d87b443d17943073b1 Mon Sep 17 00:00:00 2001 From: David Protzman Date: Sat, 30 Apr 2022 11:59:05 -0400 Subject: [PATCH] Erroring if correlation threshold < 0 --- matlab/updated_scripts/extract_bursts_from_file.m | 1 + 1 file changed, 1 insertion(+) diff --git a/matlab/updated_scripts/extract_bursts_from_file.m b/matlab/updated_scripts/extract_bursts_from_file.m index 6a8c8d6..05dac7d 100644 --- a/matlab/updated_scripts/extract_bursts_from_file.m +++ b/matlab/updated_scripts/extract_bursts_from_file.m @@ -30,6 +30,7 @@ function [bursts] = extract_bursts_from_file(input_path, sample_rate, frequency_ assert(sample_rate > 0, "Sample rate must be > 0") assert(isnumeric(frequency_offset), "Frequency offset must be numeric"); assert(isnumeric(correlation_threshold), "Correlation threshold must be numeric"); + assert(correlation_threshold >= 0.0, "Correlation threshold must be >= 0.0"); assert(isnumeric(chunk_size), "Chunk size must be numeric"); assert(chunk_size > 0, "Chunk size must be > 0"); assert(isnumeric(padding), "Padding must be numeric");