From 0c552168033f07d82a7f32910c3cce54e658b408 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Mon, 1 Nov 2021 15:28:40 +0100 Subject: [PATCH 1/9] Add alias for blockmean's -S parameter --- pygmt/src/blockm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index 05b69f04272..2e550b6b393 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -70,6 +70,7 @@ def _blockm(block_method, data, x, y, z, outfile, **kwargs): @use_alias( I="spacing", R="region", + S="restype", V="verbose", a="aspatial", b="binary", @@ -110,6 +111,12 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): Arrays of x and y coordinates and values z of the data points. {I} + + restype: str + Result type calculated by blockmean. Use **n** to report the number of + input points inside each block, **s** to report the sum of all z-values + inside a block, **w** to report the sum of weights [Default or **m** + reports mean value]. {R} From f8ed912f1c3629dce58614d2408528f0d8897cac Mon Sep 17 00:00:00 2001 From: Michael Grund Date: Mon, 1 Nov 2021 15:39:08 +0100 Subject: [PATCH 2/9] formatting --- pygmt/src/blockm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index 2e550b6b393..65e8aea033c 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -111,11 +111,11 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): Arrays of x and y coordinates and values z of the data points. {I} - + restype: str - Result type calculated by blockmean. Use **n** to report the number of - input points inside each block, **s** to report the sum of all z-values - inside a block, **w** to report the sum of weights [Default or **m** + Result type calculated by blockmean. Use **n** to report the number of + input points inside each block, **s** to report the sum of all z-values + inside a block, **w** to report the sum of weights [Default or **m** reports mean value]. {R} From c74c3d1f28268472b1ea6bece4a09b7cf872c9a6 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Tue, 2 Nov 2021 12:00:10 +0100 Subject: [PATCH 3/9] Apply suggestions from code review Co-authored-by: Will Schlitzer --- pygmt/src/blockm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index 65e8aea033c..c74b4093f10 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -113,6 +113,7 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): {I} restype: str + [**m**\|\ **n**\|\ **s**\|\ **w**]. Result type calculated by blockmean. Use **n** to report the number of input points inside each block, **s** to report the sum of all z-values inside a block, **w** to report the sum of weights [Default or **m** From b1a8c4b9291d68d094c5838cf0eb06263760a239 Mon Sep 17 00:00:00 2001 From: Michael Grund Date: Thu, 4 Nov 2021 17:40:05 +0100 Subject: [PATCH 4/9] use 'summarize' as alias --- pygmt/src/blockm.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index c74b4093f10..67d6db22db1 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -70,7 +70,7 @@ def _blockm(block_method, data, x, y, z, outfile, **kwargs): @use_alias( I="spacing", R="region", - S="restype", + S="summarize", V="verbose", a="aspatial", b="binary", @@ -112,12 +112,12 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): {I} - restype: str + summarize: str [**m**\|\ **n**\|\ **s**\|\ **w**]. - Result type calculated by blockmean. Use **n** to report the number of - input points inside each block, **s** to report the sum of all z-values - inside a block, **w** to report the sum of weights [Default or **m** - reports mean value]. + Type of summary values calculated by blockmean. Use **n** to report the + number of input points inside each block, **s** to report the sum of + all z-values inside a block, **w** to report the sum of weights + [Default or **m** reports mean value]. {R} From f53463504a8b4530253db9d71657596aeae09a97 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Sat, 6 Nov 2021 15:15:33 +0100 Subject: [PATCH 5/9] Apply suggestions from code review Co-authored-by: Dongdong Tian --- pygmt/src/blockm.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index 67d6db22db1..841fe03075c 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -70,7 +70,7 @@ def _blockm(block_method, data, x, y, z, outfile, **kwargs): @use_alias( I="spacing", R="region", - S="summarize", + S="summary", V="verbose", a="aspatial", b="binary", @@ -112,12 +112,14 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): {I} - summarize: str + summary: str [**m**\|\ **n**\|\ **s**\|\ **w**]. - Type of summary values calculated by blockmean. Use **n** to report the - number of input points inside each block, **s** to report the sum of - all z-values inside a block, **w** to report the sum of weights - [Default or **m** reports mean value]. + Type of summary values calculated by blockmean. + + - **n**: report the number of input points inside each block + - **s**: report the sum of all z-values inside a block + - **w**: report the sum of weights + - **m**: report mean value [Default] {R} From 0b6372c42b3bb38aa13bdd6c44fcb7ce8f9f8859 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Sun, 7 Nov 2021 11:35:02 +0100 Subject: [PATCH 6/9] Apply suggestions from code review Co-authored-by: Dongdong Tian --- pygmt/src/blockm.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index 841fe03075c..da882b5e8d6 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -115,7 +115,6 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): summary: str [**m**\|\ **n**\|\ **s**\|\ **w**]. Type of summary values calculated by blockmean. - - **n**: report the number of input points inside each block - **s**: report the sum of all z-values inside a block - **w**: report the sum of weights From 708e4b0733afe625c524d2e8e8e78953dae17a64 Mon Sep 17 00:00:00 2001 From: Michael Grund Date: Sun, 7 Nov 2021 15:03:39 +0100 Subject: [PATCH 7/9] some formatting --- pygmt/src/blockm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index da882b5e8d6..e9278306342 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -114,7 +114,7 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): summary: str [**m**\|\ **n**\|\ **s**\|\ **w**]. - Type of summary values calculated by blockmean. + Type of summary values calculated by blockmean. - **n**: report the number of input points inside each block - **s**: report the sum of all z-values inside a block - **w**: report the sum of weights From bb54d2f1a3c78f16ad8ee4c27455e079f0a67fb9 Mon Sep 17 00:00:00 2001 From: Michael Grund Date: Mon, 8 Nov 2021 08:17:50 +0100 Subject: [PATCH 8/9] some formatting --- pygmt/src/blockm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index e9278306342..16c913d0897 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -115,6 +115,7 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): summary: str [**m**\|\ **n**\|\ **s**\|\ **w**]. Type of summary values calculated by blockmean. + - **n**: report the number of input points inside each block - **s**: report the sum of all z-values inside a block - **w**: report the sum of weights From f5528c183bf03ca71d39e08fc430434674d77a80 Mon Sep 17 00:00:00 2001 From: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Date: Mon, 8 Nov 2021 11:58:22 +0100 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> --- pygmt/src/blockm.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index 16c913d0897..67c241dcc50 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -112,14 +112,14 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): {I} - summary: str + summary : str [**m**\|\ **n**\|\ **s**\|\ **w**]. Type of summary values calculated by blockmean. - - **n**: report the number of input points inside each block - - **s**: report the sum of all z-values inside a block - - **w**: report the sum of weights - - **m**: report mean value [Default] + - **m** - reports mean value [Default] + - **n** - report the number of input points inside each block + - **s** - report the sum of all z-values inside a block + - **w** - report the sum of weights {R}