Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1732102
h5_file and defaults_config
StefenYin Sep 14, 2012
a511dd7
Merge remote-tracking branch 'upstream/master'
StefenYin Sep 15, 2012
ec9c67e
Changed the default.cfg because I changed the name of the home directory
StefenYin Sep 28, 2012
8b9ac86
Added contact forces function
StefenYin Sep 21, 2012
c5800aa
Fixed indentation
StefenYin Sep 22, 2012
54933fc
I did not know
StefenYin Sep 28, 2012
1db6594
Added compute_front_wheel_rate func
StefenYin Oct 1, 2012
d337c72
Updated the default.cfg
StefenYin Oct 2, 2012
6872795
Merge remote-tracking branch 'Jason_BDataProcessor/master'
StefenYin Oct 2, 2012
9a17c89
Added contact forces function
StefenYin Sep 21, 2012
f1cb57a
Fixed indentation
StefenYin Sep 22, 2012
7cf0941
I did not know
StefenYin Sep 28, 2012
2d60573
Added compute_front_wheel_rate func
StefenYin Oct 1, 2012
16e06fc
Deleted the attributes in the task_signals(self) function
StefenYin Oct 1, 2012
9171696
Updatedthe default.cfg
StefenYin Oct 2, 2012
aa548ec
Removed the whitespace and Changed the <V> type, and Fixed the task_s…
StefenYin Oct 3, 2012
8606f49
Added compute_front_wheel_yaw_angle func, and updated the compute_fro…
StefenYin Oct 7, 2012
e5d6bcc
Gave the front_contact_points, q9 and q10, name and units
StefenYin Oct 7, 2012
fee1807
Seperated the importing of contact forces and front wheel rate yaw angle
StefenYin Oct 8, 2012
a8b7db9
Added select_runs func into the database.py module
StefenYin Oct 8, 2012
b87b528
Added frame_acceleration in signalprocession and compute_frame_accele…
StefenYin Oct 9, 2012
169f589
Fixed an error in the func of frame_acceleration
StefenYin Oct 10, 2012
58f00bd
Added compute_contact_points_acceleration func
StefenYin Oct 11, 2012
cb76840
Changed the source of u7d, u8d, u9d and u10d, based on contact_points…
StefenYin Oct 11, 2012
e46fe62
Wrapped the variables length in contact forces func
StefenYin Oct 11, 2012
0d56cc3
Fixed the errors after testing all new built function on IpythonNotebook
StefenYin Oct 11, 2012
2008d37
Fixed errors when running the run481 = ...
StefenYin Oct 11, 2012
46650e5
Fixed the units of q1_front_wheel, Added signal filter(10.0) after Ac…
StefenYin Oct 12, 2012
72486b7
Merged wit origin/con_force_I, this is un-conflict part
StefenYin Oct 12, 2012
8c56381
Merged the conflict parts
StefenYin Oct 12, 2012
7146686
Deleted the frame_acceleration func derived from VN-100 acceleration …
StefenYin Oct 14, 2012
7cde147
Fixed still the merge conflicts
StefenYin Oct 14, 2012
acbc4c2
Changed the data path to Toshiba computer
StefenYin Oct 16, 2012
f55ec5a
Changed processedCols for new funcs
StefenYin Oct 16, 2012
6cba406
Deleted two same funcs
StefenYin Oct 16, 2012
ed9e1a9
Changed the compute_frame_acceleration func into the one directly der…
StefenYin Oct 16, 2012
96176ff
Changed the names of contact points acceleration
StefenYin Oct 16, 2012
af47613
Import pdb and set_trace() for debug the program, especially the comp…
StefenYin Oct 16, 2012
101bf97
Seperated the compute_contact_forces into three funcs, compute_steer_…
StefenYin Oct 16, 2012
63e1a21
Seperated the compute_contact_forces_nonslip, compute_contact_forces_…
StefenYin Oct 16, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions bicycledataprocessor/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,27 @@ def __init__(self, **kwargs):
self.processedCols = ['FrameAccelerationX',
'FrameAccelerationY',
'FrameAccelerationZ',
'LongitudinalRearContactAcceleration'
'LateralRearContactAcceleration'
'DownwardRearContactAcceleration'
'LongitudinalFrontContactAcceleration'
'LateralFrontContactAcceleration'
'DownwardFrontContactAcceleration'
'YawAngle'
'FrontWheelYawAngle'
'SteerTorque_Slip'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should do away with the _ underscores to be consistent in the naming.

'LongitudinalRearContactForce_Slip'
'LateralRearContactForce_Slip'
'LongitudinalFrontContactForce_Slip'
'LateralFrontContactForce_Slip'
'LongitudinalRearContactForce_Nonslip'
'LateralRearContactForce_Nonslip'
'LongitudinalFrontContactForce_Nonslip'
'LateralFrontContactForce_Nonslip'
'PitchRate',
'PullForce',
'RearWheelRate',
'FrontWheelRate',
'RollAngle',
'RollRate',
'ForwardSpeed',
Expand Down Expand Up @@ -361,6 +379,45 @@ def create_task_table(self):
pass
self.close()

def select_runs(self, riders, maneuvers, environments):
"""Returns a list of runs given a set of conditions.

Parameters
----------
riders : list
All or a subset of ['Charlie', 'Jason', 'Luke'].
maneuvers : list
All or a subset of ['Balance', 'Balance With Disturbance',
'Track Straight Line', 'Track Straight Line With Disturbance'].
environments : list
All or a subset of ['Horse Treadmill', 'Pavillion Floor'].

Returns
-------
runs : list
List of run numbers for the given conditions.

"""

self.open()

table = self.database.root.runTable

runs = []
for row in table.iterrows():
con = []
con.append(row['Rider'] in riders)
con.append(row['Maneuver'] in maneuvers)
con.append(row['Environment'] in environments)
con.append(row['corrupt'] is not True)
con.append(int(row['RunID']) > 100)
if False not in con:
runs.append(row['RunID'])

self.close()

return runs

def sync_data(self, directory='exports/'):
"""Synchronizes data to the biosport website."""
user = 'biosport'
Expand Down
Loading