euler: Transform between Galactic, celestial, and ecliptic...

Description Usage Arguments Details Value Author(s) References Examples

Description

Transform between Galactic, celestial, and ecliptic coordinates

Usage

1
euler(ai, bi, select, fk4, radian)

Arguments

ai

longitude, in degrees unless radian=TRUE is set, scalar or vector

bi

latitude, degrees unless radian=TRUE is set, scalar or vector

select

integer (1-6) specifying type of coordinate transformation: 1 = RA-Dec (J2000) to Galactic; 2 = Galactic to RA-Dec; 3 = RA-Dec (J2000) to Ecliptic; 4 = Ecliptic to RA-Dec; 5 = Ecliptic to Galactic; 6 = Galactic to Ecliptic

fk4

set to TRUE if input and output celestial and equatorial coordinates are given in equinox B1950 (default = FALSE)

radian

set to TRUE in all input and output angles are in radians rather than degrees (default = FALSE)

Details

J2000 coordinate conversions are based on sec. 1.2 of Perryman (1997).

Related functions are provided in CRAN packages moonsun and sphereplot.

Value

ao

longitude, in degrees

bo

latitude, in degrees

Author(s)

Written by W. Landsman, February 1987; adapted from Fortran by Daryl Yentis NRL

R adaptation by Arnab Chakraborty (June 2013)

References

Perryman, M. (editor) 1997, The Hipparcos and Tycho Catalogues, Vol. 1, ESA SP-1200. http://www.rssd.esa.int/SA/HIPPARCOS/docs/vol1_all.pdf

Examples

1
2
3
4
# Input: RA and dec of Cyg X-1
# Output: Galactic long and lat  = (71.334990, 3.0668335)

euler(299.590315, 35.201604, 1) 

Example output

Called from: euler(299.590315, 35.201604, 1)
debug: return(list(ao = ao, bo = bo))
$ao
[1] 71.33499

$bo
[1] 3.066834

astrolibR documentation built on May 2, 2019, 3:26 a.m.