Skip to content
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

Ensure plotting xarray grids with different central meridians work on some projections #560

Merged
merged 19 commits into from
Sep 11, 2020
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d4282d0
Revert runfirst workaround for test_grdimage_over_dateline
weiji14 Aug 10, 2020
d6ce55e
Merge branch 'master' into test/central_meridians
weiji14 Sep 2, 2020
a302be6
Revert grdtrack example workaround in #531 crashing due to bad meridian
weiji14 Sep 2, 2020
d1f7df6
Merge branch 'master' into test/central_meridians
weiji14 Sep 4, 2020
1caaac4
Remove unneeded pytest mpl_image_compare and runfirst markers
weiji14 Sep 4, 2020
840fe6b
Merge branch 'master' into test/central_meridians
weiji14 Sep 4, 2020
0d702fd
Test different central meridians and projection system
weiji14 Sep 4, 2020
b83ddbf
Improve tests on different central meridians and standard parallels
weiji14 Sep 5, 2020
e7e51f3
Merge branch 'master' into test/central_meridians
weiji14 Sep 6, 2020
af0cc0a
Test using General Stereographic (S) instead of Transverse Mercator (T)
weiji14 Sep 6, 2020
c26d7a2
Silence pylint complaints on ALLOWED_CHARS & KEYWORD_ONLY variable names
weiji14 Sep 6, 2020
4d7d545
Mention fullname of projections in test_grdimage_central_meridians* docs
weiji14 Sep 6, 2020
ad432e5
Merge branch 'master' into test/central_meridians
weiji14 Sep 7, 2020
0134272
Add result_images folder to gitignore and make clean list
weiji14 Sep 7, 2020
f228e5c
Expect some failures on Cylindrical Equidistant (Q) plots
weiji14 Sep 8, 2020
406f847
Merge branch 'master' into test/central_meridians
weiji14 Sep 11, 2020
b3e063a
Fix doctest failures on helpers/testing.py
weiji14 Sep 11, 2020
8f14fe2
Merge branch 'master' into test/central_meridians
weiji14 Sep 11, 2020
0516b06
Initialize fig_ref and fig_test on one line instead of two
weiji14 Sep 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Expect some failures on Cylindrical Equidistant (Q) plots
Also set RMS tolerance to 1.5 to handle small different along Greenwich Meridian for General Stereographic (S) plots.
  • Loading branch information
weiji14 committed Sep 8, 2020
commit f228e5c843fc7a570fc4149e0e617f6a12321210
8 changes: 6 additions & 2 deletions pygmt/tests/test_grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ def test_grdimage_central_meridians(grid, proj_type, lon0):
return fig_ref, fig_test


@check_figures_equal()
# Cylindrical Equidistant (Q) projections plotted with xarray and NetCDF grids
# are still slightly different with an RMS error of 25, see issue at
# https://github.com/GenericMappingTools/pygmt/issues/390
# TO-DO remove tol=1.5 and pytest.mark.xfail once bug is solved in upstream GMT
@check_figures_equal(tol=1.5)
@pytest.mark.parametrize("lat0", [0, 30])
@pytest.mark.parametrize("lon0", [0, 123, 180])
@pytest.mark.parametrize("proj_type", ["Q", "S"])
@pytest.mark.parametrize("proj_type", [pytest.param("Q", marks=pytest.mark.xfail), "S"])
def test_grdimage_central_meridians_and_standard_parallels(grid, proj_type, lon0, lat0):
"""
Test that plotting a grid with different central meridians (lon0) and
Expand Down