As a variation of the binary grating tutorial example in the documentation, it turns out that an asymmetric grating with a normally-incident planewave source has an eig_parity parameter for get_eigenmode_coefficients which unwantedly removes half of all the necessary mode coefficients.
This is demonstrated for an example grating shown below. get_eigenmode_coefficients is used for the two mode monitors to compute the reflectance and transmittance of all diffracted orders. An Ez-polarized planewave source at normal incidence has eig_parity=mp.ODD_Z+mp.EVEN_Y. This is necessary to remove the degeneracy in the y-direction by forcing MPB to compute only the +ky + -ky (cosine) mode. However, this particular eig_parity condition also results in MPB computing only those modes where the sign of its ky is a constant (either positive or negative, but not both; in tests, the y-component of the dominant wavevector is always negative). This effectively causes get_eigenmode_coefficients to omit half of all the necessary mode coefficients.
