소스 검색

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

Loading…
취소
저장