craiglagegit / Poisson_CCD22

Obsolete version of Poisson_CCD code
1 stars 1 forks source link

Review random number usage #6

Open dkirkby opened 8 years ago

dkirkby commented 8 years ago

Random numbers are now generated by drand48() and used to implement diffusion in Trace() and sampling of initial electron locations in TraceSpot(), TraceMultipleSpots() and TraceRegion().

This issue is to review whether a generator with better statistical properties is needed, e.g., the posix random() function or Mersenne Twister.

It would also be useful to make the initial random seed a config parameter, to allow for reproducible results. Currently, the seed is set from the time:

srand48( (unsigned int) time(NULL));