Private
Public Access
1
0

more robust race form

This commit is contained in:
Sander Roosendaal
2018-05-19 14:57:45 +02:00
parent ed7ade98aa
commit 4be52e8e25
6 changed files with 95 additions and 39 deletions

View File

@@ -210,6 +210,11 @@ def handle_check_race_course(self,
else:
debug = False
if 'splitsecond' in kwargs:
splitsecond = kwargs['splitsecond']
else:
splitsecond = 0
mode = 'race'
if 'mode' in kwargs:
mode = kwargs['mode']
@@ -236,10 +241,10 @@ def handle_check_race_course(self,
' ElapsedTime (sec)': 'time',
}, inplace=True)
rowdata.fillna(method='backfill',inplace=True)
rowdata['time'] = rowdata['time']-rowdata.ix[0,'time']
rowdata = rowdata[rowdata['time']>splitsecond]
# we may want to expand the time (interpolate)
rowdata['dt'] = rowdata['time'].apply(
lambda x: timedelta(seconds=x)