Skip to content

Commit

Permalink
DOC: Make bullet point lists consistent in docstrings (":" and lower-…
Browse files Browse the repository at this point in the history
…case) Part II (#3752)
  • Loading branch information
seisman authored Jan 9, 2025
1 parent 664a9ed commit c7198e6
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 67 deletions.
70 changes: 35 additions & 35 deletions pygmt/helpers/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
(using ``binary="o"``), where *ncols* is the number of data columns
of *type*, which must be one of:
- **c** - int8_t (1-byte signed char)
- **u** - uint8_t (1-byte unsigned char)
- **h** - int16_t (2-byte signed int)
- **H** - uint16_t (2-byte unsigned int)
- **i** - int32_t (4-byte signed int)
- **I** - uint32_t (4-byte unsigned int)
- **l** - int64_t (8-byte signed int)
- **L** - uint64_t (8-byte unsigned int)
- **f** - 4-byte single-precision float
- **d** - 8-byte double-precision float
- **x** - use to skip *ncols* anywhere in the record
- **c**: int8_t (1-byte signed char)
- **u**: uint8_t (1-byte unsigned char)
- **h**: int16_t (2-byte signed int)
- **H**: uint16_t (2-byte unsigned int)
- **i**: int32_t (4-byte signed int)
- **I**: uint32_t (4-byte unsigned int)
- **l**: int64_t (8-byte signed int)
- **L**: uint64_t (8-byte unsigned int)
- **f**: 4-byte single-precision float
- **d**: 8-byte double-precision float
- **x**: use to skip *ncols* anywhere in the record
For records with mixed types, append additional comma-separated
combinations of *ncols* *type* (no space). The following modifiers
Expand Down Expand Up @@ -84,9 +84,9 @@
**e**\|\ **f**\|\ **g**.
Determine how spherical distances are calculated.
- **e** - Ellipsoidal (or geodesic) mode
- **f** - Flat Earth mode
- **g** - Great circle distance [Default]
- **e**: Ellipsoidal (or geodesic) mode
- **f**: Flat Earth mode
- **g**: Great circle distance [Default]
All spherical distance calculations depend on the current ellipsoid
(:gmt-term:`PROJ_ELLIPSOID`), the definition of the mean radius
Expand Down Expand Up @@ -118,16 +118,16 @@
a list with each item containing a string describing one set of
criteria.
- **x**\|\ **X** - define a gap when there is a large enough
- **x**\|\ **X**: define a gap when there is a large enough
change in the x coordinates (upper case to use projected
coordinates).
- **y**\|\ **Y** - define a gap when there is a large enough
- **y**\|\ **Y**: define a gap when there is a large enough
change in the y coordinates (upper case to use projected
coordinates).
- **d**\|\ **D** - define a gap when there is a large enough
- **d**\|\ **D**: define a gap when there is a large enough
distance between coordinates (upper case to use projected
coordinates).
- **z** - define a gap when there is a large enough change in
- **z**: define a gap when there is a large enough change in
the z data. Use **+c**\ *col* to change the z data column
[Default *col* is 2 (i.e., 3rd column)].
Expand All @@ -146,9 +146,9 @@
One of the following modifiers can be appended:
- **+n** - specify that the previous value minus the current
- **+n**: specify that the previous value minus the current
column value must exceed *gap* for a break to be imposed.
- **+p** - specify that the current value minus the previous
- **+p**: specify that the current value minus the previous
value must exceed *gap* for a break to be imposed.""",
"grid": r"""
grid : str or xarray.DataArray
Expand Down Expand Up @@ -367,13 +367,13 @@
Select verbosity level [Default is **w**], which modulates the messages
written to stderr. Choose among 7 levels of verbosity:
- **q** - Quiet, not even fatal error messages are produced
- **e** - Error messages only
- **w** - Warnings [Default]
- **t** - Timings (report runtimes for time-intensive algorithms)
- **i** - Informational messages (same as ``verbose=True``)
- **c** - Compatibility warnings
- **d** - Debugging messages""",
- **q**: Quiet, not even fatal error messages are produced
- **e**: Error messages only
- **w**: Warnings [Default]
- **t**: Timings (report runtimes for time-intensive algorithms)
- **i**: Informational messages (same as ``verbose=True``)
- **c**: Compatibility warnings
- **d**: Debugging messages""",
"wrap": r"""
wrap : str
**y**\|\ **a**\|\ **w**\|\ **d**\|\ **h**\|\ **m**\|\ **s**\|\
Expand All @@ -382,14 +382,14 @@
different column if selected via **+c**\ *col*. The following
cyclical coordinate transformations are supported:
- **y** - yearly cycle (normalized)
- **a** - annual cycle (monthly)
- **w** - weekly cycle (day)
- **d** - daily cycle (hour)
- **h** - hourly cycle (minute)
- **m** - minute cycle (second)
- **s** - second cycle (second)
- **c** - custom cycle (normalized)
- **y**: yearly cycle (normalized)
- **a**: annual cycle (monthly)
- **w**: weekly cycle (day)
- **d**: daily cycle (hour)
- **h**: hourly cycle (minute)
- **m**: minute cycle (second)
- **s**: second cycle (second)
- **c**: custom cycle (normalized)
Full documentation is at :gmt-docs:`gmt.html#w-full`.""",
}
Expand Down
14 changes: 7 additions & 7 deletions pygmt/src/grdfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ def grdfilter(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None
[/*width2*\][*modifiers*].
Name of the filter type you wish to apply, followed by the *width*:
- **b** - Box Car
- **c** - Cosine Arch
- **g** - Gaussian
- **o** - Operator
- **m** - Median
- **p** - Maximum Likelihood probability
- **h** - Histogram
- **b**: Box Car
- **c**: Cosine Arch
- **g**: Gaussian
- **o**: Operator
- **m**: Median
- **p**: Maximum Likelihood probability
- **h**: Histogram
distance : str
State how the grid (x,y) relates to the filter *width*:
Expand Down
14 changes: 7 additions & 7 deletions pygmt/src/grdgradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ def grdgradient(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | No
Find the direction of the positive (up-slope) gradient of the data.
The following options are supported:
- **a** - Find the aspect (i.e., the down-slope direction)
- **c** - Use the conventional Cartesian angles measured
- **a**: Find the aspect (i.e., the down-slope direction)
- **c**: Use the conventional Cartesian angles measured
counterclockwise from the positive x (east) direction.
- **o** - Report orientations (0-180) rather than directions (0-360).
- **n** - Add 90 degrees to all angles (e.g., to give local strikes of
- **o**: Report orientations (0-180) rather than directions (0-360).
- **n**: Add 90 degrees to all angles (e.g., to give local strikes of
the surface).
radiance : str or list
[**m**\|\ **s**\|\ **p**]\ *azim/elev*\ [**+a**\ *ambient*][**+d**\
Expand Down Expand Up @@ -102,14 +102,14 @@ def grdgradient(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | No
given, it is set to the average of :math:`g`. The following forms are
supported:
- **True** - Normalize using :math:`g_n = \mbox{{amp}}\
- **True**: Normalize using :math:`g_n = \mbox{{amp}}\
(\frac{{g - \mbox{{offset}}}}{{max(|g - \mbox{{offset}}|)}})`
- **e** - Normalize using a cumulative Laplace distribution yielding:
- **e**: Normalize using a cumulative Laplace distribution yielding:
:math:`g_n = \mbox{{amp}}(1 - \
\exp{{(\sqrt{{2}}\frac{{g - \mbox{{offset}}}}{{\sigma}}))}}`, where
:math:`\sigma` is estimated using the L1 norm of
:math:`(g - \mbox{{offset}})` if it is not given.
- **t** - Normalize using a cumulative Cauchy distribution yielding:
- **t**: Normalize using a cumulative Cauchy distribution yielding:
:math:`g_n = \
\frac{{2(\mbox{{amp}})}}{{\pi}}(\tan^{{-1}}(\frac{{g - \
\mbox{{offset}}}}{{\sigma}}))` where :math:`\sigma` is estimated
Expand Down
10 changes: 5 additions & 5 deletions pygmt/src/grdview.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def grdview(self, grid, **kwargs):
Specify cover type of the grid.
Select one of following settings:
- **m** - mesh plot [Default].
- **mx** or **my** - waterfall plots (row or column profiles).
- **s** - surface plot, and optionally append **m** to have mesh lines
- **m**: mesh plot [Default].
- **mx** or **my**: waterfall plots (row or column profiles).
- **s**: surface plot, and optionally append **m** to have mesh lines
drawn on top of the surface.
- **i** - image plot.
- **c** - Same as **i** but will make nodes with z = NaN transparent.
- **i**: image plot.
- **c**: Same as **i** but will make nodes with z = NaN transparent.
For any of these choices, you may force a monochrome image by
appending the modifier **+m**.
Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/sphdistance.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ def sphdistance(
Specify the quantity that should be assigned to the grid nodes [Default
is **d**]:
- **d** - compute distances to the nearest data point
- **n** - assign the ID numbers of the Voronoi polygons that each
- **d**: compute distances to the nearest data point
- **n**: assign the ID numbers of the Voronoi polygons that each
grid node is inside
- **z** - assign all nodes inside the polygon the z-value of the center
- **z**: assign all nodes inside the polygon the z-value of the center
node for a natural nearest-neighbor grid.
Optionally, append the resampling interval along Voronoi arcs in
Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/x2sys_cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ def x2sys_cross(
Sets the interpolation mode for estimating values at the crossover.
Choose among:
- **l** - Linear interpolation [Default].
- **a** - Akima spline interpolation.
- **c** - Cubic spline interpolation.
- **l**: Linear interpolation [Default].
- **a**: Akima spline interpolation.
- **c**: Cubic spline interpolation.
coe : str
Use **e** for external COEs only, and **i** for internal COEs only
Expand Down
14 changes: 7 additions & 7 deletions pygmt/src/x2sys_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ def x2sys_init(tag, **kwargs):
programs. Append **d** for distance or **s** for speed, then give the
desired *unit* as:
- **c** - Cartesian userdist or userdist/usertime
- **e** - meters or m/s
- **f** - feet or ft/s
- **k** - kilometers or km/hr
- **m** - miles or mi/hr
- **n** - nautical miles or knots
- **u** - survey feet or sft/s
- **c**: Cartesian userdist or userdist/usertime
- **e**: meters or m/s
- **f**: feet or ft/s
- **k**: kilometers or km/hr
- **m**: miles or mi/hr
- **n**: nautical miles or knots
- **u**: survey feet or sft/s
[Default is ``units=["dk", "se"]`` (km and m/s) if ``discontinuity`` is
set, and ``units=["dc", "sc"]`` otherwise (e.g., for Cartesian units)].
Expand Down

0 comments on commit c7198e6

Please sign in to comment.