Updated functions; fine tuning.
Updated function.
Code similar to spec estimate, but sampling the model to mimic
observations.