Hello,
at the moment I am working on the interpolation feature of pyMdfParser.
With that feature it is possible to perfomr calculations with signals that were measured in different sample times.
I have implemented the following concept:
Added a module mdf_operations with a class MDFOps and an interpolation method "interp".
Interface of "interp": A signal list and a desired interpolation rate.
"interp" determines the latest starting time points and the earliest stop time of all time vectors of the signals given in the signal list.
Then a new time vector wit the given sample rate is generated between these time boundaries.
Then the data vector of all signals given in signal list are interpolated to this new time vector.
Interpolation is done by bisectioning followed by a simple linear interpolation.
For each interpolated signal a CNBlock object is instantiated and added to the cn_blocks attribute of a CGBlock object.
This CGBlock object is returned to the caller of "interp".
In order to have a good usablilty the CGBlock class had to be enhanced:
The "add" methods does everything to add a CNBlock object to a CGBlock object.
E.g. build the hashtable append the signal name to a signal list.
get wirks in the same way as the get methods of MDFParser class but on CGBlock level.
As usual I am open for hints a improvements ....
Regs
Marcus