angulardistance
This IDL facility computes the angular distance (in RADIANS) between pairs of vectors.
Location in HEALPix directory tree: src/idl/toolkit/angulardistance.pro
FORMAT
IDL>
distance=angulardistance(V,
W,
[/HELP])
QUALIFIERS
-
V
- 3D-vector (of shape (3) or (1,3)) or list of n 3D-vectors (of shape (n,3))
-
W
- 3D-vector (of shape (3) or (1,3)) or list of n 3D-vectors (of shape
(n,3))
It is not necessary for V and W vectors to be normalised to 1
upon calling the function
If V (and/or W) has the form (n,3,4) (like the pixel corners returned by
pix2vec_*), it should be preprocessed with
V = reform( transpose(V, [0,2,1]), n_elements(V)/3, 3)
before being passed to angulardistance.
KEYWORDS
-
/HELP
- if set, prints out the help header and exits
DESCRIPTION
After renormalizing the vectors, angulardistance computes the angular distance using
in general, or
when
and
are almost aligned.
If
(resp.
) is a single vector, while
(resp.
) is a list of vectors,
then the result is a list of distances
(resp.
).
If both
and
are lists of vector of the same length,
then the result is a list of distances
.
RELATED ROUTINES
This section lists the routines related to angulardistance
-
idl
- version 6.4 or more is necessary to run angulardistance.
EXAMPLE:
will plot the angular distance between the Healpix pixels center for
, and the vector

Version 3.30, 2015-10-08