fnSmoothTimeLine
- Create a smooth timeline
Function to create a smooth timeline where all values after a maximum time are constant, i.e., equal to the previous interval, to avoid crazy looking plots from the prior.
fnSmoothTimeLine(
Real maxTime,
RealPos[] times,
RealPos[] values)
maxTime : |
Real (pass by const reference) |
| The maximum time after which we smoothen the timelime out. |
times : |
RealPos[] (pass by const reference) |
| The times at which the values change. |
values : |
RealPos[] (pass by const reference) |
| The values for each time bin. |
Thus function takes a vector of values and a matching vector of times and a maximum time. Then, it constructs a smooth timeline by using all values before the maximum, and replacing all values after the maximum with the last value before the maximum. Thus, the timeline is smooth after the maximum.