A nice enhancement of the code would be to be able to set the seed of random number generators. That would allow to reproduce the "noise" of a measurement. That is e.g. helpfull when running jobs on a cluster that all should work with the same measurement.