xopto / pyxopto

PyXOpto is a collection of python tools for performing Monte Carlo simulations of light propagation in turbid media.
GNU General Public License v3.0
30 stars 8 forks source link

Fixing the seed of random number generator in MC simulation #18

Open ImanKafian opened 10 months ago

ImanKafian commented 10 months ago

Hi,

I am running a MC simulation to estimate the reflectance and transmittance from a 3D slab with low number of photons (100K). I would like to know how I can fix the seed value of the random number generator in MC object to simulate exactly the same reflectance and transmittance whenever I perform the MC simulation.

Thanks.

xopto commented 10 months ago

Set the value of the "rnginit" parameter in the Mc constructor to a fixed unsigned integer value/seed. https://xopto.github.io/pyxopto/docs/html/apidoc/xopto.mcml.mc.html