Gratings
How to choose the numerical settings of a grating run: Fourier orders and x and z resolution.
The higher the number of Fourier orders, and the lower the x and z resolution values, the more accurate the calculation can be and the longer it takes. The goal is settings fine enough for a stable result, and no finer.
The number of Fourier orders must be at least the diffraction order you want to study, and should normally be higher. To study order 2, for example, use more than 2 Fourier orders.
These are the sampling steps along the grating profile (x) and through the grating and its coating (z), in nm. Keep them smaller than the smallest feature you want to resolve on the grating.
The Parameter study workflow exists exactly for this. Open a saved grating and choose it as the run workflow: at one energy and one incident angle, it varies the Fourier orders and the x and z resolution in turn. Look for the point where the result stops changing, and use those values for your runs.