A GaussNoise node may be instantiated by specifying the mean (default is 0), standard deviation (using the `stddev' keyword, default is 1.0), and a seed value (default is to use the system clock)
Here are some examples:
ns['noise1'] << Meq.GaussNoise(stddev=0.1) ns['noise2'] << Meq.GaussNoise(stddev=0.2) ns['noise3'] << Meq.GaussNoise(1.0, stddev=0.3, seed=154321) ns['noise4'] << Meq.GaussNoise()
Note: The ns['noise3'] node is instantiated with a mean of 1.0, a stddev of 0.3 and a seed of 154321.
The MeqTree random number generators use the Blitz++ random number generators. By default, all Blitz++ random number generators share the same underlying integer random number generator. So seeding one generator will seed them all. (Blitz++ can create separate generators with their own internal state, but at present MeqTrees does not use this option.) You should generally only seed a random number generator at the beginning of a program run. Note that each of the above GaussNoise nodes that do not have a seed value explicitly specified will seed the random number generator from the system clock. So we have tried to seed the underlying integer random number generator four different ways, and its not clear which of the above nodes will be the last one to do so. If you want to be sure that the system is specifically seeded with a seed of 154321 you would be better off to do something like
for i in range(4): ns.noise(i) <<Meq.GaussNoise(seed=154321)
