NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


vec2ang


This IDL facility convert the 3D position vectors of points into their angles on the sphere.


Location in HEALPix directory tree: src/idl/toolkit/vec2ang.pro


FORMAT

IDL> VEC2ANG , Vector, Theta, Phi [, ASTRO=]


QUALIFIERS


Vector
input, array,
three dimensional cartesian position vector (x,y,z) (not necessarily normalised). The north pole is (0,0,1). The coordinates are ordered as follows $x(0),\ldots,x(n-1),\ y(0),\ldots,y(n-1),\ z(0),\ldots,z(n-1)$
Theta
output, vector,
vector, colatitude in radians measured southward from north pole in [0,$\pi$] (mathematical coordinates).
If ASTRO is set, Theta is the latitude in degrees measured northward from the equator, in [-90, 90] (astronomical coordinates).
Phi
output, vector,
longitude in radians measured eastward, in [0, $2\pi$] (mathematical coordinates).
If ASTRO is set, Phi is the longitude in degree measured eastward, in [0,360] (astronomical coordinates).


KEYWORDS


ASTRO =
if set Theta and Phi are the latitude and longitude in degrees (astronomical coordinates) instead of the colatitude and longitude in radians (mathematical coordinates).


DESCRIPTION


vec2ang performs the geometrical transform from the 3D position vectors (x,y,z) of points into their angles $(\theta,\phi)$ on the sphere: $x = \sin\theta\cos\phi$, $y=\sin\theta\sin\phi$, $z=\cos\theta$


RELATED ROUTINES

This section lists the routines related to vec2ang


idl
version 6.1 or more is necessary to run vec2ang .
pix2xxx, ...
conversion between vector or angles and pixel index
ang2vec
conversion from angles to position vectors


EXAMPLE:


Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650