With the filter in place, not only is it easy to determine how much light from the moon is reaching the detector, but we may also utilize this filter visually recognize whether or not rays come from a preferential "region" of the moon. 

(Q2)  Do stray rays come from a preferential region of the moon?

Detector Object 11, as you might imagine, is not well suited to answer this question.  However, as was mentioned earlier, filter strings may also be applied to Layouts.  In the current example, open the settings of the NSC 3D Layout, and once again select the previously saved .ZRD file from the "Ray Database" pull down menu.  Displaying the entire ray database on the layout would become too crowded to perform any substantial analysis, so we will apply an appropriate filter in a moment. 

It is important to note that filter string flags may be used alone, or they may be combined using logical operands.  Some of the more common logical operands include: "&" (Logical AND), "|" (Logical OR), "^" (Exclusive OR), and "!" (Logical NOT).  This is extremely useful when filtering for rays with multiple specific properties. 

To demonstrate, let's filter for rays which still originate from the moon AND which reach the camera.  Note that although the second portion of the string was not necssary when viewing the results from the Detector Viewer, we must explicitly add this flag to the string in the layout.  Otherwise, all rays from the moon will be displayed, whether they reach the detector or not.  To represent the second argument, the "Hn" flag may be used.  The "Hn" flag represents rays which hit object n

Applying Filter to Layout

The filtered NSC 3D Layout in this case does not really indicate that rays come from a preferential region of the moon.  As expected, rays within the center region of the Source Ellipse do not make it to the detector since they are blocked by the secondary mirror and the baffle surrounding this secondary.  Since the number of rays which "pass" the filter is so large, and since ZEMAX must re-evaluate the filter each time the plot is rotated, it is difficult to glean any productive, additional information from the layout in the current sample file.  Nevertheless, this methodology can certainly prove to be useful in other circumstances.

Filtered Rays in NSC 3D Layout