Skip to content

Commit

Permalink
Update fig.grd baseline images for GMT 6.2.0rc1 (#1224)
Browse files Browse the repository at this point in the history
* Update fig.grdcontour baseline images for GMT 6.2.0rc1
* Fix test_grdfilter tests for GMT 6.2.0rc1

Min/max values of the grid now matches properly for xarray.DataArray and NetCDF inputs.

* Update fig.grd2cpt baseline image for GMT 6.2.0rc1
  • Loading branch information
weiji14 authored Apr 22, 2021
1 parent 5d97c2b commit 3a4f2f5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions pygmt/tests/baseline/test_grd2cpt.png.dvc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
outs:
- md5: 0848349770986ef56d740e866ab961bc
size: 24843
- md5: 305e3650aa4ed9a56bec58be3a0d752b
size: 22460
path: test_grd2cpt.png
4 changes: 2 additions & 2 deletions pygmt/tests/baseline/test_grdcontour.png.dvc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
outs:
- md5: 438f13a0356e3bec8e3762180ea9c2f0
size: 219869
- md5: 9366e405a1be22b4c2515f24a3acae69
size: 217638
path: test_grdcontour.png
4 changes: 2 additions & 2 deletions pygmt/tests/baseline/test_grdcontour_file.png.dvc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
outs:
- md5: fa2f0be00003b6a1cf8cc80da0eb824c
size: 102192
- md5: 717b9f9123c7bb2bfb197a419d459288
size: 97067
path: test_grdcontour_file.png
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
outs:
- md5: 7f655c17e068dd4860c5f97b7503a314
size: 38237
- md5: 25125246f541652071fac1771e5d7e88
size: 33966
path: test_grdcontour_interval_file_full_opts.png
4 changes: 2 additions & 2 deletions pygmt/tests/baseline/test_grdcontour_labels.png.dvc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
outs:
- md5: 582303f039a43f271c543b78d3a3ff4b
size: 226135
- md5: 03a7cc6dea35f9383cbfb2683d7b7c1b
size: 223421
path: test_grdcontour_labels.png
4 changes: 2 additions & 2 deletions pygmt/tests/baseline/test_grdcontour_slice.png.dvc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
outs:
- md5: c9538960aae7cd5263bce0f6bda20090
size: 102143
- md5: 48070d23c538d26eb96b5caaf440513a
size: 97314
path: test_grdcontour_slice.png
10 changes: 5 additions & 5 deletions pygmt/tests/test_grdfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def fixture_grid():
return load_earth_relief(registration="pixel")


def test_grfilter_dataarray_in_dataarray_out(grid):
def test_grdfilter_dataarray_in_dataarray_out(grid):
"""
grdfilter an input DataArray, and output as DataArray.
"""
Expand All @@ -32,8 +32,8 @@ def test_grfilter_dataarray_in_dataarray_out(grid):
assert result.coords["lat"].data.max() == 89.5
assert result.coords["lon"].data.min() == -179.5
assert result.coords["lon"].data.max() == 179.5
npt.assert_almost_equal(result.data.min(), -6147.47265625, decimal=2)
npt.assert_almost_equal(result.data.max(), 5164.1157, decimal=2)
npt.assert_almost_equal(result.data.min(), -6147.4907, decimal=2)
npt.assert_almost_equal(result.data.max(), 5164.06, decimal=2)
assert result.sizes["lat"] == 180
assert result.sizes["lon"] == 360

Expand All @@ -47,11 +47,11 @@ def test_grdfilter_dataarray_in_file_out(grid):
assert result is None # grdfilter returns None if output to a file
result = grdinfo(tmpfile.name, per_column=True)
assert (
result == "-180 180 -90 90 -6147.47265625 5164.11572266 1 1 360 180 1 1\n"
result == "-180 180 -90 90 -6147.49072266 5164.06005859 1 1 360 180 1 1\n"
)


def test_grfilter_file_in_dataarray_out():
def test_grdfilter_file_in_dataarray_out():
"""
grdfilter an input grid file, and output as DataArray.
"""
Expand Down

0 comments on commit 3a4f2f5

Please sign in to comment.