[fix] RNG arguments for distribution samplers#822
Conversation
…m_sampler plus pass RNG instances to those samplers. This allows e.g., RNG instances with fixed seed to be used by these samplers.
astroJeff
left a comment
There was a problem hiding this comment.
Everything looks good to me
|
I approved, but note, there are a few other places where
@sgossage this last one, in particular, worries me. Can you look into it? I think it should be a quick change that can be added to this PR |
|
thanks @astroJeff , I've updated the Moe & Di Stefano sampler now with the same fix. Looking at
For the training/interpolation, we could allow the same flexibility to be consistent. Those cases seem like The GRB function is not used anywhere in the code, but could be called by a user -- we can add the ability to pass and RNG. |
Co-authored-by: Max <14039563+maxbriel@users.noreply.github.com>
This PR contains a bug fix taken from PR#797 that addresses the same issue.
We have the option to fix the RNG seed (setting a fixed
entropy), but any RNG instances with a fixed seed are not passed to several functions, meaning that orbital period and formation times can not be generated with a fixed seed in the intended way. This gives the following functions anrngargument to fix that:posydon.utils.rejection_samplerposydon.utils.inverse_samplerposydon.utils.histogram_samplerIn versions including and earlier than v2.2.6, This would affect any attempt to fix the RNG seed when the SFH scenario is not
burstand when theorbital_period_schemeis'Sana+12_period_extended'or Moe and DiStefano 17.Warning
This bumps
maintov2.2.7