Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add random seed argument for CTA simulations #1092
Just for context: this is a small change to (hopefully) make the examples at https://github.com/gammapy/icrc2017-gammapy-cta-egal fully reproducible.
In 843868f I've changed the argument name from "seed" to "random_state" for consistency with other functions in gammapy: http://docs.gammapy.org/en/latest/development/howto.html#random-numbers and changed the test for this functionality to assert that really the simulation result always is the same.
@jjlk - I'll merge if tests on travis-ci pass and also update all results files in https://github.com/gammapy/icrc2017-gammapy-cta-egal to have a fixed seed now.
I updated the examples in https://github.com/gammapy/icrc2017-gammapy-cta-egal