2
2
blockm - Block average (x, y, z) data tables by mean, median, or mode estimation.
3
3
"""
4
4
5
+ from collections .abc import Sequence
5
6
from typing import Literal
6
7
7
8
import numpy as np
@@ -73,7 +74,6 @@ def _blockm(
73
74
@fmt_docstring
74
75
@use_alias (
75
76
I = "spacing" ,
76
- R = "region" ,
77
77
S = "summary" ,
78
78
a = "aspatial" ,
79
79
b = "binary" ,
@@ -86,14 +86,15 @@ def _blockm(
86
86
r = "registration" ,
87
87
w = "wrap" ,
88
88
)
89
- @kwargs_to_strings (I = "sequence" , R = "sequence" , i = "sequence_comma" , o = "sequence_comma" )
89
+ @kwargs_to_strings (I = "sequence" , i = "sequence_comma" , o = "sequence_comma" )
90
90
def blockmean (
91
91
data : PathLike | TableLike | None = None ,
92
92
x = None ,
93
93
y = None ,
94
94
z = None ,
95
95
output_type : Literal ["pandas" , "numpy" , "file" ] = "pandas" ,
96
96
outfile : PathLike | None = None ,
97
+ region : Sequence [float | str ] | str | None = None ,
97
98
verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
98
99
| bool = False ,
99
100
** kwargs ,
@@ -113,6 +114,7 @@ def blockmean(
113
114
Full GMT docs at :gmt-docs:`blockmean.html`.
114
115
115
116
{aliases}
117
+ - R = region
116
118
- V = verbose
117
119
118
120
Parameters
@@ -166,6 +168,7 @@ def blockmean(
166
168
>>> data_bmean = pygmt.blockmean(data=data, region=[245, 255, 20, 30], spacing="5m")
167
169
"""
168
170
aliasdict = AliasSystem ().add_common (
171
+ R = region ,
169
172
V = verbose ,
170
173
)
171
174
aliasdict .merge (kwargs )
@@ -185,7 +188,6 @@ def blockmean(
185
188
@fmt_docstring
186
189
@use_alias (
187
190
I = "spacing" ,
188
- R = "region" ,
189
191
a = "aspatial" ,
190
192
b = "binary" ,
191
193
d = "nodata" ,
@@ -197,14 +199,15 @@ def blockmean(
197
199
r = "registration" ,
198
200
w = "wrap" ,
199
201
)
200
- @kwargs_to_strings (I = "sequence" , R = "sequence" , i = "sequence_comma" , o = "sequence_comma" )
202
+ @kwargs_to_strings (I = "sequence" , i = "sequence_comma" , o = "sequence_comma" )
201
203
def blockmedian (
202
204
data : PathLike | TableLike | None = None ,
203
205
x = None ,
204
206
y = None ,
205
207
z = None ,
206
208
output_type : Literal ["pandas" , "numpy" , "file" ] = "pandas" ,
207
209
outfile : PathLike | None = None ,
210
+ region : Sequence [float | str ] | str | None = None ,
208
211
verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
209
212
| bool = False ,
210
213
** kwargs ,
@@ -224,6 +227,7 @@ def blockmedian(
224
227
Full GMT docs at :gmt-docs:`blockmedian.html`.
225
228
226
229
{aliases}
230
+ - R = region
227
231
- V = verbose
228
232
229
233
Parameters
@@ -271,6 +275,7 @@ def blockmedian(
271
275
... )
272
276
"""
273
277
aliasdict = AliasSystem ().add_common (
278
+ R = region ,
274
279
V = verbose ,
275
280
)
276
281
aliasdict .merge (kwargs )
@@ -290,7 +295,6 @@ def blockmedian(
290
295
@fmt_docstring
291
296
@use_alias (
292
297
I = "spacing" ,
293
- R = "region" ,
294
298
a = "aspatial" ,
295
299
b = "binary" ,
296
300
d = "nodata" ,
@@ -302,14 +306,15 @@ def blockmedian(
302
306
r = "registration" ,
303
307
w = "wrap" ,
304
308
)
305
- @kwargs_to_strings (I = "sequence" , R = "sequence" , i = "sequence_comma" , o = "sequence_comma" )
309
+ @kwargs_to_strings (I = "sequence" , i = "sequence_comma" , o = "sequence_comma" )
306
310
def blockmode (
307
311
data : PathLike | TableLike | None = None ,
308
312
x = None ,
309
313
y = None ,
310
314
z = None ,
311
315
output_type : Literal ["pandas" , "numpy" , "file" ] = "pandas" ,
312
316
outfile : PathLike | None = None ,
317
+ region : Sequence [float | str ] | str | None = None ,
313
318
verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
314
319
| bool = False ,
315
320
** kwargs ,
@@ -329,6 +334,7 @@ def blockmode(
329
334
Full GMT docs at :gmt-docs:`blockmode.html`.
330
335
331
336
{aliases}
337
+ - R = region
332
338
- V = verbose
333
339
334
340
Parameters
@@ -374,6 +380,7 @@ def blockmode(
374
380
>>> data_bmode = pygmt.blockmode(data=data, region=[245, 255, 20, 30], spacing="5m")
375
381
"""
376
382
aliasdict = AliasSystem ().add_common (
383
+ R = region ,
377
384
V = verbose ,
378
385
)
379
386
aliasdict .merge (kwargs )
0 commit comments