Quellcode durchsuchen

modify isvalid option

V1.2
Jeong Geol Kim vor 3 Jahren
Ursprung
Commit
aa6ed77431
1 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 5
    2
      modules/coordsi.py

+ 5
- 2
modules/coordsi.py Datei anzeigen

@@ -134,8 +134,11 @@ def addValidDetection (dataframe, threshold = 25.0):
134 134
         top = threshold
135 135
         bottom = -threshold
136 136
         for x in range(0, len(df)):
137
-            if bottom < df['acceleration'][x] < top:
138
-                df['isValid'][x] = 1
137
+            if df['frame'][x] != 0.0:
138
+                if bottom < df['acceleration'][x] < top:
139
+                    df['isValid'][x] = 1
140
+                else:
141
+                    df['isValid'][x] = 0
139 142
             else:
140 143
                 df['isValid'][x] = 0
141 144
         return df

Laden…
Abbrechen
Speichern