glactc {astrolibR}R Documentation

Convert between celestial and Galactic (or Supergalactic) coordinates

Description

Convert between celestial and Galactic (or Supergalactic) coordinates

Usage

glactc(ra, dec, year, gl, gb, j, degree=FALSE, fk4 = FALSE, supergalactic = FALSE)

Arguments

ra

Right Ascension (j=1) or Galactic longitude (j=2), in decimal hours or degrees, scalar or vector

dec

Declination (j=1) or Galactic latitude (j=2), in degrees, scalar or vector

year

equinox of ra and dec, scalar

gl

Galactic longitude or Right Ascension, in degrees, scalar or vector

gb

Galactic latitude or Declination, in degrees, scalar or vector

j

integer indicator, direction of conversion
1: ra,dec –> gl,gb
2: gl,gb –> ra,dec

degree

if set, then the RA parameter (both input and output) is given in degrees rather than hours (default=FALSE)

fk4

if set, then the celestial (RA, Dec) coordinates are assumed to be input/output in the FK4 system. By default, coordinates are assumed to be in the FK5 system. (default=FALSE)

supergalactic

if set, the function returns SuperGalactic coordinates (see details). (default=FALSE)

Details

If j=1, this function converts proper motion in equatorial coordinates (ra,dec) to proper motion in Galactic coordinates (gl, gb) or Supergalactic Coordinates (sgl,sgb). If j=2, the conversion is reversed from Galactic/Supergalactic coordinates to equatorial coordinates. The calculation includes precession on the coordinates.

For B1950 coordinates, set fk4=TRUE and year=1950.

If supergalactic=TRUE is set, Supergalactic coordinates are defined by de Vaucouleurs et al. (1976) to account for the local supercluster. The North pole in Supergalactic coordinates has Galactic coordinates l = 47.47, b = 6.32, and the origin is at Galactic coordinates l = 137.37, b = 0.00.

Value

ra

Galactic longitude (j=1) or Right Ascension (j=2), in decimal hours or degrees, scalar or vector

dec

Galactic latitude (j=1) or Declination (j=2), in degrees, scalar or vector

Author(s)

FORTRAN subroutine by T. A. Nagy, 1978. Conversion to IDL, R. S. Hill, STX, 1987.

R adaptation by Arnab Chakraborty June 2013

See Also

precess jprecess bprecess

Examples

# Find the Galactic coordinates of Altair (RA (J2000): 19 50 47 Dec (J2000): 08 52 06)
# Result: gl = 47.74, gb = -8.91

glactc(ten(19,50,47), ten(8,52,6), 2000, gl, gb, 1)

[Package astrolibR version 0.1 Index]