a script to convert between .csv files and python List objects, and resample time based .csv files at a different frequency.
More...
|
| def | csvResampler.resampleCSV (file, newFile, timeCol=0, timeStep=0.1) |
| | Resample a time based .csv file at a different frequency. More...
|
| |
| def | csvResampler.writeCSV (file, data) |
| | A method to write a nested List object to a .csv file. More...
|
| |
| def | csvResampler.readCSV (file) |
| | A method to load a .csv into a nested List object. More...
|
| |
| def | csvResampler.searchInterp (data, target, searchCol=0) |
| | A method to search a nestested List object for a given value using interpolation. More...
|
| |
| def | csvResampler.linInterp (x, x1, y1, x2, y2) |
| | A method to linearly interpolate between two points. More...
|
| |
a script to convert between .csv files and python List objects, and resample time based .csv files at a different frequency.
This script is used to create downsampled .csv reference motion profiles to be read by the controller task running on the Nucleo, controller.Controller. This script does not run in sequence with any of the other nucleo or user interface tasks, and is designed only for pre-processing the reference profile data before copying to the Nucleo.
Although this script was only used to downsample one very specific reference profile, it is designed to be general, and can up or downsample any .csv file with at least one ordered time column and any number of rows and columns using linear interpolation. Link to source code: https://bitbucket.org/ebriefer/me305_lab/src/master/Final%20Project/csvResampler.py
- Author
- Eliot Briefer