xy2vector#

static GnomonicProjection.xy2vector(xy: ndarray) Vector3d[source]#

Convert from 2D Gnomonic coordinates \((x_g, y_g)\) to 3D cartesian coordiantes \((x, y, z)\).

Parameters:
xy

2D coordinates on the form [[x_g0, y_g0], [x_g1, y_g1], ...].

Returns:
cartesian_coordinates

Cartesian coordinates \((x, y, z)\) on the form [[x0, y0, z0], [x1, y1, z1], ...].

Examples

>>> import numpy as np
>>> from kikuchipy.projections import GnomonicProjection
>>> xy_g = np.random.random_sample(20).reshape((10, 2))
>>> xyz = GnomonicProjection.xy2vector(xy_g)