Private
Public Access
1
0

added some filtering

This commit is contained in:
Sander Roosendaal
2018-02-27 14:24:57 +01:00
parent 142391f90a
commit d7f238a6e3

View File

@@ -215,6 +215,17 @@ def getcp(dfgrouped,logarr):
tt = group['time'].copy()
ww = group['power'].copy()
# Remove data where PM is repeating final power value
# of an interval during the rest
rolling_std = ww.rolling(window=4).std()
deltas = tt.diff()
mask = rolling_std == 0
ww.loc[mask] = 0
mask = deltas > 20.
ww.loc[mask] = 0
tmax = tt.max()