diff --git a/pygmt/helpers/decorators.py b/pygmt/helpers/decorators.py index 96ad7687456..f518150d5a9 100644 --- a/pygmt/helpers/decorators.py +++ b/pygmt/helpers/decorators.py @@ -118,6 +118,36 @@ geographical data). Full documentation is at :gmt-docs:`gmt.html#f-full`. """, + "i": r""" + incols : str or 1d array + Specify data columns for primary input in arbitrary order. Columns + can be repeated and columns not listed will be skipped [Default + reads all columns in order, starting with the first (i.e., column + 0)]. + + - For *1d array*: specify individual columns in input order (e.g., + ``incols=[1,0]`` for the 2nd column followed by the 1st column). + - For :py:class:`str`: specify individual columns or column + ranges in the format *start*\ [:*inc*]:*stop*, where *inc* + defaults to 1 if not specified, with columns and/or column ranges + separated by commas (e.g., ``incols='0:2,4+l'`` to input the + first three columns followed by the log-transformed 5th column). + To read from a given column until the end of the record, leave + off *stop* when specifying the column range. To read trailing + text, add the column **t**. Append the word number to **t** to + ingest only a single word from the trailing text. Instead of + specifying columns, use ``incols='n'`` to simply read numerical + input and skip trailing text. Optionally, append one of the + following modifiers to any column or column range to transform + the input columns: + + - **+l** to take the *log10* of the input values. + - **+d** to divide the input values by the factor *divisor* + [default is 1]. + - **+s** to multiple the input values by the factor *scale* + [default is 1]. + - **+o** to add the given *offset* to the input values [default + is 0].""", "j": r""" distcalc : str **e**\|\ **f**\|\ **g**. diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index b80ca39d84c..bdcafe57106 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -69,6 +69,7 @@ def _blockm(block_method, table, outfile, **kwargs): V="verbose", a="aspatial", f="coltypes", + i="incols", r="registration", ) @kwargs_to_strings(R="sequence") @@ -103,6 +104,7 @@ def blockmean(table, outfile=None, **kwargs): {V} {a} + {i} {f} {r} @@ -126,6 +128,7 @@ def blockmean(table, outfile=None, **kwargs): V="verbose", a="aspatial", f="coltypes", + i="incols", r="registration", ) @kwargs_to_strings(R="sequence") @@ -161,6 +164,7 @@ def blockmedian(table, outfile=None, **kwargs): {V} {a} {f} + {i} {r} Returns