resqpy.olio.vector_utilities.rotate_xyz_array_around_z_axis

resqpy.olio.vector_utilities.rotate_xyz_array_around_z_axis(a, target_xy_vector)[source]

Returns a copy of array a suitable for presenting a cross-section using the resulting x,z values.

Parameters
  • a (numpy float array of shape (..., 3)) – the xyz points to be rotated

  • target_xy_vector (2 (or 3) floats) – a vector indicating which direction in source xy space will end up being mapped to the positive x axis in the returned data

Returns

numpy float array of same shape as a

Notes

if the input points of a lie in a vertical plane parallel to the target xy vector, then the resulting points will have constant y values; in general, a full rotation of the points is applied, so resulting y values will indicate distance ‘into the page’ for non-planar or unaligned data