Script tracing different source wavelengths

This knowledge base article demonstrates an example of how to automate an analysis of which is dependent on a source’s wavelength specification. The setup is a ray bundle incident on a linear grating at some non-zero angle. The diffracted beam reflects from the grating and is absorbed by a detector surface.  In the script, the goal is to perform the following tasks:

  1. Modify the source wavelength
  2. Trace the current configuration
  3. Calculate the irradiance on the detector surface
  4. Repeat steps 1) – 3) for a range of wavelength values

In this implementation the irradiance results are stored in analysis results nodes on the object tree, each uniquely named for the wavelength to which the results correspond. 

If the intent is to loop over many wavelengths, the user may choose to modify the script so that results are written to a data file on disk rather than being stored in memory on the object tree. Once the script is finished running, the user can right mouse click on any of the ARN’s and choose either “Display in Chart” or “Display in Visualization View” in order to review the results.

sourceWavelengthAnalysis.frd

Still need help? Contact Us Contact Us