geoparticle.utils.n_per_ring

n_per_ring(r, d, phi_ring=6.283185307179586) ndarray | int[source]

Compute the number of points for a ring at a given radius with specified spacing.

Shortest import: from geoparticle import n_per_ring

Parameters:
  • r (float or np.ndarray) – Radius of the ring(s).

  • d (float) – Desired spacing between points.

  • phi_ring (float) – Total angle of the ring in radians (default is 2π for a full circle).

Returns:

Number of points per ring. Returns an integer if r is scalar.

Return type:

np.ndarray or int