Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2016-11-29 22:20:17 +01:00
parent 40ead488dd
commit 8d9816a238
3 changed files with 61 additions and 2 deletions

View File

@@ -244,7 +244,8 @@ def smalldataprep(therows,xparam,yparam1,yparam2):
return df
def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True):
def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
empower=True):
rowdatadf.set_index([range(len(rowdatadf))],inplace=True)
t = rowdatadf.ix[:,'TimeStamp (sec)']
t = pd.Series(t-rowdatadf.ix[0,'TimeStamp (sec)'])
@@ -338,6 +339,28 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True):
data['x_right'] = x_right
if empower:
try:
wash = rowdatadf.ix[:,'wash']
catch = rowdatadf.ix[:,'catch']
finish = rowdatadf.ix[:,'finish']
peakforce = rowdatadf.ix[:'peakforce']
averageforce = rowdatadf.ix[:'averageforce']
peakforceangle = rowdatadf.ix[:,'peakforceangle']
driveenergy = rowdatadf.ix[:,'driveenergy']
drivelength = driveenergy/(averageforce*4.44822)
slip = rowdatadf.ix[:,'slip']
data['wash'] = wash
data['catch'] = catch
data['slip'] = slip
data['finish'] = finish
data['peakforceangle'] = peakforceangle
data['driveenergy'] = driveenergy
data['peakforce'] = peakforce
data['averageforce'] = averageforce
except KeyError:
pass
if otwpower:
try:
nowindpace = rowdatadf.ix[:,'nowindpace']