Critical and Illuminated Objects

A common task within a Stray Light Analysis is to compile a list of the critical and illuminated surfaces within the system, as these often form the largest proportion of the initial stray light contribution. This article demonstrates how to use scripting to identify critical and illuminated objects within your system using an example of a simple telescope.



Download the FRED file: CriticalAndIlluminatedObjects.frd


Example


The FRED file is already set up with an object source ("Iilluminated Object Source") for the forward trace, and a detector source ("Detector Emitter") for the reverse trace. All that is left to do is perform the forward and reverse trace and find out the list of surfaces intersected on both, this is done by the embedded script.


The script contains four subroutines:

MakeKeywords - Checks for the existence of keywords to tag the critical, illuminated, and critical and illuminated surfaces. If the key words do not exist, they are created.

TraceAndIdentify - Takes an argument for a sourceID and an array. Traces the sourceID sent to it then loops over all surfaces and, where the incident surface power is > 0, writes the surface power value to the array. The array index follows the FRED node number and so any non-zero values for a given array index represents an surface intersection for the same node number.

AssignKeyword - Takes an argument for an array and a KeywordID. Loops over all the entries in the array and, where the value (surface power) > 0, assigns the given keyword.

CompareAndReport - Loops over all the node numbers (Index follows the node number) and where the value is > 0 in both arrays, the surface is printed to the output window and has the 'Critical and Illuminated Object' keyword applied.


The Script:

  • Calls the MakeKeywords routine once.
  • Calls the 'TraceAndIdentify' subroutine twice, first with the "detector emitter" for the the reverse trace, then again with the with the "Illuminated Object Source" for the forward trace.
  • Calls the 'AssignKeyword' routine twice, first on the array of critical objects, then on the array of illuminated objects.
  • Calls the 'CompareAndReport' function once.

Still need help? Contact Us Contact Us