Skip to content

Commit

Permalink
bugfix logfile df export
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Lostanlen committed Jul 13, 2020
1 parent c614a5d commit f1d0aa7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions birdvoxdetect/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def process_file(

# Add first row to sensor fault log.
if export_logfile:
logfile_df.append({
logfile_df = logfile_df.append({
"Start (hh:mm:ss)": seconds_to_hhmmss(0.0),
"Stop (hh:mm:ss)": seconds_to_hhmmss(
min(chunk_duration, full_length/sr)),
Expand Down Expand Up @@ -420,7 +420,7 @@ def process_file(
# Add row to sensor fault log.
has_sensor_fault = (sensor_fault_probability > bva_threshold)
if export_logfile:
logfile_df.append({
logfile_df = logfile_df.append({
"Start (hh:mm:ss)": seconds_to_hhmmss(chunk_id*chunk_duration),
"Stop (hh:mm:ss)": seconds_to_hhmmss((chunk_id+1)*chunk_duration),
"Fault?": int(has_sensor_fault)},
Expand Down Expand Up @@ -542,7 +542,7 @@ def process_file(
if n_chunks==1:
has_sensor_fault = False
if export_logfile:
logfile_df.append({
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),
"Fault?": int(has_sensor_fault)},
Expand Down

0 comments on commit f1d0aa7

Please sign in to comment.