Add Timeseries % get_value_at_time

The problem

As a user, I often want to get values at a particular time. It is silly that currently in libfgen, you have to work out the time yourself to get the right index, then access values, to do the retrieval.

Definition of "done"

  • Add a get_value_at_time method to Timeseries

Additional context

We want this to differ from interpolation (#44 (closed)). This method should just return the value if the requested time is in self % time % values and raise an error otherwise. In other words, it should be a short-cut compared to creating a full interpolator. We will need to be a bit careful to ensure that the logic of next/previous is matched here.