Since I changed the PRNG, the correct way to use a random seed is to pass seed=None to MCRun.__init__. However, this introduced a bug for Pythia8, which is the only generator that is currently not using the Numpy PRNG. None in this case was directly forward to the Pythia config, which failed since it cannot handle that value. This patch fixes the issue. Pythia8 now gets the seed which Numpy generates when seed=None is used.
I also fixed a related bug, which affects all models. If seed=None was used, MCRun.seed also incorrectly returned None. This is not intended behavior, we want to know the seed that was actually used even if we do not specify it, so that we can reproduce the output of the generator. I changed the seed property in MCRun now so that the actual seed is returned that Numpy generated when seed=None is used.
@afedynitch Thanks for the approval. I just made some last minute optical changes and merged the changes in main. I will squash and merge once the tests succeed.
Since I changed the PRNG, the correct way to use a random seed is to pass seed=None to
MCRun.__init__
. However, this introduced a bug for Pythia8, which is the only generator that is currently not using the Numpy PRNG.None
in this case was directly forward to the Pythia config, which failed since it cannot handle that value. This patch fixes the issue. Pythia8 now gets the seed which Numpy generates whenseed=None
is used.I also fixed a related bug, which affects all models. If
seed=None
was used,MCRun.seed
also incorrectly returnedNone
. This is not intended behavior, we want to know the seed that was actually used even if we do not specify it, so that we can reproduce the output of the generator. I changed the seed property inMCRun
now so that the actual seed is returned that Numpy generated whenseed=None
is used.