Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add common alias coltypes (-f) for specifying i/o data types #994

Merged
merged 1 commit into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pygmt/helpers/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@
when the subplot was defined. **Note**: *row*, *col*, and *index*
all start at 0.
""",
"f": r"""
coltypes : str
[**i**\|\ **o**]\ *colinfo*.
Specify data types of input and/or output columns (time or
geographical data). Full documentation is at
:gmt-docs:`gmt.html#f-full`.
""",
"j": r"""
distcalc : str
**e**\|\ **f**\|\ **g**.
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
X="xshift",
Y="yshift",
c="panel",
f="coltypes",
p="perspective",
t="transparency",
)
Expand Down Expand Up @@ -69,6 +70,7 @@ def basemap(self, **kwargs):
{V}
{XY}
{c}
{f}
{p}
{t}
"""
Expand Down
3 changes: 2 additions & 1 deletion pygmt/src/blockmedian.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


@fmt_docstring
@use_alias(I="spacing", R="region", V="verbose")
@use_alias(I="spacing", R="region", V="verbose", f="coltypes")
@kwargs_to_strings(R="sequence")
def blockmedian(table, outfile=None, **kwargs):
r"""
Expand Down Expand Up @@ -52,6 +52,7 @@ def blockmedian(table, outfile=None, **kwargs):
file.

{V}
{f}

Returns
-------
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/grdcontour.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
X="xshift",
Y="yshift",
c="panel",
f="coltypes",
p="perspective",
t="transparency",
)
Expand Down Expand Up @@ -84,6 +85,7 @@ def grdcontour(self, grid, **kwargs):
{W}
{XY}
{c}
{f}
label : str
Add a legend entry for the contour being plotted. Normally, the
annotated contour is selected for the legend. You can select the
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/grdcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
S="circ_subregion",
V="verbose",
Z="z_subregion",
f="coltypes",
)
@kwargs_to_strings(R="sequence")
def grdcut(grid, **kwargs):
Expand Down Expand Up @@ -76,6 +77,7 @@ def grdcut(grid, **kwargs):
area.

{V}
{f}

Returns
-------
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/grdfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
R="region",
T="toggle",
V="verbose",
f="coltypes",
)
@kwargs_to_strings(R="sequence")
def grdfilter(grid, **kwargs):
Expand Down Expand Up @@ -108,6 +109,7 @@ def grdfilter(grid, **kwargs):
opposite of the input grid. [Default gives the same registration as the
input grid].
{V}
{f}

Returns
-------
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
Y="yshift",
n="interpolation",
c="panel",
f="coltypes",
p="perspective",
t="transparency",
x="cores",
Expand Down Expand Up @@ -143,6 +144,7 @@ def grdimage(self, grid, **kwargs):
{V}
{XY}
{c}
{f}
{n}
{p}
{t}
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/grdinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
R="region",
T="nearest_multiple",
V="verbose",
f="coltypes",
)
@kwargs_to_strings(D="sequence", I="sequence", R="sequence")
def grdinfo(grid, **kwargs):
Expand Down Expand Up @@ -100,6 +101,7 @@ def grdinfo(grid, **kwargs):
We report the result via the text string *zmin/zmax* or *zmin/zmax/dz*
(if *dz* was given) as expected by :meth:`pygmt.makecpt`.
{V}
{f}

Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/grdtrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


@fmt_docstring
@use_alias(n="interpolation", V="verbose")
@use_alias(V="verbose", f="coltypes", n="interpolation")
def grdtrack(points, grid, newcolname=None, outfile=None, **kwargs):
"""
Sample grids at specified (x,y) locations.
Expand Down Expand Up @@ -55,7 +55,7 @@ def grdtrack(points, grid, newcolname=None, outfile=None, **kwargs):
file.

{V}

{f}
{n}

Returns
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/grdview.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
X="xshift",
Y="yshift",
c="panel",
f="coltypes",
p="perspective",
t="transparency",
)
Expand Down Expand Up @@ -107,6 +108,7 @@ def grdview(self, grid, **kwargs):
{V}
{XY}
{c}
{f}
{p}
{t}
"""
Expand Down
3 changes: 2 additions & 1 deletion pygmt/src/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


@fmt_docstring
@use_alias(C="per_column", I="spacing", T="nearest_multiple", V="verbose")
@use_alias(C="per_column", I="spacing", T="nearest_multiple", V="verbose", f="coltypes")
def info(table, **kwargs):
r"""
Get information about data tables.
Expand Down Expand Up @@ -48,6 +48,7 @@ def info(table, **kwargs):
of dz and output this in the form ``[zmin, zmax, dz]``.

{V}
{f}

Returns
-------
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
i="columns",
l="label",
c="panel",
f="coltypes",
p="perspective",
t="transparency",
)
Expand Down Expand Up @@ -183,6 +184,7 @@ def plot(self, x=None, y=None, data=None, sizes=None, direction=None, **kwargs):
``color='+z'``. To apply it to the pen color, append **+z** to
``pen``.
{c}
{f}
columns : str or 1d array
Choose which columns are x, y, color, and size, respectively if
input is provided via *data*. E.g. ``columns = [0, 1]`` or
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/plot3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
i="columns",
l="label",
c="panel",
f="coltypes",
p="perspective",
t="transparency",
)
Expand Down Expand Up @@ -153,6 +154,7 @@ def plot3d(
``color='+z'``. To apply it to the pen color, append **+z** to
``pen``.
{c}
{f}
label : str
Add a legend entry for the symbol or line being plotted.
{p}
Expand Down
3 changes: 2 additions & 1 deletion pygmt/src/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


@fmt_docstring
@use_alias(I="spacing", R="region", G="outfile", V="verbose")
@use_alias(I="spacing", R="region", G="outfile", V="verbose", f="coltypes")
@kwargs_to_strings(R="sequence")
def surface(x=None, y=None, z=None, data=None, **kwargs):
r"""
Expand Down Expand Up @@ -60,6 +60,7 @@ def surface(x=None, y=None, z=None, data=None, **kwargs):
to store the grid in.

{V}
{f}

Returns
-------
Expand Down
2 changes: 2 additions & 0 deletions pygmt/src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
X="xshift",
Y="yshift",
c="panel",
f="coltypes",
p="perspective",
t="transparency",
)
Expand Down Expand Up @@ -143,6 +144,7 @@ def text_(
{V}
{XY}
{c}
{f}
{p}
{t}
"""
Expand Down