Skip to content

Commit 026e28e

Browse files
pygmt.select: Deprecate parameter mask to mask_values (Will be removed in v0.20.0) (#4288)
1 parent 5843664 commit 026e28e

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

pygmt/src/select.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424

2525
@fmt_docstring
26+
@deprecate_parameter("mask", "mask_values", "v0.18.0", remove_version="v0.20.0")
2627
@deprecate_parameter("gridmask", "mask_grid", "v0.18.0", remove_version="v0.20.0")
2728
@use_alias(
2829
A="area_thresh",
@@ -31,7 +32,7 @@
3132
G="mask_grid",
3233
I="reverse",
3334
L="dist2line",
34-
N="mask",
35+
N="mask_values",
3536
Z="z_subregion",
3637
b="binary",
3738
d="nodata",
@@ -143,29 +144,27 @@ def select(
143144
*mask_grid* in ``mask_grid``.
144145
- **l** select records NOT within the specified distance of any line.
145146
- **r** select records NOT inside the specified rectangular region.
146-
- **s** select records NOT considered inside as specified by ``mask``
147+
- **s** select records NOT considered inside as specified by ``mask_values``
147148
(and ``area_thresh``, ``resolution``).
148149
- **z** select records NOT within the range specified by
149150
``z_subregion``.
150151
$projection
151-
mask : str or list
152-
Pass all records whose location is inside specified geographical
153-
features. Specify if records should be skipped (s) or kept (k) using
154-
1 of 2 formats:
152+
mask_values : str or list
153+
Pass all records whose location is inside specified geographical features.
154+
Specify if records should be skipped (s) or kept (k) using 1 of 2 formats:
155155
156156
- *wet/dry*.
157157
- *ocean/land/lake/island/pond*.
158158
159-
[Default is s/k/s/k/s (i.e., s/k), which passes all points on dry
160-
land].
159+
[Default is s/k/s/k/s (i.e., s/k), which passes all points on dry land].
161160
resolution
162-
Ignored unless ``mask`` is set. Select the resolution of the coastline dataset
163-
to use. The available resolutions from highest to lowest are: ``"full"``,
164-
``"high"``, ``"intermediate"``, ``"low"``, and ``"crude"``, which drops by 80%
165-
between levels. Alternatively, choose ``"auto"`` to automatically select the
166-
most suitable resolution given the chosen region. Note that because the
167-
coastlines differ in details, a node in a mask file using one resolution is not
168-
guaranteed to remain inside [or outside] when a different resolution is
161+
Ignored unless ``mask_values`` is set. Select the resolution of the coastline
162+
dataset to use. The available resolutions from highest to lowest are:
163+
``"full"``, ``"high"``, ``"intermediate"``, ``"low"``, and ``"crude"``, which
164+
drops by 80% between levels. Alternatively, choose ``"auto"`` to automatically
165+
select the most suitable resolution given the chosen region. Note that because
166+
the coastlines differ in details, a node in a mask file using one resolution is
167+
not guaranteed to remain inside [or outside] when a different resolution is
169168
selected. If ``None``, the low resolution is used by default.
170169
$region
171170
$verbose

0 commit comments

Comments
 (0)