Closed nhz2 closed 4 years ago
Seems good to me. Just two things:
- What did you use to get the HDF5 CLI commands?
- I'd suggest using git lfs to store the big data files to keep the repo a little lighter: https://git-lfs.github.com/. It'll keep clone times shorter.
I think the h5dump command came with anaconda for me, but I think you can get it with brew install hdf5
on mac. The CLI is not needed to make or read the files in python or MATLAB.
HDF5 Estimator Testing File Generation
Fixes #214
Purpose
Running a whole psim MATLAB sim for estimator testing is slow. To test an estimator you only need a small subset of sensor readings and to compare that with the true value you are trying to estimate. To speed up testing I am storing this data in HDF5 files from a psim MATLAB sim or python script, so it can be used over and over again to quickly test and tune estimators in real time. HDF5 is language and machine agnostic so if I upload it to GitHub theoretically anyone can quickly open and use the data in MATLAB, numpy or some other language.
Summary of changes
HDF5 Files
HDF5 is a self-describing binary file format. Each file is composed of groups and datasets. A group is like a dictionary of other groups and datasets. A dataset is like a numpy array or MATLAB array. Each group or dataset can also have a dictionary attributes.
To look at what is in an HDF5 file use command h5dump.
h5dump estimatortest/test-files/gps-from-matlab-sim.hdf5
Will print out the entire file and the data.Using the -n flag shows the just the main structure.
The files used for estimator testing just have the root group
"/"
with two datasets:"sensors"
and"truth"
. These datasets contain the sensor data used for an estimator and the real values the estimator is estimating for each control cycle, indexed first by control cycle.For example here sensors is an array of type
H5T_COMPOUND
With data for every control cycle for 24hr and an attribute"docs"
with a simple doc string: