General How To

What are filter strings and how to use them?

Relating to: Non-Sequential Ray Tracing Scattering

Filter strings are a tool to control which Non-Sequential Mode rays are saved, displayed, or calculated. In NSC mode, rays can arrive at any given point from many faces, sources, objects, etc. For example, it can be difficult to understand how rays from a particular surface (such as in ghost analysis) are affecting the measurement result on a detector. With filter strings, you can analyze different ray contributions and make sense of a messy model.

The filter string itself can be a combination of filters that specify whether a ray hit, miss, reflected, refracted, scattered, diffracted, or ghost reflected from an object within the NSC group (or multiple objects). The filter string can be as simple or as complex as needed and can include logical operators and numerical arguments.

There are several locations you can use a filter string in NSC mode:

  1. To filter the rays saved to the ZRD file during a ray trace:

     

  2. To filter rays on a detector (when using a ZRD file):

     

  3. To filter rays in the 3D Layout:

     

  4. To filter rays shown by the Ray Database Viewer:

     

To better understand the string structure and meaning, it’s best to look at an example. In this filter string, the rays must have HIT Object 7 AND HIT Object 9 AND NOT REFLECTED from Object 6 OR the rays must have MISSED Object 15.

(H7 & H9 & !R6) | M15

For detailed information on the syntax and operators, please see the Help File: The Setup Tab > Editors Group (Setup Tab) > Non-sequential Component Editor > Non-sequential Overview > The Filter String.