Skip to content

Commit a6b85e2

Browse files
committed
Merge branch 'main' into optional-context
2 parents b74e9c6 + 9be073a commit a6b85e2

File tree

5 files changed

+28
-17
lines changed

5 files changed

+28
-17
lines changed

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The following people have contributed code and/or documentation to the project
1919
* [Liam Toney](https://liam.earth/) | [0000-0003-0167-9433](https://orcid.org/0000-0003-0167-9433) | University of Alaska Fairbanks, USA
2020
* [Malte Ziebarth](https://github.com/mjziebarth) | [0000-0002-5190-4478](https://orcid.org/0000-0002-5190-4478) | GFZ German Research Centre for Geosciences, Germany
2121
* [Max Jones](https://github.com/maxrjones) | [0000-0003-0180-8928](https://orcid.org/0000-0003-0180-8928) | University of Hawai'i at Mānoa, USA
22-
* [Michael Grund](https://github.com/michaelgrund) | [0000-0001-8759-2018](https://orcid.org/0000-0001-8759-2018) | Innoplexia GmbH, Germany
22+
* [Michael Grund](https://github.com/michaelgrund) | [0000-0001-8759-2018](https://orcid.org/0000-0001-8759-2018) | SNP Innovation Lab GmbH, Germany
2323
* [Tyler Newton](http://www.tnewton.com/) | [0000-0002-1560-6553](https://orcid.org/0000-0002-1560-6553) | University of Oregon, USA
2424
* [Wei Ji Leong](https://github.com/weiji14) | [0000-0003-2354-1988](https://orcid.org/0000-0003-2354-1988) | Development Seed, USA
2525
* [William Schlitzer](https://github.com/willschlitzer) | [0000-0002-5843-2282](https://orcid.org/0000-0002-5843-2282) | Unaffiliated

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ authors:
2222
orcid: https://orcid.org/0000-0002-5843-2282
2323
- given-names: Michael
2424
family-names: Grund
25-
affiliation: Innoplexia GmbH, Germany
25+
affiliation: SNP Innovation Lab GmbH, Germany
2626
orcid: https://orcid.org/0000-0001-8759-2018
2727
- given-names: Max
2828
family-names: Jones

pygmt/src/grdfill.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
@use_alias(
2121
A="mode",
2222
G="outgrid",
23+
N="no_data",
2324
R="region",
2425
V="verbose",
2526
)
@@ -28,10 +29,10 @@ def grdfill(grid, **kwargs):
2829
r"""
2930
Fill blank areas from a grid file.
3031
31-
Read a grid that presumably has unfilled holes that the user
32-
wants to fill in some fashion. Holes are identified by NaN values but
33-
this criteria can be changed. There are several different algorithms that
34-
can be used to replace the hole values.
32+
Read a grid that presumably has unfilled holes that the user wants to
33+
fill in some fashion. Holes are identified by NaN values but this
34+
criteria can be changed via the ``no_data`` parameter. There are several
35+
different algorithms that can be used to replace the hole values.
3536
3637
Full option list at :gmt-docs:`grdfill.html`
3738
@@ -52,6 +53,9 @@ def grdfill(grid, **kwargs):
5253
where (*X,Y*) are the node dimensions of the grid]), or
5354
**s** for bicubic spline (optionally append a *tension*
5455
parameter [Default is no tension]).
56+
no_data : int or float
57+
Set the node value used to identify a point as a member of a hole
58+
[Default is NaN].
5559
5660
{region}
5761
{verbose}

pygmt/src/grdfilter.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,12 @@ def grdfilter(grid, **kwargs):
119119
- None if ``outgrid`` is set (grid output will be stored in file set by
120120
``outgrid``)
121121
122-
Example
123-
-------
122+
Examples
123+
--------
124124
>>> import os
125125
>>> import pygmt
126-
127-
>>> # Apply a filter of 600km (full width) to the @earth_relief_30m file
128-
>>> # and return a filtered field (saved as netcdf)
126+
>>> # Apply a filter of 600 km (full width) to the @earth_relief_30m_g file
127+
>>> # and return a filtered field (saved as NetCDF)
129128
>>> pygmt.grdfilter(
130129
... grid="@earth_relief_30m_g",
131130
... filter="m600",
@@ -134,10 +133,9 @@ def grdfilter(grid, **kwargs):
134133
... spacing=0.5,
135134
... outgrid="filtered_pacific.nc",
136135
... )
137-
>>> os.remove("filtered_pacific.nc") # cleanup file
138-
139-
>>> # Apply a gaussian smoothing filter of 600 km in the input data array,
140-
>>> # and returns a filtered data array with the smoothed field.
136+
>>> os.remove("filtered_pacific.nc") # Cleanup file
137+
>>> # Apply a Gaussian smoothing filter of 600 km to the input DataArray
138+
>>> # and return a filtered DataArray with the smoothed field
141139
>>> grid = pygmt.datasets.load_earth_relief()
142140
>>> smooth_field = pygmt.grdfilter(grid=grid, filter="g600", distance="4")
143141
"""

pygmt/src/image.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77

88
@fmt_docstring
99
@use_alias(
10-
R="region",
11-
J="projection",
1210
D="position",
1311
F="box",
12+
G="bitcolor",
13+
J="projection",
1414
M="monochrome",
15+
R="region",
1516
V="verbose",
1617
c="panel",
1718
p="perspective",
@@ -49,6 +50,14 @@ def image(self, imagefile, **kwargs):
4950
[**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
5051
If set to ``True``, draw a rectangular border around the image
5152
using :gmt-term:`MAP_FRAME_PEN`.
53+
bitcolor : str or list
54+
[*color*][**+b**\|\ **f**\|\ **t**].
55+
Change certain pixel values to another color or make them transparent.
56+
For 1-bit images you can specify an alternate *color* for the
57+
background (**+b**) or the foreground (**+f**) pixels, or give no color
58+
to make those pixels transparent. Can be repeated with different
59+
settings. Alternatively, for color images you can select a single
60+
*color* that should be made transparent instead (**+t**).
5261
monochrome : bool
5362
Convert color image to monochrome grayshades using the (television)
5463
YIQ-transformation.

0 commit comments

Comments
 (0)