[WIP] Reference density state

This is a first idea of how a reference density implementation for different approximations could work.
It may be more accurate to extrapolate it linearly from the last two data points. I don't think it will make much of a difference, but it's easy to do.