A ray trace may be performed, in which the results are saved to a ray database file:

Running a ray trace and saving the results to a ray database file

This file is used to filter the ray data that is obtained from the Detector Viewer. Specifically, we are only interested in those rays which do not undergo bulk scattering. The filter string “!B2” can be used to isolate such rays:

Viewing ray database results in the Detector Viewer

The total number of rays which do not undergo scattering and hit the detector is about 36800 (the actual number will vary for any given ray trace):

Results for "unscattered" rays at 0.55 microns

(When the filter is applied, all of the associated rays only strike the center pixel of the detector, which is why emission is not seen elsewhere). According to the equations given in the previous section, when the length of the volume equals the input mean free path and the source wavelength is the same as the reference wavelength – as they are in this case – the fraction of unscattered rays is 0.368. In this test 100,000 rays were launched towards the volume, so we would expect 0.368*100,000 = 36800 rays to pass through the volume without undergoing scattering. This is indeed the case!

Since the mean-free path for scattering varies with wavelength, the fraction of unscattered rays will also vary with wavelength. For example, if the input mean free path is 1.0 mm at a reference wavelength of 0.55 mm, then at a wavelength of 0.65 mm the actual mean free path is 1.95 mm. If the length of the volume is still 1.0 mm, then the fraction of unscattered rays is e-1.0/1.95 = 0.599. For 100,000 source rays, the number of rays which pass through the volume without scattering should be 59900.

If we change the system wavelength (= source ray wavelength) to 0.65 mm, and re-run the ray trace (making sure to save the results to a .ZRD file, so that a filter string may be applied in the Detector Viewer), we find that the number of rays which pass through the volume unscattered is about 60000:

Results for "unscattered" rays at 0.65 microns

The actual number will vary from ray trace to ray trace, but in all cases the agreement with the expected value is excellent (within < 1%). This has been confirmed for multiple values of l and L, indicating that the wavelength variation of the Rayleigh model is correctly implemented in the DLL.