klabhub / neurostim

Design and run visual neuroscience experiments using Matlab and the Psychophysics Toolbox.
MIT License
4 stars 3 forks source link

control rdp random number seed #214

Open dshimaoka opened 1 year ago

dshimaoka commented 1 year ago

I'd like to add an option to control the random number generator. This will enable to 1) realize the same dot pattern across trials 2) realize the same dot pattern across different rdp instances, presented at once

cnuahs commented 1 year ago

The rdp stimulus is lagging best practice a bit. Have a look at the addRNGStream() plugin method, and the RNG machinery provided by cic. There is some support there for reserving a random number stream for a stimulus, and for (re-)seeding a stream to recreate a previous stimulus sequence. You can see how this is done in the noiseclut stimulus.

You might also be interested in the newdots branch (https://github.com/cnuahs/neurostim/tree/newdots) where we have done some work to improve this aspect of the dot stimuli, inc. reconstruction etc.