pygmt.x2sys_cross¶
-
pygmt.
x2sys_cross
(tracks=None, outfile=None, **kwargs)[source]¶ Calculate crossovers between track data files.
x2sys_cross is used to determine all intersections between (“external cross-overs”) or within (“internal cross-overs”) tracks (Cartesian or geographic), and report the time, position, distance along track, heading and speed along each track segment, and the crossover error (COE) and mean values for all observables. The names of the tracks are passed on the command line. By default, x2sys_cross will look for both external and internal COEs. As an option, you may choose to project all data using one of the map-projections prior to calculating the COE.
Full option list at https://docs.generic-mapping-tools.org/latest/supplements/x2sys/x2sys_cross.html
Aliases:
Q = coe
T = tag
V = verbose
- Parameters
tracks (pandas.DataFrame or str or list) –
Either a single pandas.DataFrame table with (x, y) or (lon, lat) values in the first two columns, or a single filename (supported formats are ASCII .txt, native binary, or COARDS netCDF 1-D .nc), or a combination of tables and/or filenames in a list. More columns may also be present.
If the filenames are missing their file extension, we will append the suffix specified for this TAG. Track files will be searched for first in the current directory and second in all directories listed in $X2SYS_HOME/TAG/TAG_paths.txt (if it exists). [If $X2SYS_HOME is not set it will default to $GMT_SHAREDIR/x2sys]. (Note: MGD77 files will also be looked for via $MGD77_HOME/mgd77_paths.txt and *.gmt files will be searched for via $GMT_SHAREDIR/mgg/gmtfile_paths).
outfile (str) – Optional. The file name for the output ASCII txt file to store the table in.
tag (str) – Specify the x2sys TAG which identifies the attributes of this data type.
coe (str) – Use e for external COEs only, and i for internal COEs only [Default is all COEs].
verbose (str) – 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.
- Returns
crossover_errors (pandas.DataFrame or None) – Table containing crossover error information. Return type depends on whether the outfile parameter is set:
pandas.DataFrame table with (x, y, …, etc) if outfile is not set
None if outfile is set (track output will be stored in outfile)