-
Notifications
You must be signed in to change notification settings - Fork 633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unit test for plot2D
based on image hashes
#2389
Comments
As a second check, I rebuilt from the master branch (b86b476) and then reran the example above. The output is correct. Not sure why the output was incorrect previously. There is no bug in Anyhow, it would be useful to add a set of unit tests for meep/python/tests/test_visualization.py Lines 187 to 213 in b86b476
Note that the @smartalecH, do we just need to update the hash values in this test in order to reenable it? |
IIRC, the hash value checks were rather flaky. Essentially the same plots were producing different hashes depending on the CI build machine etc (back in the days of Travis). We could once again look into how matplotlib does CI (which is how we originally came up with the hash comparisons). I'm sure some new techniques have emerged in the last five years. Maybe even some native to matplotlib itself. |
Seems there is indeed support within https://matplotlib.org/stable/devel/testing.html#writing-an-image-comparison-test |
plot2D
not working correctly for cylindrical coordinatesplot2D
based on image hashes
plot2D
seems to no longer work correctly for cylindrical coordinates. As an example, python/examples/zone_plate.py of Tutorial/Focusing Properties of a Binary-Phase Zone Plate produces the wrong output:This particular example was most recently corrected in #2136:
From the images, the problem seems to be that the$R$ axis is not properly defined: it should be the interval (0,R) rather than (-R/2,+R/2).
The text was updated successfully, but these errors were encountered: