Skip to content

Commit 90db4bb

Browse files
DOC: Make bullet point lists consistent in docstrings (":" and lower-case) Part I (#3572)
1 parent eca2edd commit 90db4bb

File tree

6 files changed

+81
-85
lines changed

6 files changed

+81
-85
lines changed

pygmt/src/binstats.py

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,31 @@ def binstats(data, outgrid: str | None = None, **kwargs) -> xr.DataArray | None:
4343
Parameters
4444
----------
4545
data : str, {table-like}
46-
A file name of an ASCII data table or a 2-D
47-
{table-classes}.
46+
A file name of an ASCII data table or a 2-D {table-classes}.
4847
{outgrid}
4948
statistic : str
5049
**a**\|\ **d**\|\ **g**\|\ **i**\|\ **l**\|\ **L**\|\ **m**\|\ **n**\
5150
\|\ **o**\|\ **p**\|\ **q**\ [*quant*]\|\ **r**\|\ **s**\|\ **u**\
5251
\|\ **U**\|\ **z**.
5352
Choose the statistic that will be computed per node based on the
54-
points that are within *radius* distance of the node. Select one of:
53+
points that are within *radius* distance of the node. Select one of:
5554
56-
- **a** for mean (average)
57-
- **d** for median absolute deviation (MAD)
58-
- **g** for full (max-min) range
59-
- **i** for 25-75% interquartile range
60-
- **l** for minimum (low)
61-
- **L** for minimum of positive values only
62-
- **m** for median
63-
- **n** the number of values
64-
- **o** for LMS scale
65-
- **p** for mode (maximum likelihood)
66-
- **q** for selected quantile (append desired quantile in
67-
0-100% range [50])
68-
- **r** for the r.m.s.
69-
- **s** for standard deviation
70-
- **u** for maximum (upper)
71-
- **U** for maximum of negative values only
72-
- **z** for the sum
55+
- **a**: mean (average)
56+
- **d**: median absolute deviation (MAD)
57+
- **g**: full (max-min) range
58+
- **i**: 25-75% interquartile range
59+
- **l**: minimum (low)
60+
- **L**: minimum of positive values only
61+
- **m**: median
62+
- **n**: number of values
63+
- **o**: LMS scale
64+
- **p**: mode (maximum likelihood)
65+
- **q**: selected quantile (append desired quantile in 0-100% range [50])
66+
- **r**: root mean square (RMS)
67+
- **s**: standard deviation
68+
- **u**: maximum (upper)
69+
- **U**: maximum of negative values only
70+
- **z**: sum
7371
empty : float
7472
Set the value assigned to empty nodes [Default is NaN].
7573
normalize : bool

pygmt/src/blockm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ def blockmean(
126126
[**m**\|\ **n**\|\ **s**\|\ **w**].
127127
Type of summary values calculated by blockmean.
128128
129-
- **m** - reports mean value [Default]
130-
- **n** - report the number of input points inside each block
131-
- **s** - report the sum of all z-values inside a block
132-
- **w** - report the sum of weights
129+
- **m**: reports mean value [Default]
130+
- **n**: report the number of input points inside each block
131+
- **s**: report the sum of all z-values inside a block
132+
- **w**: report the sum of weights
133133
{region}
134134
{verbose}
135135
{aspatial}

pygmt/src/coast.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,26 @@ def coast(self, **kwargs):
8787
Choose from the list of river types below; pass a list to ``rivers``
8888
to use multiple arguments.
8989
90-
- ``0``: Double-lined rivers (river-lakes)
91-
- ``1``: Permanent major rivers
92-
- ``2``: Additional major rivers
93-
- ``3``: Additional rivers
94-
- ``4``: Minor rivers
95-
- ``5``: Intermittent rivers - major
96-
- ``6``: Intermittent rivers - additional
97-
- ``7``: Intermittent rivers - minor
98-
- ``8``: Major canals
99-
- ``9``: Minor canals
100-
- ``10``: Irrigation canals
90+
- ``0``: double-lined rivers (river-lakes)
91+
- ``1``: permanent major rivers
92+
- ``2``: additional major rivers
93+
- ``3``: additional rivers
94+
- ``4``: minor rivers
95+
- ``5``: intermittent rivers - major
96+
- ``6``: intermittent rivers - additional
97+
- ``7``: intermittent rivers - minor
98+
- ``8``: major canals
99+
- ``9``: minor canals
100+
- ``10``: irrigation canals
101101
102102
You can also choose from several preconfigured river groups:
103103
104-
- ``"a"``: All rivers and canals (0-10)
105-
- ``"A"``: All rivers and canals except river-lakes (1-10)
106-
- ``"r"``: All permanent rivers (0-4)
107-
- ``"R"``: All permanent rivers except river-lakes (1-4)
108-
- ``"i"``: All intermittent rivers (5-7)
109-
- ``"c"``: All canals (8-10)
104+
- ``"a"``: rivers and canals (``0`` - ``10``)
105+
- ``"A"``: rivers and canals except river-lakes (``1`` - ``10``)
106+
- ``"r"``: permanent rivers (``0`` - ``4``)
107+
- ``"R"``: permanent rivers except river-lakes (``1`` - ``4``)
108+
- ``"i"``: intermittent rivers (``5`` - ``7``)
109+
- ``"c"``: canals (``8`` - ``10``)
110110
111111
map_scale : str
112112
[**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+w**\ *length*.
@@ -137,10 +137,10 @@ def coast(self, **kwargs):
137137
Choose from the list of boundaries below. Pass a list to ``borders`` to
138138
use multiple arguments.
139139
140-
- ``1``: National boundaries
141-
- ``2``: State boundaries within the Americas
142-
- ``3``: Marine boundaries
143-
- ``"a"``: All boundaries (1-3)
140+
- ``1``: national boundaries
141+
- ``2``: state boundaries within the Americas
142+
- ``3``: marine boundaries
143+
- ``"a"``: all boundaries (``1`` - ``3``)
144144
145145
water : str
146146
Select filling "wet" areas.

pygmt/src/dimfilter.py

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -51,34 +51,32 @@ def dimfilter(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None
5151
distance : int or str
5252
Distance flag tells how grid (x,y) relates to filter width, as follows:
5353
54-
- **0**\ : grid (x,y) in same units as *width*, Cartesian distances.
55-
- **1**\ : grid (x,y) in degrees, *width* in kilometers, Cartesian
56-
distances.
57-
- **2**\ : grid (x,y) in degrees, *width* in km, dx scaled by
58-
cos(middle y), Cartesian distances.
54+
- **0**: grid (x,y) in same units as *width*, Cartesian distances.
55+
- **1**: grid (x,y) in degrees, *width* in kilometers, Cartesian distances.
56+
- **2**: grid (x,y) in degrees, *width* in km, dx scaled by cos(middle y),
57+
Cartesian distances.
5958
6059
The above options are fastest because they allow weight matrix to be
6160
computed only once. The next two options are slower because they
6261
recompute weights for each latitude.
6362
64-
- **3**\ : grid (x,y) in degrees, *width* in km, dx scaled by
65-
cosine(y), Cartesian distance calculation.
66-
- **4**\ : grid (x,y) in degrees, *width* in km, Spherical distance
67-
calculation.
63+
- **3**: grid (x,y) in degrees, *width* in km, dx scaled by cosine(y),
64+
Cartesian distance calculation.
65+
- **4**: grid (x,y) in degrees, *width* in km, Spherical distance calculation.
6866
filter : str
6967
**x**\ *width*\ [**+l**\|\ **u**].
7068
Set the primary filter type. Choose among convolution and
7169
non-convolution filters. Use the filter code **x** followed by
7270
the full diameter *width*. Available convolution filters are:
7371
74-
- (**b**) Boxcar: All weights are equal.
75-
- (**c**) Cosine Arch: Weights follow a cosine arch curve.
76-
- (**g**) Gaussian: Weights are given by the Gaussian function.
72+
- **b**: boxcar. Aall weights are equal.
73+
- **c**: cosine arch. Weights follow a cosine arch curve.
74+
- **g**: Gaussian. Weights are given by the Gaussian function.
7775
7876
Non-convolution filters are:
7977
80-
- (**m**) Median: Returns median value.
81-
- (**p**) Maximum likelihood probability (a mode estimator): Return
78+
- **m**: median. Returns median value.
79+
- **p**: maximum likelihood probability (a mode estimator). Return
8280
modal value. If more than one mode is found we return their average
8381
value. Append **+l** or **+h** to the filter width if you want
8482
to return the smallest or largest of each sector's modal values.
@@ -89,11 +87,11 @@ def dimfilter(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None
8987
set to 1, the secondary filter is not effective. Available secondary
9088
filters **x** are:
9189
92-
- (**l**) Lower: Return the minimum of all filtered values.
93-
- (**u**) Upper: Return the maximum of all filtered values.
94-
- (**a**) Average: Return the mean of all filtered values.
95-
- (**m**) Median: Return the median of all filtered values.
96-
- (**p**) Mode: Return the mode of all filtered values:
90+
- **l**: lower. Return the minimum of all filtered values.
91+
- **u**: upper. Return the maximum of all filtered values.
92+
- **a**: average. Return the mean of all filtered values.
93+
- **m**: median. Return the median of all filtered values.
94+
- **p**: mode. Return the mode of all filtered values.
9795
If more than one mode is found we return their average
9896
value. Append **+l** or **+h** to the sectors if you rather want to
9997
return the smallest or largest of the modal values.

pygmt/src/filter1d.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,23 @@ def filter1d(
5757
5858
Available convolution filter types are:
5959
60-
- (**b**) Boxcar: All weights are equal.
61-
- (**c**) Cosine Arch: Weights follow a cosine arch curve.
62-
- (**g**) Gaussian: Weights are given by the Gaussian function.
63-
- (**f**) Custom: Instead of *width* give name of a one-column file
60+
- **b**: boxcar. All weights are equal.
61+
- **c**: cosine arch. Weights follow a cosine arch curve.
62+
- **g**: Gaussian. Weights are given by the Gaussian function.
63+
- **f**: custom. Instead of *width* give name of a one-column file
6464
with your own weight coefficients.
6565
6666
Non-convolution filter types are:
6767
68-
- (**m**) Median: Returns median value.
69-
- (**p**) Maximum likelihood probability (a mode estimator): Return
68+
- **m**: median. Returns median value.
69+
- **p**: maximum likelihood probability (a mode estimator). Return
7070
modal value. If more than one mode is found we return their average
7171
value. Append **+l** or **+u** if you rather want
7272
to return the lowermost or uppermost of the modal values.
73-
- (**l**) Lower: Return the minimum of all values.
74-
- (**L**) Lower: Return minimum of all positive values only.
75-
- (**u**) Upper: Return maximum of all values.
76-
- (**U**) Upper: Return maximum of all negative values only.
73+
- **l**: lower (absolute). Return the minimum of all values.
74+
- **L**: lower. Return minimum of all positive values only.
75+
- **u**: upper (absolute). Return maximum of all values.
76+
- **U**: upper. Return maximum of all negative values only.
7777
7878
Upper case type **B**, **C**, **G**, **M**, **P**, **F** will use
7979
robust filter versions: i.e., replace outliers (2.5 L1 scale off

pygmt/src/grd2xyz.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,17 @@ def grd2xyz(
9696
appending **y**. If the byte-order needs to be swapped, append
9797
**w**. Select one of several data types (all binary except **a**):
9898
99-
* **a** ASCII representation of a single item per record
100-
* **c** int8_t, signed 1-byte character
101-
* **u** uint8_t, unsigned 1-byte character
102-
* **h** int16_t, short 2-byte integer
103-
* **H** uint16_t, unsigned short 2-byte integer
104-
* **i** int32_t, 4-byte integer
105-
* **I** uint32_t, unsigned 4-byte integer
106-
* **l** int64_t, long (8-byte) integer
107-
* **L** uint64_t, unsigned long (8-byte) integer
108-
* **f** 4-byte floating point single precision
109-
* **d** 8-byte floating point double precision
99+
- **a**: ASCII representation of a single item per record
100+
- **c**: int8_t, signed 1-byte character
101+
- **u**: uint8_t, unsigned 1-byte character
102+
- **h**: int16_t, short 2-byte integer
103+
- **H**: uint16_t, unsigned short 2-byte integer
104+
- **i**: int32_t, 4-byte integer
105+
- **I**: uint32_t, unsigned 4-byte integer
106+
- **l**: int64_t, long (8-byte) integer
107+
- **L**: uint64_t, unsigned long (8-byte) integer
108+
- **f**: 4-byte floating point single precision
109+
- **d**: 8-byte floating point double precision
110110
111111
Default format is scanline orientation of ASCII numbers: **TLa**.
112112
{binary}

0 commit comments

Comments
 (0)