Chain-matrix analysis of arbitrary-thickness dielectric reflection gratings | Synapse