# x2sys_report

Report statistics from crossover data base

## Synopsis

gmt x2sys_report -C column -T TAG [ coedbase.txt ] [ -A ] [ -I[list] ] [ -L[corrections] ] [ -N nx_min ] [ -Q e|i ] [ [ -R region ] [ -S track ] [ -V[level] ] [ --PAR=value ]

Note: No space is allowed between the option flag and the associated arguments.

## Description

x2sys_report will read the input crossover ASCII data base coedbase.txt (or standard input) and report on the statistics of crossovers (n, mean, stdev, rms, weight) for each track. Options are available to let you exclude tracks and limit the output.

## Required Arguments

coedbase.txt

  The name of the input ASCII crossover error data base as produced by x2sys_cross. If not given we read standard input instead.

-C column

  Specify which data column you want to process. Crossovers related to this column name must be present in the crossover data base.

-T TAG

  Specify the x2sys TAG which identifies the attributes of this data type.

## Optional Arguments

-A

  Eliminate COEs by distributing the COE between the two tracks in proportion to track weight and producing (dist, adjustment) spline knots files for each track (for the selected column). Such adjustments may be used by x2sys_datalist. The adjustment files are called track.column.adj and are placed in the $X2SYS_HOME/TAG directory. For background information on how these adjustments are designed, see Mittal [1984].

-I[list]

  Name of ASCII file with a list of track names (one per record) that should be excluded from consideration [Default includes all tracks].

-L[corrections]

  Apply optimal corrections to the chosen observable. Append the correction table to use [Default uses the correction table TAG_corrections.txt which is expected to reside in the $X2SYS_HOME/TAG directory]. For the format of this file, see x2sys_solve.

-N nx_min

  Only report data from tracks involved in at least nx_min crossovers [all tracks].

-Qe|i

  Append e for external crossovers or i for internal crossovers only [Default is external].

-R west/east/south/north[/zmin/zmax][+r][+u unit]

> Specify the region of interest. For Cartesian data just give xmin/xmax/ymin/ymax. This option bases the statistics on those COE that fall inside the specified domain.

> The region may be specified in one of several ways:

> 1. -R west/east/south/north. This is the standard way to specify geographic regions when using map projections where meridians and parallels are rectilinear. The coordinates may be specified in decimal degrees or in [±]dd:mm[:ss.xxx][W|E|S|N] format.

> 2. -R west/south/east/north+r. This form is useful for map projections that are oblique, making meridians and parallels poor choices for map boundaries. Here, we instead specify the lower left corner and upper right corner geographic coordinates, followed by the modifier +r. This form guarantees a rectangular map even though lines of equal longitude and latitude are not straight lines.

> 3. -Rg or -Rd. These forms can be used to quickly specify the global domain (0/360 for -Rg and -180/+180 for -Rd in longitude, with -90/+90 in latitude).

> 4. -R code1,code2,…[+e|r|R incs]. This indirectly supplies the region by consulting the DCW (Digital Chart of the World) database and derives the bounding regions for one or more countries given by the codes. Simply append one or more comma-separated countries using either the two-character ISO 3166-1 alpha-2 convention (e.g., NO) or the full country name (e.g., Norway). To select a state within a country (if available), append .state (e.g, US.TX), or the full state name (e.g., Texas). To specify a whole continent, spell out the full continent name (e.g., -RAfrica). Finally, append any DCW collection abbreviations or full names for the extent of the collection or named region. All names are case-insensitive. The following modifiers can be appended:

>    > - +r to adjust the region boundaries to be multiples of the steps indicated by inc, xinc/yinc, or winc/einc/sinc/ninc [default is no adjustment]. For example, -R FR+r1 will select the national bounding box of France rounded to nearest integer degree, where inc can be positive to expand the region or negative to shrink the region.

>    > - +R to adjust the region by adding the amounts specified by inc, xinc/yinc, or winc/einc/sinc/ninc [default is no extension], where inc can be positive to expand the region or negative to shrink the region.

>    > - +e to adjust the region boundaries to be multiples of the steps indicated by inc, xinc/yinc, or winc/einc/sinc/ninc, while ensuring that the bounding box is adjusted by at least 0.25 times the increment [default is no adjustment], where inc can be positive to expand the region or negative to shrink the region.

> 5. -R xmin/xmax/ymin/ymax[+u unit] specifies a region in projected units (e.g., UTM meters) where xmin/xmax/ymin/ymax are Cartesian projected coordinates compatible with the chosen projection (-J) and unit is an allowable distance unit [e]; we inversely project to determine the actual rectangular geographic region. For projected regions centered on (0,0) you may use the short-hand -R halfwidth[/halfheight]+u unit, where halfheight defaults to halfwidth if not given. This short-hand requires the +u modifier.

> 6. -R justifylon0/lat0/nx/ny, where justify is a 2-character combination of L|C|R (for left, center, or right) and T|M|B (for top, middle, or bottom) (e.g., BL for lower left). The two character code justify indicates which point on a rectangular region region the lon0/lat0 coordinates refer to and the grid dimensions nx and ny are used with grid spacings given via -I to create the corresponding region. This method can be used when creating grids. For example, -RCM 25/25/50/50 specifies a 50x50 grid centered on 25,25.

> 7. -R gridfile. This will copy the domain settings found for the grid in specified file. Note that depending on the nature of the calling module, this mechanism will also set grid spacing and possibly the grid registration (see Grid registration: The -r option).

> 8. -Ra[uto] or -Re[xact]. Under modern mode, and for plotting modules only, you can automatically determine the region from the data used. You can either get the exact area using -Re [Default if no -R is given] or a slightly larger area sensibly rounded outwards to the next multiple of increments that depend on the data range using -Ra.

-S track

  Name of a single track. If given we restrict output to those crossovers involving this track [Default output is crossovers involving any track pair].

-V[level]

  Select verbosity level [w]. (See full description) (See cookbook information).

-^ or just -

  Print a short message about the syntax of the command, then exit (Note: on Windows just use -).

-+ or just +

  Print an extensive usage (help) message, including the explanation of any module-specific option (but not the GMT common options), then exit.

-? or no arguments

  Print a complete usage (help) message, including the explanation of all options, then exit.

--PAR=value

  Temporarily override a GMT default setting; repeatable. See gmt.conf for parameters.

## Examples

To report statistics of all the external magnetic crossovers associated with the tag MGD77 from the file COE_data.txt, restricted to occupy a certain region in the south Pacific, try:

    gmt x2sys_report COE_data.txt -V -TMGD77 -R180/240/-60/-30 -Cmag > mag_report.txt

To report on the faa crossovers globally that involves track 12345678, try:

    gmt x2sys_report COE_data.txt -V -TMGD77 -Cfaa -S2345678 > faa_report.txt

## References

Wessel, P. (2010), Tools for analyzing intersecting tracks: the x2sys package. Computers and Geosciences, 36, 348-354, https://www.researchgate.net/publication/220164039_Tools_for_analyzing_intersecting_tracks_The_x2sys_package.

Wessel, P. (1989), XOVER: A cross-over error detector for track data, Computers and Geosciences, 15(3), 333-346, https://doi.org/10.1016/0098-3004(89)90044-7.

Mittal, P. K. (1984), Algorithm for error adjustment of potential field data along a survey network, Geophysics, 49(4), 467-469.

## See Also

x2sys_binlist x2sys_cross x2sys_datalist x2sys_get x2sys_init x2sys_list x2sys_put x2sys_solve