set_seed() in netstim

NMODL and the Channel Builder.
Post Reply
tzahid1
Posts: 2
Joined: Mon Jun 25, 2007 2:54 pm

set_seed() in netstim

Post by tzahid1 »

I wanted to know what the function of set_seed(x) in the NetStim.mod is. What does it use to set the seed and how it does it. Also, would be possible to change the seed in the command window so that I get a different output if I wish, or would I have to write another mod file with some modifications.

Thanks.
ted
Site Admin
Posts: 6398
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

set_seed() uses its argument to seed the pseudorandom sequence generator that governs
its ISIs when noise is nonzero. If no seed is specified, a default value of 1 is used.

set_seed() is not callable directly from hoc, so it is wrapped inside PROCEDURE seed(),
which is hoc-callable. The hoc syntax for calling seed() follows the standard
objrefname.publicmembername(arglist)
syntax for invoking a public member of an object. You should test the effect of the seeds
you plan to use. Calling seed() affects the event streams generated by all NetStims.
Example:

Code: Select all

objref foo
foo = new NetStim()
foo.seed(0.3)
tzahid1
Posts: 2
Joined: Mon Jun 25, 2007 2:54 pm

Post by tzahid1 »

thank you very much Ted.
Post Reply