Analysis of photonic crystal waveguide gratings with coupled-mode theory and a finite-element method.