Skip to content

Commit 83e509e

Browse files
committed
Alias critical (F) for grdtrack
1 parent bae11a6 commit 83e509e

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

pygmt/src/grdtrack.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
GMTTempFile,
99
build_arg_string,
1010
data_kind,
11-
kwargs_to_strings,
1211
fmt_docstring,
12+
kwargs_to_strings,
1313
use_alias,
1414
)
1515

@@ -20,6 +20,7 @@
2020
C="crossprofile",
2121
D="dfile",
2222
E="profile",
23+
F="critical",
2324
R="region",
2425
N="no_skip",
2526
V="verbose",
@@ -144,6 +145,30 @@ def grdtrack(points, grid, newcolname=None, outfile=None, **kwargs):
144145
is Great Circle]. **Note**: If ``crossprofile`` is set and *spacing* is
145146
given then that sampling scheme overrules any modifier set in
146147
``profile``.
148+
critical : str
149+
[**+b**][**+n**][**+r**][**+z**\ *z0*].
150+
Find critical points along each cross-profile as a function of
151+
along-track distance. Requires ``crossprofile`` and a single input grid
152+
(*z*). We examine each cross-profile generated and report (*dist*,
153+
*lonc*, *latc*, *distc*, *azimuthc*, *zc*) at the center peak of
154+
maximum *z* value, (*lonl*, *latl*, *distl*) and (*lonr*, *latr*,
155+
*distr*) at the first and last non-NaN point whose *z*-value exceeds
156+
*z0*, respectively, and the *width* based on the two extreme points
157+
found. Here, *dist* is the distance along the original input
158+
``points`` and the other 12 output columns are a function of that
159+
distance. When searching for the center peak and the extreme first and
160+
last values that exceed the threshold we assume the profile is positive
161+
up. If we instead are looking for a trough then you must use **+n** to
162+
temporarily flip the profile to positive. The threshold *z0* value is
163+
always given as >= 0; use **+z** to change it [Default is 0].
164+
Alternatively, use **+b** to determine the balance point and standard
165+
deviation of the profile; this is the weighted mean and weighted
166+
standard deviation of the distances, with *z* acting as the weight.
167+
Finally, use **+r** to obtain the weighted rms about the cross-track
168+
center (*distc* == 0). **Note**: We round the exact results to the
169+
nearest distance nodes along the cross-profiles. We write 13 output
170+
columns per track: *dist, lonc, latc, distc, azimuthc, zc, lonl, latl,
171+
distl, lonr, latr, distr, width*.
147172
{R}
148173
no_skip : bool
149174
Do *not* skip points that fall outside the domain of the grid(s)

0 commit comments

Comments
 (0)