[Gate-users] manually set random seed

Maxime Moisan maxime.moisan at etudiant.univ-rennes1.fr
Wed Jun 27 12:10:46 CEST 2007


Hi,

I have made a test because I didn't know what happens when you have  
several time-slices.

If you have a file seed.rndm containing the number 17, and if you want  
to simulate a SPECT scan of 128 projections, the  
"/random/resetEngineFrom seed.rndm" command will start the number  
generator from 17 for the first projection, but also for the other ones.

Assuming rotational symmetry and time invariance, I think you will  
obtain 128 identical projections.

I don't know how to set the seed for each projection, I'm sorry.

Good luck,

Maxime





Quoting Daniel Woodsworth <danieljw at phas.ubc.ca>:

> Hi,
>
> Maxime- thanks for your reply. I have a remaining question. Will what you
> suggested set the seed of the random generator once, at the beginning of a
> simulation? Or will it set the seed at the beginning of each run (ie. time
> slice/projection)?
>
> Suppose I am simulating a SPECT scan of 128 projections. Suppose I have a
> file seed.rndm containing the number 17. Will /random/resetEngineFrom
> seed.rndm start the random number generator from 17, once, at the
> beginning of the simulation, and then carry on as in a normal simulation
> (ie. no seed specified): taking the seed of the random number generator
> from the last run? Or will each projection start with a random sequence
> seeded at 17, thus giving me (assuming rotational symmetry, and time
> invariance) 128 identical projections? What I am hoping for is a way to
> achieve the former.
>
> What I am trying to do is run multiple simulations (with identical
> geometry, activity, physics, digitizer etc.) and just manually change the
> random number sequence of the overall simulation, in order to get
> different results for the same physical set up.
>
> Thanks for any help.
>
> Daniel
>
>> Hi Daniel,
>>
>> To set the seed of the random generator, you have to create a new text
> file in your job directory, for example seed.rndm, in which you write
> the seed of your choice.
>>
>> After, you have also to write the following line in your macro:
>> /random/resetEngineFrom seed.rndm
>>
>> I hope it will help you.
>>
>> Maxime
>>
>>
>> Quoting Daniel Woodsworth <danieljw at phas.ubc.ca>:
>>
>>> Hi,
>>> Is it possible to manually set the seed of the random number generator in
>>> GATE?
>>> Ie. is there some command
>>> /gate/some_word/setRandomSeed 55
>>> Thanks for any help.
>>> Daniel Woodsworth
>>> _______________________________________________
>>> Gate-users mailing list
>>> Gate-users at lists.healthgrid.org
>>> http://lists.healthgrid.org/mailman/listinfo/gate-users
>>
>>
>>
>> _______________________________________________
>> Gate-users mailing list
>> Gate-users at lists.healthgrid.org
>> http://lists.healthgrid.org/mailman/listinfo/gate-users
>>
>
>
>
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.healthgrid.org
> http://lists.healthgrid.org/mailman/listinfo/gate-users
>






More information about the Gate-users mailing list