# rotsmoother¶

Get mean rotations and covariance matrices from set of finite rotations

## Synopsis¶

**gmt rotsmoother** [ *table* ]
[ **-A** ]
[ **-C** ]
[ **-N** ]
[ **-S** ]
[ **-T***ages* ]
[ **-V**[*level*] ]
[ **-W** ]
[ **-Z** ]
[ **-b**binary ]
[ **-d**nodata[**+c***col*] ]
[ **-e**regexp ]
[ **-f**flags ]
[ **-h**headers ]
[ **-i**flags ]
[ **-o**flags ]
[ **-s**flags ]
[ **-:**[**i**|**o**] ]
[ **--PAR**=*value* ]

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

## Description¶

**rotsmoother** reads a table of total reconstructions and computes mean
rotations (and optionally covariance matrices) for sub-groups of rotations
based on rotation age (or all of the rotations).

## Required Arguments¶

*table*Name of a rotation table containing (

*lon lat time angle*[*weight*]) values.

## Optional Arguments¶

**-A**Use opening angles as a proxy for time. Suitable when no time can be assigned to the rotations. In this case, input is expected to contain

*lon lat angle*[*weight*] records and**-T**settings refer to angles instead of time. [Default expects*lon lat time angle*[*weight*] and**-T**refers to time].

**-C**Compute covariance matrix for each mean rotation. This is done by converting each finite rotation to a quaternion, determining the mean quaternion (rotation) and the consider all rotations as perturbation to the mean rotation. From these perturbations we determine the covariance matrix.

**-N**Ensure all poles are in northern hemisphere [Default ensures positive opening angles].

**-S**Ensure all poles are in southern hemisphere [Default ensures positive opening angles].

**-T***ages*Sets the desired groups of ages. For a single time append the desired time and all rotations are used to compute a single mean rotation. For an equidistant range of reconstruction ages give

**-T***start*/*stop*/*inc*or**-T***start*/*stop*/*npoints***+n**. For an non-equidistant set of reconstruction ages please pass them via the first column in a file, e.g.,**-T***agefile*. The ages we read or generate becomes the bin-boundaries and we output the average time of all rotations inside each bin.

**-V**[*level*]Select verbosity level [

**w**]. (See full description) (See cookbook information).

**-W**Expect weights in last column for a weighted mean rotation [no weights].

**-Z**Report negative opening angles [positive].

**-bi***record*[**+b**|**l**] (more …)Select native binary format for primary table input. [Default is 2 input columns].

**-bo***record*[**+b**|**l**] (more …)Select native binary format for table output. [Default is same as input].

**-d**[**i**|**o**][**+c***col*]*nodata*(more …)Replace input columns that equal

*nodata*with NaN and do the reverse on output.

**-e**[**~**]*“pattern”*|**-e**[**~**]/*regexp*/[**i**] (more …)Only accept data records that match the given pattern.

**-f**[**i**|**o**]*colinfo*(more …)Specify data types of input and/or output columns.

**-h**[**i**|**o**][*n*][**+c**][**+d**][**+m***segheader*][**+r***remark*][**+t***title*] (more …)Skip or produce header record(s).

**-i***cols*[**+l**][**+d***divisor*][**+s***scale*|**d**|**k**][**+o***offset*][,*…*][,**t**[*word*]] (more …)Select input columns and transformations (0 is first column,

**t**is trailing text, append*word*to read one word only).

**-o***cols*[,…][,**t**[*word*]] (more …)Select output columns (0 is first column;

**t**is trailing text, append*word*to write one word only).

**-s**[*cols*][**+a**][**+r**] (more …)Set handling of NaN records for output.

**-:**[**i**|**o**] (more …)Swap 1st and 2nd column on input and/or output.

**-n**[**b**|**c**|**l**|**n**][**+a**][**+b***BC*][**+c**][**+t***threshold*] (more …)Select interpolation mode for grids.

**-^**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 argumentsPrint 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.

## Geodetic versus Geocentric Coordinates¶

All spherical rotations are applied to geocentric coordinates. This means that incoming data points and grids are considered to represent geodetic coordinates and must first be converted to geocentric coordinates. Rotations are then applied, and the final reconstructed points are converted back to geodetic coordinates. This default behavior can be bypassed if the ellipsoid setting PROJ_ELLIPSOID is changed to Sphere.

## Examples¶

To smooth rotation groups in increments of 3 Myr and ensure northern hemisphere poles, try:

```
gmt rotsmoother rotations.txt -N -T3/3/30 -V > rot_means.txt
```

To smooth all rotations and compute a single mean rotation (assigned to time = 5) with corresponding covariance matrix, try:

```
gmt rotsmoother rotations.txt -C -T5 -V > rot_means_cov.txt
```

## See Also¶

backtracker, gmtpmodeler, grdpmodeler, grdspotter, hotspotter, originater, rotconverter