mpas_tools.transects.Vector

class mpas_tools.transects.Vector(x, y, z)[source]

A class for representing Cartesian vectors with x, y and z components that are either float or numpy.array objects of identical size.

Variables
__init__(x, y, z)[source]

A class for representing Cartesian vectors with x, y and z components that are either float or numpy.array objects of identical size.

Parameters

Methods

__init__(x, y, z)

A class for representing Cartesian vectors with x, y and z components that are either float or numpy.array objects of identical size.

angular_distance(other)

Compute angular distance between points on the sphere, following: https://en.wikipedia.org/wiki/Great-circle_distance

cross(other)

Compute the dot product between this vector and other.

det(v1, v2, v3)

The determinant of the matrix defined by the three Vector objects

dot(other)

Compute the dot product between this vector and other.

intersection(a1, a2, b1, b2)

Based on https://stackoverflow.com/a/26669130/7728169 Find the intersection point as a unit vector between great circle arc from a1 to a2 and from b1 to b2.

intersects(a1, a2, b1, b2)

Based on https://stackoverflow.com/a/26669130/7728169 Determine if the great circle arc from a1 to a2 intersects that from b1 to b2.

mag()

The magnitude of the vector

straddles(a1, a2, b1, b2)

Based on https://stackoverflow.com/a/26669130/7728169 Determines if the great circle segment determined by (a1, a2) straddles the great circle determined by (b1, b2)