When generating events for a flavour/channel combination, the random seed is set to args.randomseed + random.random() to ensure every combination uses a different random number seed. However, in gen_evts, since np.random.seed() must be seeded with an int, it uses int(args.randomseed + random.random()), which is simply equal to args.randomseed. In other words, all flavour/channel combinations use the same random seed for np.random, which is then used to generate a number of events per time bin.
This is usually not an issue—sntools’ randomness does not need to be cryptographically secure so re-using the same seed is okay. However, in cases where different flavours interact in a channel with the same flux and cross section (e.g., c12nc-x and c12nc-xb), this leads to both having the exact same number of events.
When generating events for a flavour/channel combination, the random seed is set to
args.randomseed + random.random()to ensure every combination uses a different random number seed. However, ingen_evts, sincenp.random.seed()must be seeded with an int, it usesint(args.randomseed + random.random()), which is simply equal toargs.randomseed. In other words, all flavour/channel combinations use the same random seed fornp.random, which is then used to generate a number of events per time bin.This is usually not an issue—sntools’ randomness does not need to be cryptographically secure so re-using the same seed is okay. However, in cases where different flavours interact in a channel with the same flux and cross section (e.g.,
c12nc-xandc12nc-xb), this leads to both having the exact same number of events.