@@ -72,16 +72,15 @@ def x2sys_init(tag, **kwargs):
72
72
r"""
73
73
Initialize a new x2sys track database.
74
74
75
- x2sys_init is the starting point for anyone wishing to use x2sys; it
76
- initializes a set of data bases that are particular to one kind of track
77
- data. These data, their associated data bases, and key parameters are given
78
- a short-hand notation called an x2sys TAG. The TAG keeps track of settings
79
- such as file format, whether the data are geographic or not, and the
80
- binning resolution for track indices.
75
+ Serves as the starting point for x2sys and initializes a set of data bases
76
+ that are particular to one kind of track data. These data, their associated
77
+ data bases, and key parameters are given a short-hand notation called an
78
+ x2sys TAG. The TAG keeps track of settings such as file format, whether the
79
+ data are geographic or not, and the binning resolution for track indices.
81
80
82
- Before you can run x2sys_init you must set the environmental parameter
83
- X2SYS_HOME to a directory where you have write permission, which is where
84
- x2sys can keep track of your settings.
81
+ Before you can run :meth:`pygmt. x2sys_init` you must set the environmental
82
+ parameter X2SYS_HOME to a directory where you have write permission, which
83
+ is where x2sys can keep track of your settings.
85
84
86
85
Full option list at :gmt-docs:`supplements/x2sys/x2sys_init.html`
87
86
@@ -93,68 +92,69 @@ def x2sys_init(tag, **kwargs):
93
92
The unique name of this data type x2sys TAG.
94
93
95
94
fmtfile : str
96
- Format definition file prefix for this data set [See Format Definition
97
- Files for more information]. Specify full path if the file is not in
98
- the current directory.
95
+ Format definition file prefix for this data set (see
96
+ :gmt-docs:`GMT's Format Definition Files
97
+ <supplements/x2sys/x2sys_init.html#format-definition-files>`
98
+ for more information). Specify full path if the file is not in the
99
+ current directory.
99
100
100
101
Some file formats already have definition files premade. These include:
101
102
102
- - mgd77 (for plain ASCII MGD77 data files)
103
- - mgd77+ (for enhanced MGD77+ netCDF files)
104
- - gmt (for old mgg supplement binary files)
105
- - xy (for plain ASCII x, y tables)
106
- - xyz (same, with one z-column)
107
- - geo (for plain ASCII longitude, latitude files)
108
- - geoz (same, with one z-column).
103
+ - ** mgd77** (for plain ASCII MGD77 data files)
104
+ - ** mgd77+** (for enhanced MGD77+ netCDF files)
105
+ - ** gmt** (for old mgg supplement binary files)
106
+ - **xy** (for plain ASCII x, y tables)
107
+ - ** xyz** (same, with one z-column)
108
+ - ** geo** (for plain ASCII longitude, latitude files)
109
+ - ** geoz** (same, with one z-column).
109
110
110
111
suffix : str
111
112
Specifies the file extension (suffix) for these data files. If not
112
113
given we use the format definition file prefix as the suffix (see
113
- * fmtfile* ).
114
+ `` fmtfile`` ).
114
115
115
116
discontinuity : str
116
117
**d**\|\ **g**.
117
118
Selects geographical coordinates. Append **d** for discontinuity at the
118
- Dateline (makes longitude go from -180 to + 180) or **g** for
119
+ Dateline (makes longitude go from -180 to +180) or **g** for
119
120
discontinuity at Greenwich (makes longitude go from 0 to 360
120
121
[Default]). If not given we assume the data are Cartesian.
121
122
122
123
spacing : str or list
123
124
*dx*\[/*dy*].
124
- *dx* [ and optionally *dy*] is the grid spacing. Append **m** to
125
+ *dx* and optionally *dy* is the grid spacing. Append **m** to
125
126
indicate minutes or **s** to indicate seconds for geographic data.
126
127
These spacings refer to the binning used in the track bin-index data
127
128
base.
128
129
129
130
units : str or list
130
- **d**\|\ **s**\
131
- **c**\|\ **e**\|\ **f**\|\ **k**\|\ **m**\|\ **n**\|\ **u** .
131
+ **d**\|\ **s**\ *unit*.
132
132
Sets the units used for distance and speed when requested by other
133
133
programs. Append **d** for distance or **s** for speed, then give the
134
- desired unit as:
134
+ desired * unit* as:
135
135
136
136
- **c** - Cartesian userdist or userdist/usertime
137
137
- **e** - meters or m/s
138
138
- **f** - feet or feet/s
139
- - **k** - km or kms /hr
139
+ - **k** - km or km /hr
140
140
- **m** - miles or miles/hr
141
141
- **n** - nautical miles or knots
142
142
- **u** - survey feet or survey feet/s
143
143
144
- Default is ``units=["dk", "se"]`` (km and m/s) if * discontinuity* is
145
- set, and ``units=["dc", "sc"]`` otherwise (Cartesian units).
144
+ [ Default is ``units=["dk", "se"]`` (km and m/s) if `` discontinuity`` is
145
+ set, and ``units=["dc", "sc"]`` otherwise (e.g., for Cartesian units)] .
146
146
147
147
{R}
148
148
{V}
149
149
150
150
gap : str or list
151
151
**t**\|\ **d**\ *gap*.
152
152
Give **t** or **d** and append the corresponding maximum time gap (in
153
- user units; this is typically seconds [Infinity ]), or distance (for
154
- units, see ``units``) gap [Default is infinity]) allowed between the
155
- two data points immediately on either side of a crossover. If these
156
- limits are exceeded then a data gap is assumed and no COE will be
157
- determined.
153
+ user units; this is typically seconds [Default is infinity ]), or
154
+ distance (for units, see ``units``) gap [Default is infinity]) allowed
155
+ between the two data points immediately on either side of a crossover.
156
+ If these limits are exceeded then a data gap is assumed and no COE will
157
+ be determined.
158
158
159
159
{j}
160
160
"""
@@ -182,13 +182,13 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs):
182
182
r"""
183
183
Calculate crossovers between track data files.
184
184
185
- x2sys_cross is used to determine all intersections between ("external
186
- cross-overs") or within ("internal cross-overs") tracks (Cartesian or
187
- geographic), and report the time, position, distance along track, heading
188
- and speed along each track segment, and the crossover error (COE) and mean
189
- values for all observables. By default, x2sys_cross will look for both
190
- external and internal COEs. As an option, you may choose to project all
191
- data using one of the map- projections prior to calculating the COE.
185
+ Determines all intersections between ("external cross-overs") or within
186
+ ("internal cross-overs") tracks (Cartesian or geographic), and report the
187
+ time, position, distance along track, heading and speed along each track
188
+ segment, and the crossover error (COE) and mean values for all observables.
189
+ By default, :meth:`pygmt. x2sys_cross` will look for both external and
190
+ internal COEs. As an option, you may choose to project all data using one
191
+ of the map projections prior to calculating the COE.
192
192
193
193
Full option list at :gmt-docs:`supplements/x2sys/x2sys_cross.html`
194
194
@@ -207,7 +207,7 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs):
207
207
in the current directory and second in all directories listed in
208
208
$X2SYS_HOME/TAG/TAG_paths.txt (if it exists). [If $X2SYS_HOME is not
209
209
set it will default to $GMT_SHAREDIR/x2sys]. (Note: MGD77 files will
210
- also be looked for via $MGD77_HOME/mgd77_paths.txt and \\* .gmt files
210
+ also be looked for via $MGD77_HOME/mgd77_paths.txt and .gmt files
211
211
will be searched for via $GMT_SHAREDIR/mgg/gmtfile_paths).
212
212
213
213
outfile : str
@@ -221,7 +221,8 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs):
221
221
combitable : str
222
222
Only process the pair-combinations found in the file *combitable*
223
223
[Default process all possible combinations among the specified files].
224
- The file *combitable* is created by *x2sys_get*'s -L option
224
+ The file *combitable* is created by :gmt-docs:`x2sys_get's -L option
225
+ <supplements/x2sys/x2sys_get.html#l>`.
225
226
226
227
runtimes : bool or str
227
228
Compute and append the processing run-time for each pair to the
@@ -230,15 +231,16 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs):
230
231
is to use the knowledge of run-times to split the main process in a
231
232
number of sub-processes that can each be launched in a different
232
233
processor of your multi-core machine. See the MATLAB function
233
- split_file4coes.m that lives in the x2sys supplement source code.
234
+ `split_file4coes.m
235
+ <https://github.com/GenericMappingTools/gmt/blob/master/src/x2sys/>`_.
234
236
235
237
override : bool or str
236
238
**S**\|\ **N**.
237
239
Control how geographic coordinates are handled (Cartesian data are
238
240
unaffected). By default, we determine if the data are closer to one
239
241
pole than the other, and then we use a cylindrical polar conversion to
240
242
avoid problems with longitude jumps. You can turn this off entirely
241
- with * override* and then the calculations uses the original data (we
243
+ with `` override`` and then the calculations uses the original data (we
242
244
have protections against longitude jumps). However, you can force the
243
245
selection of the pole for the projection by appending **S** or **N**
244
246
for the south or north pole, respectively. The conversion is used
@@ -267,10 +269,10 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs):
267
269
not calculate a COE. Specify:
268
270
269
271
- **l** sets lower speed [Default is 0].
270
- - **u** sets upper speed [Default is Infinity ].
271
- - **h** does not limit the speed but sets a lower speed below which \
272
- headings will not be computed (i.e., set to NaN) [Default calculates \
273
- headings regardless of speed].
272
+ - **u** sets upper speed [Default is infinity ].
273
+ - **h** does not limit the speed but sets a lower speed below which
274
+ headings will not be computed (i.e., set to NaN) [Default
275
+ calculates headings regardless of speed].
274
276
275
277
For example, you can use ``speed=["l0", "u10", "h5"]`` to set a lower
276
278
speed of 0, upper speed of 10, and disable heading calculations for
@@ -288,12 +290,14 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs):
288
290
289
291
Returns
290
292
-------
291
- crossover_errors : pandas.DataFrame or None
293
+ crossover_errors : :class:` pandas.DataFrame` or None
292
294
Table containing crossover error information.
293
- Return type depends on whether the outfile parameter is set:
295
+ Return type depends on whether the `` outfile`` parameter is set:
294
296
295
- - pandas.DataFrame table with (x, y, ..., etc) if outfile is not set
296
- - None if outfile is set (track output will be stored in outfile)
297
+ - :class:`pandas.DataFrame` with (x, y, ..., etc) if ``outfile`` is not
298
+ set
299
+ - None if ``outfile`` is set (track output will be stored in the set in
300
+ ``outfile``)
297
301
"""
298
302
with Session () as lib :
299
303
file_contexts = []
0 commit comments