AstarVienna / ScopeSim

A telescope observation simulator for Python.
GNU General Public License v3.0
16 stars 10 forks source link

Improve Random Number Generation in ScopeSim #298

Open hugobuddel opened 1 year ago

hugobuddel commented 1 year ago

The Random Number Generation (RNG) is a bit messy in ScopeSim. See for example #295 and #97.

The idea behind this issue is to collect what we need from the RNG.

I'll go first.

teutoburg commented 1 year ago

I'll go next:

I recently noticed that numpy recommends using np.random.Generator for new development. AFAIK, we're using the legacy random functions most everywhere. While I didn't consider it a priority at the time I found out about this, I think if (when) we're already touching the random stuff, it might be worth migrating to the new style, which numpy claim has performance benefits, as well as quality of the "randomness" and handling. Maybe some of the changes we want to implement anyway will become easier to manage with this.