# Variable Parameters

Variable Parameters — MC Grating documentation for Modal Collinear and Modal Conical and Chandezon Collinear and Chandezon Conical. A checked box means that…

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


Written by Nikolay M. LyndinLast revised 2013-05-27

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).

A checked box means that the corresponding parameter (*Wavelength, Period, Angle *(*Normal Angle *and *Plane Angle *in the conical mount version)) will be varied to optimize the ***[Criterion Function](https://mcgrating.com/docs/common/criterion.html)***. It also means that the user can edit the above variables as the starting optimization parameters. If a box is not checked these edit controls are inactive and display the current *criterion point arguments* values during the optimization. The above parameters can be set as variable only if the *Criterion function* has the same parameter value for all *Criterion points*.
 The user can check the structure parameters under optimization by way of ***Settings Dialog*** after the ***Export*** procedure.

The structure media with identical refractive indexes can be combined in a group identified by its index number by selecting the check box in the *Material Group* control. If the *Add To Group *of the *Material Group* control is selected, the *Group* control indicates the index of group which corresponds to the selected Layer while the *Members* control indicates total number of elements in the current group. The maximum allowed *Group Index* always corresponds to an empty group; it automatically increases or decreases as soon as a first refractive index group member is introduced or the last refractive index group member is removed. If the *Set group Parameters *of the *Material Group* control is selected, the refractive index of the selected group and its variable status can be set while the *Member* control allows inspecting of current group member other parameters. After start the *Optimization* all material assignment for media in the group will be removed.

**Note 1** During the ***[Optimization](https://mcgrating.com/docs/common/optimization.html)*** process the edit controls are disabled but they display every second the real time values. In addition, if the user changes the *Group Index*, *Layer Index* or *Interface Index* the related parameters will be updated immediately.

**Note 2 **(C-method codes) The *Wavelength, Period, Angle *(*Normal Angle *and *Plane Angle *in the conical mount versions) and the *Layer* *Thickness* are the Optimization Dialog structure values, while *Grating Depth,* *Grating Shift* in the Extended versions is calculated relative to the parent project window grating parameters stored in the Optimization Dialog. For example, after the optimization process, the *Grating Depth* value can be negative. This simply means the opposite sign of every sinus harmonic in the Optimization Dialog grating profile decomposition with respect to the harmonics of the parent project window structure.

**Note 3 **(Modal method codes) The ***Cell Length*** is normalized for the period and its variation has two options. The unselected or disabled Check Box ***Fixed Center*** implies that a sum of lengths of given Cell and the next Cell is constant. The selected and enabled Check Box ***Fixed Center*** implies that the given Cell center position is preserved and a sum of lengths from previous to the next Cell is constant.
 The *Bunch of Layers*, *Thickness* controls are visible only if the *Bunch *scanning option was selected in parent project window used for creating *Optimization dialog*.

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).
