[Camino-users] Rician noise seed in datasynth

Philip A Cook cookpa at mail.med.upenn.edu
Mon Mar 31 09:04:24 PDT 2014


Hi,

The -seed option expects a 32 bit integer. The underlying algorithm is the Mersenne Twister, which according to Wikipedia can have problems with similar seeds:

http://en.wikipedia.org/wiki/Mersenne_twister

"It can take a long time to turn a non-random initial state—particularly an initial state with many zeros—into output that passes randomness tests. A consequence of this is that two instances of the generator, started with initial states that are almost the same, will output nearly the same sequence for many iterations before eventually diverging."

I haven't tested this, but I avoid using seeds like 0, or integer powers of 2. If I need to record results I use consecutive primes, or random numbers over a large range (say 10,000 through 1,000,000,000).

-snr itself won't change the random output, it will just scale the random noise by a larger or smaller number. To get different noise, you need a different seed. 

On Linux, you can get random integers from the system with $RANDOM. I wouldn't use these directly but some function of multiple randoms might be sufficient. For example,

seed=$(( $RANDOM + $RANDOM % 3061 + $RANDOM * 4297))

If you're distributing jobs on a cluster, be careful to avoid duplicate seeds. You can try something like adding a constant based on the hostname to your random seed:

  hostHash=`echo $HOSTNAME | md5sum`   
  hostNumber=$( printf "%d" 0x${hostHash:27:5} )



On Mar 31, 2014, at 10:39 AM, Andrés Méndez <andres.mendezg at gmail.com> wrote:

> Hello, I'm trying to simulate a variety of voxels with compartment models using datasynth. I have noticed that I need to specify a different noise seed (-SNR   -SEED)  to ensure diverse results among similar simulations. The documentation doesn't really elaborate what kind of seed it must be, or, for example, the interval. I tried using a random seed in the interval (0,1) but seems that it expects an integer as an argument.  
> 
> Could you please tell me how the seeed should be specified? (specially the type and interval.
> 
> Thanks
> 
> Andrés
> 
> 
> _______________________________________________
> C. Andrés Méndez G.,   Postdoctoral Research Fellow
> Department of Computer Science, University of Verona
> Ca' Vignal 2 - Strada Le Grazie 15,  37134 VERONA - Italy
> Tel. +39 045 802 7803
> 
> _______________________________________________
> Camino-users mailing list
> Camino-users at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/camino-users



More information about the Camino-users mailing list