# Criterion Function

Criterion Function — MC Grating documentation for Modal Collinear and Modal Conical and Chandezon Collinear and Chandezon Conical. The Optimization…

Canonical: https://mcgrating.com/docs/common/criterion.html


Written by Nikolay M. LyndinLast revised 2012-12-18

This documentation was written for releases up to 2018 and is being revised. Some dialogs have changed since. If something does not match what you see, write to [mc@mcgrating.com](mailto:mc@mcgrating.com).

The Optimization procedure objective is the minimum mean-square deviation of the user defined values assigned in the *Criterion Function* from the calculated values. The user can construct this function in the form of a number of (***Number of Points***) completely independent criterion points. The ***Point*** control provides the possibility to select the criterion point index. By clicking the mouse right button at this control the user activates the *Popup Menu* for editing the criterion points.
 There are two types of *Criterion Function* i.e. one for the diffraction efficiencies and one for the angular resonance positions of the modes of the structure. The choice depends on the state of the ***Optimization Type*** control (available only in collinear versions).
 In the first type of *Criterion Function* every criterion point targets the assigned power of the given diffraction order (edit control ***Value***) with the ***Weighting Factor*** of this criterion point within the whole criterion function and its characteristics (***Diffraction Order*** and ***Cover/Substrate*** propagation). In the conical mount version there is an additional criterion point characteristic – ***Output Polarizer*** and its orientation (edit control ***Angle***). All these characteristics are placed in the ***Criterion Diffraction Order Power*** panel. The right hand ***Criterion Arguments ***panel contains other parameters. These arguments are: the polarization type, the incident conditions (***Angle*** or ***Normal Angle*** and ***Plane Angle*** in the conical mount version) and the ***Wavelength*** and the grating ***Period***. The edit controls of the corresponding ***Variable*** parameters are inactive.

During the ***[Optimization](https://mcgrating.com/docs/common/optimization.html)*** process these two panels are inactive, but at the bottom of the left panel under the label ***Current Power Value*** the user can see the updated every second power of the appropriate diffracted wave. In addition this information will be updated every time the user changes the criterion ***Point*** index.
 In the second type of* Criterion Function* every criterion point targets a set of assigned angular resonance positions (the latter corresponds to the maximum resonant reflection in the cover or to the maximum mode excitation). The cover refractive index in the ***Criterion Arguments ***panel is an additional parameter for this type of *Criterion Function*.

**Note** During the ***[Optimization](https://mcgrating.com/docs/common/optimization.html)*** process the asterisk may appear at the right of the *Point* label. This means that for this point an iteration number in resonance position search exceeds the limit. In that case the advice is to try for this criterion point an alternative ***Resonance Type*** search.

From the in-application help of Modal Collinear and Modal Conical, documented through 2018. If you publish results computed with MC Grating, see [how to cite it](https://mcgrating.com/references.html#cite).
