fixed small C2 stuff bug
This commit is contained in:
@@ -416,9 +416,17 @@ def createc2workoutdata(w):
|
|||||||
|
|
||||||
# adding diff, trying to see if this is valid
|
# adding diff, trying to see if this is valid
|
||||||
t = 10*row.df.loc[:,'TimeStamp (sec)'].values-10*row.df.loc[:,'TimeStamp (sec)'].iloc[0]
|
t = 10*row.df.loc[:,'TimeStamp (sec)'].values-10*row.df.loc[:,'TimeStamp (sec)'].iloc[0]
|
||||||
t[0] = t[1]
|
try:
|
||||||
|
t[0] = t[1]
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
d = 10*row.df.loc[:,' Horizontal (meters)'].values
|
d = 10*row.df.loc[:,' Horizontal (meters)'].values
|
||||||
d[0] = d[1]
|
try:
|
||||||
|
d[0] = d[1]
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
p = abs(10*row.df.loc[:,' Stroke500mPace (sec/500m)'].values)
|
p = abs(10*row.df.loc[:,' Stroke500mPace (sec/500m)'].values)
|
||||||
p = np.clip(p,0,3600)
|
p = np.clip(p,0,3600)
|
||||||
if w.workouttype == 'bike':
|
if w.workouttype == 'bike':
|
||||||
@@ -428,7 +436,11 @@ def createc2workoutdata(w):
|
|||||||
d = d.astype(int)
|
d = d.astype(int)
|
||||||
p = p.astype(int)
|
p = p.astype(int)
|
||||||
spm = row.df[' Cadence (stokes/min)'].astype(int)
|
spm = row.df[' Cadence (stokes/min)'].astype(int)
|
||||||
spm[0] = spm[1]
|
|
||||||
|
try:
|
||||||
|
spm[0] = spm[1]
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
try:
|
try:
|
||||||
hr = row.df[' HRCur (bpm)'].astype(int)
|
hr = row.df[' HRCur (bpm)'].astype(int)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user