interpolation curve - ruby
Posted: Wed Feb 09, 2022 11:51 am
Apparently in the meantime, I'm attempting to do a small spectral analyzer for HRV data from wearables.
I encountered a problem for now. While I know how to do this roughly, using standard resample primitive and some iterative looping, I think this isn't the most effective nor best idea. Doing this via ruby would be probably better.
Normal FS graphs are based on equi-distant approach of data points. From HRV data - points are not equally spaced (RR intervals, i.e. peak-to-peak time distances) on the horizontal axis, and thus, the whole thing must be displayed (tachogram) and reinterpolated a bit differently.
So the case is.
A ruby graph, that plots datapoints array at (x,y) coordinates, and smooth point-to-point curve through them.
That would solve the tachogram display/visual part.
(I think I saw something like this on the forum, but I can't find it anymore.)
The other part would be, to output new (equi-distant) data, at given array size from this interpolated graph.
Does anyone have something like this?
Ruby gurus?
Thanks in advance.
I encountered a problem for now. While I know how to do this roughly, using standard resample primitive and some iterative looping, I think this isn't the most effective nor best idea. Doing this via ruby would be probably better.
Normal FS graphs are based on equi-distant approach of data points. From HRV data - points are not equally spaced (RR intervals, i.e. peak-to-peak time distances) on the horizontal axis, and thus, the whole thing must be displayed (tachogram) and reinterpolated a bit differently.
So the case is.
A ruby graph, that plots datapoints array at (x,y) coordinates, and smooth point-to-point curve through them.
That would solve the tachogram display/visual part.
(I think I saw something like this on the forum, but I can't find it anymore.)
The other part would be, to output new (equi-distant) data, at given array size from this interpolated graph.
Does anyone have something like this?
Ruby gurus?
Thanks in advance.