cosine_rule#
- caput.astro.coordinates.spherical.cosine_rule(mu: numpy.typing.ArrayLike[numpy.float64], x1: numpy.typing.ArrayLike[numpy.float64], x2: numpy.typing.ArrayLike[numpy.float64]) numpy.ndarray[numpy.float64][source]#
Calculate the distances between a grid of points.
This is a somewhat niche implementation intended to help calculate multi-distance angular power spectra.
- Parameters:
- muarray_like
Angular separations in
cos(theta).- x1, x2array_like
Positions of the first and second points.
- Returns:
- separationarray_like
The separation of the points for all combinations of mu, x1, x2. This is a 3-dimensional array with axis-lengths equal to the lengths of the three input vectors.