Browse Source

Fix: use correct measurements (with spread std gt zero)

compton 3 months ago
parent
commit
9f77ccb42e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/avg/compton_filter.py

+ 1 - 1
src/avg/compton_filter.py

@@ -138,7 +138,7 @@ class SlowdbComptonHandler(PostgreSQLHandler):
             ROUND(CAST(values_array[6]/1000 AS numeric), 6) AS std_spread, 
             date_trunc('second', time + (values_array[8] * interval '1 second')) AS start_time, 
             date_trunc('second', time + (values_array[8] * interval '1 second') + (values_array[7] * interval '1 second')) AS stop_time
-            FROM {table} WHERE g_id=43 AND values_array[5]>0 AND dt>0 {time_condition}"""
+            FROM {table} WHERE g_id=43 AND values_array[5]>0 AND values_array[6]>0 AND dt>0 {time_condition}"""
         
         full_sql_query = '\nUNION ALL\n'.join([sql_query(table) for table in tables]) + '\nORDER BY time;'