22blockm - Block average (x, y, z) data tables by mean, median, or mode estimation.
33"""
44
5+ from collections .abc import Sequence
56from typing import Literal
67
78import numpy as np
@@ -73,7 +74,6 @@ def _blockm(
7374@fmt_docstring
7475@use_alias (
7576 I = "spacing" ,
76- R = "region" ,
7777 S = "summary" ,
7878 a = "aspatial" ,
7979 b = "binary" ,
@@ -86,14 +86,15 @@ def _blockm(
8686 r = "registration" ,
8787 w = "wrap" ,
8888)
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" )
9090def blockmean (
9191 data : PathLike | TableLike | None = None ,
9292 x = None ,
9393 y = None ,
9494 z = None ,
9595 output_type : Literal ["pandas" , "numpy" , "file" ] = "pandas" ,
9696 outfile : PathLike | None = None ,
97+ region : Sequence [float | str ] | str | None = None ,
9798 verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
9899 | bool = False ,
99100 ** kwargs ,
@@ -113,6 +114,7 @@ def blockmean(
113114 Full GMT docs at :gmt-docs:`blockmean.html`.
114115
115116 {aliases}
117+ - R = region
116118 - V = verbose
117119
118120 Parameters
@@ -166,6 +168,7 @@ def blockmean(
166168 >>> data_bmean = pygmt.blockmean(data=data, region=[245, 255, 20, 30], spacing="5m")
167169 """
168170 aliasdict = AliasSystem ().add_common (
171+ R = region ,
169172 V = verbose ,
170173 )
171174 aliasdict .merge (kwargs )
@@ -185,7 +188,6 @@ def blockmean(
185188@fmt_docstring
186189@use_alias (
187190 I = "spacing" ,
188- R = "region" ,
189191 a = "aspatial" ,
190192 b = "binary" ,
191193 d = "nodata" ,
@@ -197,14 +199,15 @@ def blockmean(
197199 r = "registration" ,
198200 w = "wrap" ,
199201)
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" )
201203def blockmedian (
202204 data : PathLike | TableLike | None = None ,
203205 x = None ,
204206 y = None ,
205207 z = None ,
206208 output_type : Literal ["pandas" , "numpy" , "file" ] = "pandas" ,
207209 outfile : PathLike | None = None ,
210+ region : Sequence [float | str ] | str | None = None ,
208211 verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
209212 | bool = False ,
210213 ** kwargs ,
@@ -224,6 +227,7 @@ def blockmedian(
224227 Full GMT docs at :gmt-docs:`blockmedian.html`.
225228
226229 {aliases}
230+ - R = region
227231 - V = verbose
228232
229233 Parameters
@@ -271,6 +275,7 @@ def blockmedian(
271275 ... )
272276 """
273277 aliasdict = AliasSystem ().add_common (
278+ R = region ,
274279 V = verbose ,
275280 )
276281 aliasdict .merge (kwargs )
@@ -290,7 +295,6 @@ def blockmedian(
290295@fmt_docstring
291296@use_alias (
292297 I = "spacing" ,
293- R = "region" ,
294298 a = "aspatial" ,
295299 b = "binary" ,
296300 d = "nodata" ,
@@ -302,14 +306,15 @@ def blockmedian(
302306 r = "registration" ,
303307 w = "wrap" ,
304308)
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" )
306310def blockmode (
307311 data : PathLike | TableLike | None = None ,
308312 x = None ,
309313 y = None ,
310314 z = None ,
311315 output_type : Literal ["pandas" , "numpy" , "file" ] = "pandas" ,
312316 outfile : PathLike | None = None ,
317+ region : Sequence [float | str ] | str | None = None ,
313318 verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
314319 | bool = False ,
315320 ** kwargs ,
@@ -329,6 +334,7 @@ def blockmode(
329334 Full GMT docs at :gmt-docs:`blockmode.html`.
330335
331336 {aliases}
337+ - R = region
332338 - V = verbose
333339
334340 Parameters
@@ -374,6 +380,7 @@ def blockmode(
374380 >>> data_bmode = pygmt.blockmode(data=data, region=[245, 255, 20, 30], spacing="5m")
375381 """
376382 aliasdict = AliasSystem ().add_common (
383+ R = region ,
377384 V = verbose ,
378385 )
379386 aliasdict .merge (kwargs )
0 commit comments