# Analysis Surface Ray Filters

### Ray Selection Filter Basics

Analysis Surface Ray Filters provide a method for sorting through rays and establishing a set of criteria which must be met in order for a ray to be included in the operation being performed (e.g. Irradiance calculation, Spot Diagram).

The video and example file below describe the basic principle behind Ray Selection Filter Criteria.

Example file: RaySelectionCriteria.frd

### How Ray Selection Criteria are Evaluated

Ray filters can be specified in the ray selection list by right mouse clicking and choosing an appropriate option; cut, copy, paste, delete, edit, insert or append. The specific ray filters are logical operations that evaluate to either TRUE or FALSE on a given ray. Additionally, there is no parenthetical grouping of the ray filters, so they are evaluated sequentially in the list.

Consider the following examples in which a ray selection criteria list consisting of three filters is applied to a single ray. The ray selection criteria list is shown on the left and its logical application to the single ray is shown on the right. In the top example the serial evaluation of AND-AND-OR results in TRUE, meaning that the ray passes the selection criteria and is included in the analysis or operation. In the bottom example the serial evaluation of AND-AND-AND results in a FALSE, meaning that the ray does not pass the selection criteria and is not included in the analysis or operation.

Internally, each ray maintains an association with a node in the system model. Typically the node will be a source or surface.

One of the most common ray filters applied in the Ray Selection list is “Rays on the specified surface”. This ray filter applies the criteria that rays must be associated with a user-specified surface node in order to evaluate to TRUE. Commonly this means rays that have been halted or absorbed at this surface by the end of the raytrace.

### Analysis Surface Drag and Drop Assignment

A convenient way to set the Ray Selection Criteria for an Analysis Surface is to drag and drop the Analysis Surface directly onto the surface node of interest in the object tree. This automatically moves the Analysis Surface to the same location as the surface and sets the filter so that the analysis surface will consider "Rays on the specified surface" automatically.  As seen in the images below, Analysis 1 is dragged and dropped onto Geometry.TestSurfaces.LeftSurface in the object tree.  When the Analysis 1 dialog is re-opened, the Ray Selection criteria is automatically set to consider rays on surface Geoemtry.TestSurfaces.LeftSurface.