Skip to content

Commit 6396328

Browse files
seismanweiji14
andauthored
GMTDataArrayAccessor: Improve the documentation to clarify how the accessor works (#3955)
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
1 parent 851ae08 commit 6396328

19 files changed

+107
-158
lines changed

pygmt/datasets/earth_age.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,8 @@ def load_earth_age(
7676
Note
7777
----
7878
The registration and coordinate system type of the returned
79-
:class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e.,
80-
``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these
81-
properties may be lost after specific grid operations (such as slicing) and will
82-
need to be manually set before passing the grid to any PyGMT data processing or
83-
plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed
84-
explanations and workarounds.
79+
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to
80+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
8581
8682
Examples
8783
--------

pygmt/datasets/earth_day.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,8 @@ def load_blue_marble(
7272
Note
7373
----
7474
The registration and coordinate system type of the returned
75-
:class:`xarray.DataArray` image can be accessed via the GMT accessors (i.e.,
76-
``image.gmt.registration`` and ``image.gmt.gtype`` respectively). However, these
77-
properties may be lost after specific image operations (such as slicing) and will
78-
need to be manually set before passing the image to any PyGMT data processing or
79-
plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed
80-
explanations and workarounds.
75+
:class:`xarray.DataArray` image can be accessed via the *gmt* accessor. Refer to
76+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
8177
8278
Examples
8379
--------

pygmt/datasets/earth_deflection.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,8 @@ def load_earth_deflection(
9090
Note
9191
----
9292
The registration and coordinate system type of the returned
93-
:class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e.,
94-
``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these
95-
properties may be lost after specific grid operations (such as slicing) and will
96-
need to be manually set before passing the grid to any PyGMT data processing or
97-
plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed
98-
explanations and workarounds.
93+
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to
94+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
9995
10096
Examples
10197
--------

pygmt/datasets/earth_dist.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,8 @@ def load_earth_dist(
7777
Note
7878
----
7979
The registration and coordinate system type of the returned
80-
:class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e.,
81-
``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these
82-
properties may be lost after specific grid operations (such as slicing) and will
83-
need to be manually set before passing the grid to any PyGMT data processing or
84-
plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed
85-
explanations and workarounds.
80+
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to
81+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
8682
8783
Examples
8884
--------

pygmt/datasets/earth_free_air_anomaly.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,8 @@ def load_earth_free_air_anomaly(
9090
Note
9191
----
9292
The registration and coordinate system type of the returned
93-
:class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e.,
94-
``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these
95-
properties may be lost after specific grid operations (such as slicing) and will
96-
need to be manually set before passing the grid to any PyGMT data processing or
97-
plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed
98-
explanations and workarounds.
93+
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to
94+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
9995
10096
Examples
10197
--------

pygmt/datasets/earth_geoid.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,8 @@ def load_earth_geoid(
7070
Note
7171
----
7272
The registration and coordinate system type of the returned
73-
:class:`xarray.DataArray` grid can be accessed via the GMT accessors
74-
(i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively).
75-
However, these properties may be lost after specific grid operations (such
76-
as slicing) and will need to be manually set before passing the grid to any
77-
PyGMT data processing or plotting functions. Refer to
78-
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and
79-
workarounds.
73+
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to
74+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
8075
8176
Examples
8277
--------

pygmt/datasets/earth_magnetic_anomaly.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,8 @@ def load_earth_magnetic_anomaly(
102102
Note
103103
----
104104
The registration and coordinate system type of the returned
105-
:class:`xarray.DataArray` grid can be accessed via the GMT accessors
106-
(i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively).
107-
However, these properties may be lost after specific grid operations (such
108-
as slicing) and will need to be manually set before passing the grid to any
109-
PyGMT data processing or plotting functions. Refer to
110-
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and
111-
workarounds.
105+
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to
106+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
112107
113108
Examples
114109
--------

pygmt/datasets/earth_mask.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,8 @@ def load_earth_mask(
8989
Note
9090
----
9191
The registration and coordinate system type of the returned
92-
:class:`xarray.DataArray` grid can be accessed via the GMT accessors
93-
(i.e., ``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively).
94-
However, these properties may be lost after specific grid operations (such
95-
as slicing) and will need to be manually set before passing the grid to any
96-
PyGMT data processing or plotting functions. Refer to
97-
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and
98-
workarounds.
92+
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to
93+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
9994
10095
Examples
10196
--------

pygmt/datasets/earth_mean_dynamic_topography.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,8 @@ def load_earth_mean_dynamic_topography(
7373
Note
7474
----
7575
The registration and coordinate system type of the returned
76-
:class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e.,
77-
``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these
78-
properties may be lost after specific grid operations (such as slicing) and will
79-
need to be manually set before passing the grid to any PyGMT data processing or
80-
plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed
81-
explanations and workarounds.
76+
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to
77+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
8278
8379
Examples
8480
--------

pygmt/datasets/earth_mean_sea_surface.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,8 @@ def load_earth_mean_sea_surface(
7676
Note
7777
----
7878
The registration and coordinate system type of the returned
79-
:class:`xarray.DataArray` grid can be accessed via the GMT accessors (i.e.,
80-
``grid.gmt.registration`` and ``grid.gmt.gtype`` respectively). However, these
81-
properties may be lost after specific grid operations (such as slicing) and will
82-
need to be manually set before passing the grid to any PyGMT data processing or
83-
plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed
84-
explanations and workarounds.
79+
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to
80+
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations.
8581
8682
Examples
8783
--------

0 commit comments

Comments
 (0)