Resolve "Add caching of the `generate_posterior_sample_from_marginalized_likelihood` method"
This closes #569 (closed) and also fixes a number of other issues which popped up at the same time:
- Closes #569 (closed) the reconstruction is now cached
- The
normalize_constraint_factoris not deterministic and changed between runs. This addresses this by calculating an average and rounding. - The
check_probandcheck_ln_probmethods where missingratiofactors for floats - Cleans up the
cached_resultbehaviour: if the cache result exists, it is loaded and repeated steps are avoided - Remove the prior check from the cache file calculation: this always fails for marginalized runs because the prior gets dynamically updated. The behaviour now means that if a use changes the prior and re-runs, the cached file will be used. However, this should be fairly obvious to the user while the alternative: rerunning and slightly changing results is more problematic.
- Simplify
samples_to_posterior: move the check outside the function
Edited by Gregory Ashton