Option: Monte-Carlo integration

If for some reason the midpoint of a detector pixel is not representative for the average scattering intensity of the entire pixel it is possible to resort to Monte-Carlo integration.

To request Monte-Carlo integration over detector pixels, use

simulation.options().setMonteCarloIntegration(True, n, seed=0)

where n is the number of scattering intensity evaluations per pixel, and the optional seed determines the random sample. Each detector pixel uses a fresh mt19937 generator seeded with seed, so that results are reproducible and independent of the number of threads. The GSL environment variables GSL_RNG_TYPE and GSL_RNG_SEED have no influence.

Example: Monte-Carlo.