Controlling randomization in astronomy simulations

Megan E. Schwamb, Jeremy Kubica, Mario Jurić, Drew Oldag, Maxine West, Melissa DeLucchi, Matthew J. Holman

Research output: Contribution to journalArticle

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.
Original languageEnglish
Article number25
JournalResearch Notes of the AAS
Volume8
Issue number1
DOIs
Publication statusPublished - 19 Jan 2024

Fingerprint

Dive into the research topics of 'Controlling randomization in astronomy simulations'. Together they form a unique fingerprint.

Cite this