Closed oskooi closed 2 years ago
1873 seems to have introduced a bug in plot2D for PMLs in Cartesian coordinates.
Whoops. Easy fix.
The lines here: https://github.com/NanoComp/meep/blob/d00febd09126097c421061d2f3eec44dfb0c0256/python/visualization.py#L480-L481 here: https://github.com/NanoComp/meep/blob/d00febd09126097c421061d2f3eec44dfb0c0256/python/visualization.py#L487-L488 and here: https://github.com/NanoComp/meep/blob/d00febd09126097c421061d2f3eec44dfb0c0256/python/visualization.py#L493-L494 just need to check for cylindrical coordinates (like here): https://github.com/NanoComp/meep/blob/d00febd09126097c421061d2f3eec44dfb0c0256/python/visualization.py#L471
Separately, it would be good to add a unit test for plot2D to avoid these types of bugs in the future.
We already have a unit test (see here). There's just no easy way to test if an image is "right".
We currently hash the image and make sure it's reasonably similar to what's new.
1873 seems to have introduced a bug in
plot2D
for PMLs in Cartesian coordinates. The bug appears specifically for PMLs in themeep.X
direction with sidemeep.Low
as demonstrated in the following example. In the example, there should be a PML in the -x boundary of the cell. Separately, it would be good to add a unit test forplot2D
to avoid these types of bugs in the future.PR 1873 (missing PML in left boundary)
prior to PR 1873
cc @smartalecH