浏览代码

modify isvalid option

V1.2
Jeong Geol Kim 3 年前
父节点
当前提交
aa6ed77431
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5
    2
      modules/coordsi.py

+ 5
- 2
modules/coordsi.py 查看文件

@@ -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

正在加载...
取消
保存