uxarray.grid.intersections.gca_constLat_intersection#

uxarray.grid.intersections.gca_constLat_intersection(gca_cart, constLat, fma_disabled=False, verbose=False)#

Calculate the intersection point(s) of a Great Circle Arc (GCA) and a constant latitude line 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:
  • gca_cart ([2, 3] np.ndarray Cartesian coordinates of the two end points GCA.) –

  • constLat (float) – The constant latitude of the latitude line.

  • 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 GCA is not in the cartesian [x, y, z] format.

Warning

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)