imcgreer / simqso

Module for generating simulated quasar spectra
BSD 3-Clause "New" or "Revised" License
12 stars 11 forks source link

use random number seed to ensure reproducibility #17

Closed moustakas closed 6 years ago

moustakas commented 6 years ago

The random sampling that occurs in lumfun and many other places should take as an option a numpy.random.RandomState() object or an input seed, to ensure reproducibility.

Let me know if you want me to add this @imcgreer or whether you would rather. Also, this should probably happen after #15 has been merged.

imcgreer commented 6 years ago

Indeed, the code worked this way in a previous life (the v0.1 branch) and then I broke it when I rewrote things to be more flexible. It won't be too hard to restore this.

imcgreer commented 6 years ago

fixed by 5eac99d4ff42e8a782fc182db1bbb15d5cdfdd86, see updated notebooks in de13c89fc4d9deb8b2e9994772d21d3246e63d07. For generating QLF points it is possible to supply two seeds, one for sampling the QLF (qlfseed) and one for sampling the remaining model variables (gridseed). Providing both isn't required, but this allows one to reuse QLF points while modifying the SED model separately.