Closed pwflanigan closed 11 months ago
Nope, this is just a plotting thing. MPB's xyz axes are internally consistent, when you interface to a plotting library like matplotlib it may not show the orientation you expect. (Just because you label the axes a certain way doesn't make it so.)
(Note that a waveguide like this does not have purely polarized TE and TM modes per se. Its only symmetry is a z=0 mirror plane, so the modes can be categorized as even/odd with respect to that mirror planes. If the waveguide is thin enough, this leads to modes that are mostly polarized. For more information, see e.g. chapter 7 of our Photonic Crystals: Molding the Flow of Light textbook.)
I don't know if this is necessarily a bug, but when I posted this question to the mailing list it didn't appear.
I was looking at this Python example and I tried making a schematic of sorts by putting in
I got this (I made w = 1.0 so it's easier to see which is the long axis of the rectangle):![image](https://github.com/NanoComp/meep/assets/136763549/1373eb8d-7732-47c7-8da5-4356aaf4a38f)
I was under the impression that the vertical axis would be z and the horizontal axis would be y, but this image is "rotated" with the waveguide's z-length being w = 1.0. I assumed that the axes here are the same as what you get if you use mp.plot2d on a similar case (using mp.plot2d on this example at the location of the source gives you y horizontal and z vertical).
The reason I bring this up is because I'm studying a case where there is no substrate (same material all around the waveguide), so if y- and z-axes are not where I thought they were, this could cause confusion when defining the TE and TM modes. Is this a problem, or does the physics work out the same in the end?