Skip to content

Converting Data

Vivian Chu edited this page Aug 2, 2016 · 1 revision

About

Todo: fill in more about this class

How to convert bag files

  • To get a prompt on how to use the class just run

    • ./parse_bag_pytables.py or python parse_bag_pytables.py
  • For the simplest use of a single bag file you can run:

    • ./parse_bag_pytables.py _input_files:=<Location to bag file>
  • This will output to a file converted_data.h5

  • There are more flags that can be used to parse based on subsampling, directories, etc. TODO: document these flags...

How to load hdf5

There are some basic convenience functions that will help load hdf5 data in a somewhat efficient manner

To see how to call this look at file load_h5_dataset.py. There is an example of how to call the functions. You can simple import the functions in this file and call it from any python script.

To test using the command line just run load_h5_dataset.py <path to .h5 file>. It currently stops in pdb after the data is loaded into a python dictionary. To see your data, browse as you would a dictionary (e.g., data.keys())

TODO: How to call the more efficient loading functions (doesn't load entire dataset, just subsets or specified keys). Currently supported, but no documentation

Clone this wiki locally