From c29d024bc1bb7629d5dd9dc1354f7cbcec2ad9c9 Mon Sep 17 00:00:00 2001 From: Vincent Lostanlen Date: Mon, 13 Jul 2020 16:18:56 +0200 Subject: [PATCH] bugfix export logfile if n_chunks==1 --- birdvoxdetect/core.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/birdvoxdetect/core.py b/birdvoxdetect/core.py index 2f53052..dadb437 100644 --- a/birdvoxdetect/core.py +++ b/birdvoxdetect/core.py @@ -539,9 +539,7 @@ def process_file( # unstable with files shorter than 30 minutes, which is why we issue a # warning. Also, we do not try to detect sensor faults in files shorter than # 30 minutes. - if n_chunks==1: - has_sensor_fault = False - if export_logfile: + if (n_chunks>1) and export_logfile: logfile_df = logfile_df.append({ "Start (hh:mm:ss)": seconds_to_hhmmss(chunk_id*chunk_duration), "Stop (hh:mm:ss)": seconds_to_hhmmss(full_length/sr),