attitude.coordinates package

Submodules

attitude.coordinates.rotations module

Helper functions for rotations

Prior art: http://bl.ocks.org/ivyywang/7c94cb5a3accd9913263

attitude.coordinates.rotations.cartesian(lon, lat)[source]

Converts spherical positions in (lon, lat) to cartesian coordiantes [x,y,z]. For the purposes of this library’s focus on orientations, this operates in a north = vertical framework. That is, positions around the equator are in the [x,y] plane, and dipping planes occur with higher latitudes.

This is intuitive for strike and dip representations, as it maps (strike, dip) to (lon, lat). However, we note that it is distinct from the traditional stereonet representation, which puts the X-Y plane along the prime meridian.

attitude.coordinates.rotations.from_stereonet(lon, lat)[source]
attitude.coordinates.rotations.stereonet_transformation()[source]

Map vertical to horizontal

Map [1,0,0] to [0,0,1]
stereonet normal
attitude.coordinates.rotations.to_stereonet(lon, lat)[source]
attitude.coordinates.rotations.transform(v1, v2)[source]

Create an affine transformation matrix that maps vector 1 onto vector 2

https://math.stackexchange.com/questions/293116/rotating-one-3d-vector-to-another

Module contents

attitude.coordinates.cartesian(spherical)[source]
attitude.coordinates.centered(coordinates)[source]

Centers coordinate distribution with respect to its mean on all three axes. This is used as the input to the regression model, so it can be converted easily into radial coordinates.

attitude.coordinates.spherical(coordinates)[source]

No error is propagated