Learn R Programming

astrolibR (version 0.1)

euler: Transform between Galactic, celestial, and ecliptic coordinates

Description

Transform between Galactic, celestial, and ecliptic coordinates

Usage

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)

Value

ao
longitude, in degrees
bo
latitude, in degrees

Details

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

Related functions are provided in CRAN packages moonsun and sphereplot.

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

Run this code
# Input: RA and dec of Cyg X-1
# Output: Galactic long and lat  = (71.334990, 3.0668335)

euler(299.590315, 35.201604, 1) 

Run the code above in your browser using DataLab