Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Prevent negative values in waveform data (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb authored Mar 31, 2022
1 parent 1ed4146 commit 5c9b654
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/catalog/api/utils/waveform.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def process_waveform_output(json_out):
for idx, val in enumerate(data):
if idx % 2 == 0:
continue
if val < 0: # Any other odd values are negligible and can be ignored
val = 0
transformed_data.append(val)
if val > max_val:
max_val = val
Expand Down

0 comments on commit 5c9b654

Please sign in to comment.