Private
Public Access
1
0

check for delta t in CP algo

This commit is contained in:
Sander Roosendaal
2017-06-29 15:36:03 +02:00
parent f0c3363b2c
commit 19aea9cda5

View File

@@ -175,8 +175,15 @@ def getmaxwattinterval(tt,ww,i):
try:
t_0 = tt.ix[indexmax]
t_1 = tt.ix[indexmax-i]
deltat = 1.0e-3*(t_0-t_1)
wmax = w_roll.ix[indexmax]
deltas = tt.ix[indexmax-1:indexmax].diff().dropna()
print deltas.mean(),deltas.max()
testres = 1.0e-3*deltas.max() < 30.
if testres:
deltat = 1.0e-3*(t_0-t_1)
wmax = w_roll.ix[indexmax]
else:
wmax = 0
deltat = 0
except KeyError:
pass
else: