From 83dbd2feede4080977ca89494ab58b486b2c6b0d Mon Sep 17 00:00:00 2001 From: wendtalexander Date: Sun, 15 Jan 2023 15:11:05 +0100 Subject: [PATCH] adding question how many windows to be displayed --- code/chirpdetection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/chirpdetection.py b/code/chirpdetection.py index 9b3efd6..e0221f8 100644 --- a/code/chirpdetection.py +++ b/code/chirpdetection.py @@ -177,8 +177,9 @@ def main(datapath: str) -> None: window_duration - (window_overlap + 2 * window_edge), dtype=int ) - - for start_index in window_starts: + # ask how many windows should be calulated + nwindows = int(input("How many windows should be calculated (integer number)? ")) + for start_index in window_starts[:nwindows]: # make t0 and dt t0 = start_index / data.samplerate