memilio
memilio copied to clipboard
Combine functions for real initialization of LCT and IDE model
The scheme for interpolating real data is the same for the IDE and the LCT model. Maybe we can define a central function that can be used by both initialization functions.
In both cases you are writing the interpolated values in a vector, irrespective if this is calculated for compartments or flows. The offset is calculated with respect to times and in the calculation you multiply entry.num_confirmed with e.g. (time - floor(time)) and then there is some scaling with scaling factors and some probabilities. So I do think that it is possible to write a generalized interpolation function (for these four if statements) and that it would make sense to write this. I don't think this needs to happen in this PR but it could be another issue.
Originally posted by @annawendler in https://github.com/SciCompMod/memilio/pull/952#discussion_r1580957068