On 15/12/2015 01:23, Steven Franke wrote: > Hi Bill and Joe - Hi Steve, > > As it turns out, the random number stuff in jt65sim is a bit confusing. Agreed! > > For the Gaussian random noise that is used to set the SNR for simulated data > we call the C routine gran.c which, in turn, calls the C random number > generator rand(). > > For the random envelope simulation (the Rayleigh fading) we use the Fortran > intrinsic routine “random_number()”. > > So, to ensure that we get a unique set of random numbers for both the noise > and the fading, I think that we’d need to call both the C and Fortran > versions of init_random_seed. Since we have two different routines with the > same name (init_random_seed.f90 and init_random_seed.c), I am confused about > how to do this… That's no problem. I have changed the C wrapper sgran_() to do the C library PRNG seeding so where gran() is used in Fortran the main routine of the program should call sgran to seed the C library PRNG. > > For the record - what is happening currently is that the Gaussian random > noise is the same for every invocation of jt65sim, but when fspread is > nonzero the Rayleigh fading function is different each time the program is > run. That is because sgran was not being called, should be OK now. > > Steve k9an 73 Bill G4WJS.
------------------------------------------------------------------------------ _______________________________________________ wsjt-devel mailing list wsjt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wsjt-devel