pydune.math.vector_average#

vector_average(angles, norm, axis=-1)[source]#

Calculate the average vector from series of angles and norms.

Parameters:
  • angles (array_like) – angles.

  • norm (array_like) – norms.

  • axis (None or int) – axis along wich the averaging is performed (the default is -1). None compute the average on the flattened array.

Returns:

  • angle (array_like) – the counterclockwise angle of the resultant vector in the range [-180, 180].

  • norm (array_like) – norm of the resultant vector.

Examples using pydune.math.vector_average#

From wind data to sand fluxes and dune orientations

From wind data to sand fluxes and dune orientations