uxarray.grid.intersections.gca_gca_intersection

uxarray.grid.intersections.gca_gca_intersection#

uxarray.grid.intersections.gca_gca_intersection(gca1_cart, gca2_cart, fma_disabled=False)#

Calculate the intersection point(s) of two Great Circle Arcs (GCAs) in a Cartesian coordinate system.

To reduce relative errors, the Fused Multiply-Add (FMA) operation is utilized. A warning is raised if the given coordinates are not in the cartesian coordinates, or they cannot be accurately handled using floating-point arithmetic.

Parameters:
  • gca1_cart ([n, 3] np.ndarray where n is the number of intersection points) – Cartesian coordinates of the first GCA.

  • gca2_cart ([n, 3] np.ndarray where n is the number of intersection points) – Cartesian coordinates of the second GCA.

  • fma_disabled (bool, optional (default=False)) – If True, the FMA operation is disabled. And a naive np.cross is used instead.

Returns:

Cartesian coordinates of the intersection point(s).

Return type:

np.ndarray

Raises:

ValueError – If the input GCAs are not in the cartesian [x, y, z] format.

Warning

If the current input data cannot be computed accurately using floating-point arithmetic. Use with care

If running on the Windows system with fma_disabled=False since the C/C++ implementation of FMA in MS Windows is fundamentally broken. (bug report: https://bugs.python.org/msg312480)