Abstract

As the primary requirement, correctly implementing and controlling random number generation is vital for a range of scientific analyses and simulations across astronomy and planetary science. Beyond advice on how to set the seed, there is little guidance in the literature for how best to handle pseudo-random number generation in the current era of open-source astronomical software development. We present our methodology for implementing a pseudo-random number generation in astronomy simulations and software and share the short lines of python code that create the generator. Without sacrificing randomization at run time, our strategy ensures reproducibility on a per function/module basis for unit testing and for run time debugging where there may be multiple functions requiring lists of randomly generated values that occur before a specific function is executed.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.