@@ -31,12 +31,13 @@ def test_earth_mag_01d():
31
31
"""
32
32
Test some properties of the magnetic anomaly 01d data.
33
33
"""
34
- data = load_earth_magnetic_anomaly (resolution = "01d" , registration = "gridline" )
34
+ data = load_earth_magnetic_anomaly (resolution = "01d" )
35
35
assert data .name == "magnetic_anomaly"
36
36
assert data .attrs ["long_name" ] == "Earth magnetic anomaly"
37
37
assert data .attrs ["units" ] == "nT"
38
38
assert data .attrs ["horizontal_datum" ] == "WGS84"
39
39
assert data .shape == (181 , 361 )
40
+ assert data .gmt .registration == 0
40
41
npt .assert_allclose (data .lat , np .arange (- 90 , 91 , 1 ))
41
42
npt .assert_allclose (data .lon , np .arange (- 180 , 181 , 1 ))
42
43
npt .assert_allclose (data .min (), - 384 )
@@ -47,10 +48,9 @@ def test_earth_mag_01d_with_region():
47
48
"""
48
49
Test loading low-resolution earth magnetic anomaly with 'region'.
49
50
"""
50
- data = load_earth_magnetic_anomaly (
51
- resolution = "01d" , region = [- 10 , 10 , - 5 , 5 ], registration = "gridline"
52
- )
51
+ data = load_earth_magnetic_anomaly (resolution = "01d" , region = [- 10 , 10 , - 5 , 5 ])
53
52
assert data .shape == (11 , 21 )
53
+ assert data .gmt .registration == 0
54
54
npt .assert_allclose (data .lat , np .arange (- 5 , 6 , 1 ))
55
55
npt .assert_allclose (data .lon , np .arange (- 10 , 11 , 1 ))
56
56
npt .assert_allclose (data .min (), - 180.40002 )
@@ -81,14 +81,13 @@ def test_earth_mag4km_01d():
81
81
"""
82
82
Test some properties of the magnetic anomaly 4km 01d data.
83
83
"""
84
- data = load_earth_magnetic_anomaly (
85
- resolution = "01d" , registration = "gridline" , mag4km = True
86
- )
84
+ data = load_earth_magnetic_anomaly (resolution = "01d" , mag4km = True )
87
85
assert data .name == "magnetic_anomaly"
88
86
assert data .attrs ["long_name" ] == "Earth magnetic anomaly"
89
87
assert data .attrs ["units" ] == "nT"
90
88
assert data .attrs ["horizontal_datum" ] == "WGS84"
91
89
assert data .shape == (181 , 361 )
90
+ assert data .gmt .registration == 0
92
91
npt .assert_allclose (data .lat , np .arange (- 90 , 91 , 1 ))
93
92
npt .assert_allclose (data .lon , np .arange (- 180 , 181 , 1 ))
94
93
npt .assert_allclose (data .min (), - 799.19995 )
0 commit comments