jfkcooper / HOGBEN

Experimental design in neutron reflectometry using the Fisher information.
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

ENH: SimulateReflectivity reproducibly #120

Open andyfaff opened 2 months ago

andyfaff commented 2 months ago

Adds the possibility to supply a Generator to the SumulateReflectivity.simulate method, allowing it to act reproducibly.

andyfaff commented 2 months ago

If the rng isn't supplied the default it to use the global np.random.RandomState singleton, which should allow back compatibility. Using the default RandomState object is not recommended usage.