You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Actually, since the source and the structure do not have symmetry in the y-direction, neither can the eig_parity. Using just eig_parity=mp.ODD_Z resolves the issue.
Not sure if this requires a separate issue. What should one do when using the eigen_mode_monitor in 3D? Usually, I would inject a planewave along mp.Z (It's just the natural way I think of things.) One can specify similar parities in Y, but there should be some X parity, no? I just retreated to always injecting along the x-axis.
Note that this structure couples even input to both even and odd output modes. If you don't want to get these two mixed together, the best thing to do would be to add two mode monitors, one for EVEN_Y and the other for ODD_Y.
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 forget_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 haseig_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 particulareig_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 causesget_eigenmode_coefficients
to omit half of all the necessary mode coefficients.The text was updated successfully, but these errors were encountered: