[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


POSANG Source code in posang.pro

POSANG

Name
       POSANG
Purpose
       Computes rigorous position angle of source 2 relative to source 1
Explanation
       Computes the rigorous position angle of source 2 (with given RA, Dec)
       using source 1 (with given RA, Dec) as the center.
Calling Sequence
       POSANG, U, RA1, DC1, RA2, DC2, ANGLE
Input Parameters
       U    -- Describes units of inputs and output:
               0:  everything radians
               1:  RAx in decimal hours, DCx in decimal
                       degrees, ANGLE in degrees
       RA1  -- Right ascension of point 1
       DC1  -- Declination of point 1
       RA2  -- Right ascension of point 2
       DC2  -- Declination of point 2
Output Parameters
       ANGLE-- Angle of the great circle containing [ra2, dc2] from
               the meridian containing [ra1, dc1], in the sense north
               through east rotating about [ra1, dc1].  See U above
               for units.
Procedure
       The "four-parts formula" from spherical trig (p. 12 of Smart's
       Spherical Astronomy or p. 12 of Green' Spherical Astronomy).
Example
       For the star 56 Per, the Hipparcos catalog gives a position of
       RA = 66.15593384, Dec = 33.94988843 for component A, and
       RA = 66.15646079, Dec =  33.96100069 for component B.   What is the
       position angle of B relative to A?
       IDL> RA1 = 66.15593384/15.d   & DC1 = 33.95988843
       IDL> RA2 = 66.15646079/15.d   & DC2 = 33.96100069
       IDL> posang,1,ra1,dc1,ra2,dc2, ang
            will give the answer of ang = 21.4 degrees
Note
       (1) If RA1,DC1 are scalars, and RA2,DC2 are vectors, then ANGLE is a
       vector giving the position angle between each element of RA2,DC2 and
       RA1,DC1.   Similarly, if RA1,DC1 are vectors, and RA2, DC2 are scalars,
       then DIS is a vector giving the position angle of each element of RA1,
       DC1 and RA2, DC2.    If both RA1,DC1 and RA2,DC2 are vectors then ANGLE
       is a vector giving the position angle between each element of RA1,DC1
       and the corresponding element of RA2,DC2.    If then vectors are not the
       same length, then excess elements of the longer one will be ignored.
       (2) Note that POSANG is not commutative -- the position angle between
        A and B is theta, then the position angle between B and A is 180+theta
Procedures Used
        ISARRAY()
Revision History
       Modified from GCIRC, R. S. Hill, RSTX, 1 Apr. 1998

Last modified by pro2html on 2001 April 26 at 03:11 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms ([email protected])
Updated automatically