Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Processes the data collected from the instrumented bicycle.

Project Description


This program is setup to process the raw data signals collected from the Davis Instrumented Bicycle’s data acquisition system (i.e. the output of BicycleDAQ). See [Moore2012] for details of the system and experiments.


BSD 2-Clause License, see LICENSE.txt.


If you make use of this data we kindly request that you cite our work, either [Moore2012], the software DOI, and/or other relevant references.


For ease of setup we recommend setting up a conda environment:

$ conda create -n bdp numpy scipy matplotlib "pytables<3.0" pyyaml
$ source activate bdp

The remaining dependencies need to be installed with pip:

(bdp)$ pip install "uncertainties>2.0.0" "DynamicistToolKit>=0.3.4"
(bdp)$ pip install "yeadon>=1.1.1" "BicycleParameters>=0.2.0"

And finally, this package:

(bdp)$ pip install BicycleDataProcessor


Load the prebuilt database file

The simplest way to get started with the data is to download the database file from:

$ wget
$ tar -jxvf instrumented_bicycle_raw_data_h5.tar.bz2

And also the bicycle parameter data:

$ wget
$ tar -zxvf bicycle_parameters.tar.gz
$ rm bicycle_parameters.tar.gz

In your working directory, create a bdp-defaults.cfg and change pathToDatabase and pathToParameters to point to the downloaded and unzipped database file and the bicycle-parameters data directory, respectively. See the example-bdp-defaults.cfg for reference. This file follows the standard Python configuration file format.

Interact with the data

Open a Python command prompt and import the module:

>>> import bicycledataprocessor as bdp

First load the database:

>>> dataset = bdp.DataSet()

Now load a run:

>>> run = bdp.Run('00105', dataset)

Check to make sure the data was properly time synchronized:

>>> run.verify_time_sync()

The graph that appears shows the mostly downward acceleration signals from the two accelerometers. These signals are used to synchronize the NI USB-2008 and the VN-100 data. If these do not match, then the synchronization algorithm didn’t not work and the data may be unusable.

The run has a lot of data associated with it. Firstly, you can print a subset of the meta data with:

>>> print(run)

The complete meta data is stored in a dictionary:

>>> run.metadata

The raw data for each sensor is stored in a dictionary and can be accessed by:

>>> run.rawSignals

The data for each sensor with calibration scaling can be accessed by:

>>> run.calibratedSignals

The data for each sensor after truncation based on the time synchronization can be accessed with:

>>> run.truncatedSignals

The data for each computed signal is also stored in a dictionary:

>>> run.computedSignals

The data for each task signal is also stored in a dictionary:

>>> run.taskSignals

The taskSignals can be plotted:

>>> run.taskSignals.keys() # see a list of options
>>> run.plot('SteerAngle', 'RollAngle', 'PullForce')

Export the computed signals as a mat file with:

>>> run.export('mat')

Build the HDF5 file from raw data

The second option would be to build the database with the raw data from BicycleDAQ. BicycleDAQ stores the raw data from trials and calibrations as Matlab mat files. Then use this module to create the database and fill it with the data.

The raw trial data can downloaded as so:

$ wget -O
$ unzip -d raw-trial-data
$ rm

The raw calibration files:

$ wget -O
$ unzip -d raw-calibration-data
$ rm

And the additional corrupt trial file:

$ wget -O data-corruption.csv

Make sure your bdp-defaults.cfg paths point to the correct directories for the run mat files (pathToRunMat), calibration mat files (pathToCalibMat), the corrupt data file (data-corruption.csv). Optionally the paths can be set as arguments to DataSet().

Now create an empty database file in the current directory (or to the path specified in bdp-defaults.cfg if you’ve done that).:

$ python
>>> import bicycledataprocessor as bdp
>>> dataset = bdp.DataSet()
>>> dataset.create_database()

Now, fill the database with the data.:

>>> dataset.fill_all_tables()

The will take a little time to populate the database.


  • The roll angle is not guaranteed to be calibrated in some of the early pavilion runs. Caution should be used.
  • The first set of pavilion runs with Luke and Charlie are mostly corrupt, beware. The corruption column in the runTable specifies which runs are corrupt.
  • The yaw angle and lateral deviation values depend on integrating the yaw rate. This seems to work for runs that have signals centered around zero, but may be wrong for others. (There are plans to fix this for all runs.)

Grant Information

This material is partially based upon work supported by the National Science Foundation under Grant No. 0928339. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.


[Moore2012](1, 2) Moore, J. K. Human Control of a Bicycle. University of California, Davis. 2012.

Release Notes


  • Initial PyPi release.
Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
BicycleDataProcessor-0.1.0.tar.gz (42.2 kB) Copy SHA256 Checksum SHA256 Source Oct 10, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting