Coupled-wave analysis of reflection gratings | Synapse