|
12 | 12 | from pygmt.clib import Session |
13 | 13 | from pygmt.helpers import ( |
14 | 14 | build_arg_list, |
| 15 | + deprecate_parameter, |
15 | 16 | fmt_docstring, |
16 | 17 | kwargs_to_strings, |
17 | 18 | use_alias, |
|
22 | 23 |
|
23 | 24 |
|
24 | 25 | @fmt_docstring |
| 26 | +@deprecate_parameter("mask", "mask_values", "v0.18.0", remove_version="v0.20.0") |
| 27 | +@deprecate_parameter("gridmask", "mask_grid", "v0.18.0", remove_version="v0.20.0") |
25 | 28 | @use_alias( |
26 | 29 | A="area_thresh", |
27 | 30 | C="dist2pt", |
28 | 31 | F="polygon", |
29 | | - G="gridmask", |
| 32 | + G="mask_grid", |
30 | 33 | I="reverse", |
31 | 34 | L="dist2line", |
32 | | - N="mask", |
| 35 | + N="mask_values", |
33 | 36 | Z="z_subregion", |
34 | 37 | b="binary", |
35 | 38 | d="nodata", |
@@ -128,42 +131,40 @@ def select( |
128 | 131 | <reference/file-formats.html#optional-segment-header-records>` |
129 | 132 | *polygonfile*. For spherical polygons (lon, lat), make sure no |
130 | 133 | consecutive points are separated by 180 degrees or more in longitude. |
131 | | - gridmask : str |
| 134 | + mask_grid : str |
132 | 135 | Pass all locations that are inside the valid data area of the grid |
133 | | - *gridmask*. Nodes that are outside are either NaN or zero. |
| 136 | + *mask_grid*. Nodes that are outside are either NaN or zero. |
134 | 137 | reverse : str |
135 | 138 | [**cflrsz**]. |
136 | 139 | Reverse the sense of the test for each of the criteria specified: |
137 | 140 |
|
138 | 141 | - **c** select records NOT inside any point's circle of influence. |
139 | 142 | - **f** select records NOT inside any of the polygons. |
140 | 143 | - **g** will pass records inside the cells with z equal zero of the |
141 | | - grid mask in ``gridmask``. |
| 144 | + *mask_grid* in ``mask_grid``. |
142 | 145 | - **l** select records NOT within the specified distance of any line. |
143 | 146 | - **r** select records NOT inside the specified rectangular region. |
144 | | - - **s** select records NOT considered inside as specified by ``mask`` |
| 147 | + - **s** select records NOT considered inside as specified by ``mask_values`` |
145 | 148 | (and ``area_thresh``, ``resolution``). |
146 | 149 | - **z** select records NOT within the range specified by |
147 | 150 | ``z_subregion``. |
148 | 151 | $projection |
149 | | - mask : str or list |
150 | | - Pass all records whose location is inside specified geographical |
151 | | - features. Specify if records should be skipped (s) or kept (k) using |
152 | | - 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: |
153 | 155 |
|
154 | 156 | - *wet/dry*. |
155 | 157 | - *ocean/land/lake/island/pond*. |
156 | 158 |
|
157 | | - [Default is s/k/s/k/s (i.e., s/k), which passes all points on dry |
158 | | - land]. |
| 159 | + [Default is s/k/s/k/s (i.e., s/k), which passes all points on dry land]. |
159 | 160 | resolution |
160 | | - Ignored unless ``mask`` is set. Select the resolution of the coastline dataset |
161 | | - to use. The available resolutions from highest to lowest are: ``"full"``, |
162 | | - ``"high"``, ``"intermediate"``, ``"low"``, and ``"crude"``, which drops by 80% |
163 | | - between levels. Alternatively, choose ``"auto"`` to automatically select the |
164 | | - most suitable resolution given the chosen region. Note that because the |
165 | | - coastlines differ in details, a node in a mask file using one resolution is not |
166 | | - 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 |
167 | 168 | selected. If ``None``, the low resolution is used by default. |
168 | 169 | $region |
169 | 170 | $verbose |
|
0 commit comments