How many rays do you need?

Navigation:  Simulation options >

How many rays do you need?

Previous pageReturn to chapter overviewNext page

Solving problems by optical ray-tracing involves some randomness - consequently there is noise in the results. The following graph shows an example: The same SPRAY simulation has been repeated 50 times, and the chart shows the detected fraction obtained with 100 and 100000 rays:

 

 

Obviously, working with more rays reduces the noise and increases the quality of the result. In most cases you can work with the following simple relations to get an idea of the noise in your SPRAY results.

Suppose you work with N rays/spectral point, and on the average a fraction f of the emitted rays reach the detector. Then the amplitude of the noise is about

In the example shown above f is about 0.24 and the expected noise amplitudes are Δf = 0.049 for N = 100 and 0.00155 for N = 100000. For comparison, the standard deviation of the 50 experiments in the case of 100 rays is 0.04122, for 100000 a value of 0.00126 was found. These numbers are in rough agreement with the noise amplitudes given by the simple formula above, and also with the 'experimental' results.