Looping Through Raypaths
FRED has many tools for helping the optical engineer determine the contribution and causes of stray light in an optical system including the Image Artifact Diagnostic Tool and the Stray Light Report. The Stray Light Report, for example, provides a detailed report of system scatter and ghost paths, including number of rays in path, percentage of reference power, ray path power and scatter / ghost surfaces.
However, the FRED user might need to expand this functionality and automate diagnostics. This example script shows how to loop through each unique raypath, and for each one that ends up on the detector, calculate the Irradiance and return the peak power value. This will provide the FRED user with information about which paths cause localized “hot spots” – information that can’t be specifically obtained by looking at the total power value for that path.